network: Don't manage Wi-Fi devices
The Wi-Fi devices are going to be managed with the to-be-introduced Wi-Fi panel, and don't need to be available in the Network panel anymore. This patch then blacklists Wi-Fi devices and doesn't let the Network panel manage them. https://bugzilla.gnome.org/show_bug.cgi?id=784818
This commit is contained in:
parent
158591a346
commit
3317e88de8
3 changed files with 7 additions and 37 deletions
|
@ -775,9 +775,8 @@ panel_add_device (CcNetworkPanel *panel, NMDevice *device)
|
||||||
case NM_DEVICE_TYPE_MODEM:
|
case NM_DEVICE_TYPE_MODEM:
|
||||||
device_g_type = NET_TYPE_DEVICE_MOBILE;
|
device_g_type = NET_TYPE_DEVICE_MOBILE;
|
||||||
break;
|
break;
|
||||||
|
/* Let the wi-fi panel take care of wifi devices */
|
||||||
case NM_DEVICE_TYPE_WIFI:
|
case NM_DEVICE_TYPE_WIFI:
|
||||||
device_g_type = NET_TYPE_DEVICE_WIFI;
|
|
||||||
break;
|
|
||||||
/* not going to set up a cluster in GNOME */
|
/* not going to set up a cluster in GNOME */
|
||||||
case NM_DEVICE_TYPE_VETH:
|
case NM_DEVICE_TYPE_VETH:
|
||||||
/* enterprise features */
|
/* enterprise features */
|
||||||
|
@ -1316,7 +1315,6 @@ cc_network_panel_init (CcNetworkPanel *panel)
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkWidget *toplevel;
|
GtkWidget *toplevel;
|
||||||
GDBusConnection *system_bus;
|
GDBusConnection *system_bus;
|
||||||
GtkCssProvider *provider;
|
|
||||||
const GPtrArray *connections;
|
const GPtrArray *connections;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
|
@ -1409,13 +1407,6 @@ cc_network_panel_init (CcNetworkPanel *panel)
|
||||||
"vbox1"));
|
"vbox1"));
|
||||||
gtk_container_add (GTK_CONTAINER (panel), widget);
|
gtk_container_add (GTK_CONTAINER (panel), widget);
|
||||||
|
|
||||||
provider = gtk_css_provider_new ();
|
|
||||||
gtk_css_provider_load_from_data (provider, ".circular-button { border-radius: 20px; -gtk-outline-radius: 20px; }", -1, NULL);
|
|
||||||
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
|
|
||||||
GTK_STYLE_PROVIDER (provider),
|
|
||||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
||||||
g_object_unref (provider);
|
|
||||||
|
|
||||||
/* Cold-plug existing connections */
|
/* Cold-plug existing connections */
|
||||||
connections = nm_client_get_connections (panel->priv->client);
|
connections = nm_client_get_connections (panel->priv->client);
|
||||||
for (i = 0; i < connections->len; i++)
|
for (i = 0; i < connections->len; i++)
|
||||||
|
|
|
@ -1418,16 +1418,13 @@ client_connection_removed_cb (NMClient *client,
|
||||||
NMRemoteConnection *connection,
|
NMRemoteConnection *connection,
|
||||||
NetDeviceWifi *device_wifi)
|
NetDeviceWifi *device_wifi)
|
||||||
{
|
{
|
||||||
GtkWidget *swin;
|
|
||||||
GtkWidget *list;
|
GtkWidget *list;
|
||||||
GList *rows, *l;
|
GList *rows, *l;
|
||||||
const char *uuid;
|
const char *uuid;
|
||||||
|
|
||||||
uuid = nm_connection_get_uuid (NM_CONNECTION (connection));
|
uuid = nm_connection_get_uuid (NM_CONNECTION (connection));
|
||||||
|
|
||||||
swin = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
|
list = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder, "listbox"));
|
||||||
"scrolledwindow_list"));
|
|
||||||
list = gtk_bin_get_child (GTK_BIN (gtk_bin_get_child (GTK_BIN (swin))));
|
|
||||||
rows = gtk_container_get_children (GTK_CONTAINER (list));
|
rows = gtk_container_get_children (GTK_CONTAINER (list));
|
||||||
for (l = rows; l != NULL; l = l->next) {
|
for (l = rows; l != NULL; l = l->next) {
|
||||||
GtkWidget *row = l->data;
|
GtkWidget *row = l->data;
|
||||||
|
@ -1770,7 +1767,7 @@ make_row (GtkSizeGroup *rows,
|
||||||
gtk_widget_show (image);
|
gtk_widget_show (image);
|
||||||
widget = gtk_button_new ();
|
widget = gtk_button_new ();
|
||||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "image-button");
|
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "image-button");
|
||||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "circular-button");
|
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "circular");
|
||||||
gtk_widget_show (widget);
|
gtk_widget_show (widget);
|
||||||
gtk_container_add (GTK_CONTAINER (widget), image);
|
gtk_container_add (GTK_CONTAINER (widget), image);
|
||||||
gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
|
gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
|
||||||
|
@ -2031,7 +2028,6 @@ open_history (NetDeviceWifi *device_wifi)
|
||||||
static void
|
static void
|
||||||
populate_ap_list (NetDeviceWifi *device_wifi)
|
populate_ap_list (NetDeviceWifi *device_wifi)
|
||||||
{
|
{
|
||||||
GtkWidget *swin;
|
|
||||||
GtkWidget *list;
|
GtkWidget *list;
|
||||||
GtkSizeGroup *rows;
|
GtkSizeGroup *rows;
|
||||||
GtkSizeGroup *icons;
|
GtkSizeGroup *icons;
|
||||||
|
@ -2046,9 +2042,7 @@ populate_ap_list (NetDeviceWifi *device_wifi)
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GList *children, *child;
|
GList *children, *child;
|
||||||
|
|
||||||
swin = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
|
list = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder, "listbox"));
|
||||||
"scrolledwindow_list"));
|
|
||||||
list = gtk_bin_get_child (GTK_BIN (gtk_bin_get_child (GTK_BIN (swin))));
|
|
||||||
|
|
||||||
children = gtk_container_get_children (GTK_CONTAINER (list));
|
children = gtk_container_get_children (GTK_CONTAINER (list));
|
||||||
for (child = children; child; child = child->next) {
|
for (child = children; child; child = child->next) {
|
||||||
|
@ -2148,7 +2142,6 @@ net_device_wifi_init (NetDeviceWifi *device_wifi)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkWidget *swin;
|
|
||||||
GtkWidget *list;
|
GtkWidget *list;
|
||||||
GtkSizeGroup *rows;
|
GtkSizeGroup *rows;
|
||||||
GtkSizeGroup *icons;
|
GtkSizeGroup *icons;
|
||||||
|
@ -2175,14 +2168,9 @@ net_device_wifi_init (NetDeviceWifi *device_wifi)
|
||||||
g_signal_connect (widget, "notify::active",
|
g_signal_connect (widget, "notify::active",
|
||||||
G_CALLBACK (device_off_toggled), device_wifi);
|
G_CALLBACK (device_off_toggled), device_wifi);
|
||||||
|
|
||||||
swin = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
|
list = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder, "listbox"));
|
||||||
"scrolledwindow_list"));
|
|
||||||
list = GTK_WIDGET (gtk_list_box_new ());
|
|
||||||
gtk_widget_show (list);
|
|
||||||
gtk_list_box_set_selection_mode (GTK_LIST_BOX (list), GTK_SELECTION_NONE);
|
|
||||||
gtk_list_box_set_header_func (GTK_LIST_BOX (list), cc_list_box_update_header_func, NULL, NULL);
|
gtk_list_box_set_header_func (GTK_LIST_BOX (list), cc_list_box_update_header_func, NULL, NULL);
|
||||||
gtk_list_box_set_sort_func (GTK_LIST_BOX (list), (GtkListBoxSortFunc)ap_sort, NULL, NULL);
|
gtk_list_box_set_sort_func (GTK_LIST_BOX (list), (GtkListBoxSortFunc)ap_sort, NULL, NULL);
|
||||||
gtk_container_add (GTK_CONTAINER (swin), list);
|
|
||||||
g_signal_connect (list, "row-activated",
|
g_signal_connect (list, "row-activated",
|
||||||
G_CALLBACK (ap_activated), device_wifi);
|
G_CALLBACK (ap_activated), device_wifi);
|
||||||
|
|
||||||
|
|
|
@ -1586,22 +1586,13 @@ here</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkScrolledWindow" id="scrolledwindow_list">
|
<object class="GtkListBox" id="listbox">
|
||||||
<property name="height_request">300</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="margin_start">12</property>
|
<property name="selection_mode">none</property>
|
||||||
<property name="margin_end">12</property>
|
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="vexpand">True</property>
|
<property name="vexpand">True</property>
|
||||||
<property name="hscrollbar_policy">never</property>
|
|
||||||
<property name="shadow_type">in</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue