[gnome-control-center: 2/14] network: split the wireless panel into a network list and details panel



commit 391815c2c19d833eeb61fc7e4e617c1e416ae17a
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jul 26 13:38:55 2012 +0100

    network: split the wireless panel into a network list and details panel

 panels/network/net-device-wifi.c |  322 ++++++++++++++++++++++++++------------
 panels/network/network-wifi.ui   |  223 ++++++++++++++++++---------
 2 files changed, 372 insertions(+), 173 deletions(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 83b2b4a..8c9f114 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -52,6 +52,7 @@ struct _NetDeviceWifiPrivate
 {
         GtkBuilder              *builder;
         gboolean                 updating_device;
+        gchar                   *ssid;
 };
 
 G_DEFINE_TYPE (NetDeviceWifi, net_device_wifi, NET_TYPE_DEVICE)
@@ -133,7 +134,6 @@ add_access_point (NetDeviceWifi *device_wifi, NMAccessPoint *ap, NMAccessPoint *
         const gchar *object_path;
         GtkListStore *liststore_network;
         GtkTreeIter treeiter;
-        GtkWidget *widget;
         gboolean is_active_ap;
 
         ssid = nm_access_point_get_ssid (ap);
@@ -142,6 +142,8 @@ add_access_point (NetDeviceWifi *device_wifi, NMAccessPoint *ap, NMAccessPoint *
         ssid_text = nm_utils_escape_ssid (ssid->data, ssid->len);
 
         is_active_ap = active && nm_utils_same_ssid (ssid, nm_access_point_get_ssid (active), TRUE);
+        if (is_active_ap)
+                device_wifi->priv->ssid = g_strdup (ssid_text);
 
         liststore_network = GTK_LIST_STORE (gtk_builder_get_object (priv->builder,
                                             "liststore_network"));
@@ -159,13 +161,6 @@ add_access_point (NetDeviceWifi *device_wifi, NMAccessPoint *ap, NMAccessPoint *
                                            COLUMN_ACTIVE, is_active_ap,
                                            -1);
 
-        /* is this what we're on already? */
-        if (is_active_ap) {
-                widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
-                                                             "combobox_network_name"));
-                gtk_combo_box_set_active_iter (GTK_COMBO_BOX (widget), &treeiter);
-        }
-
 //        if (priv->arg_operation == OPERATION_CONNECT_8021X &&
 //            g_strcmp0(priv->arg_device, nm_object_get_path (NM_OBJECT (device))) == 0 &&
 //            g_strcmp0(priv->arg_access_point, object_path) == 0) {
@@ -494,11 +489,45 @@ device_get_hotspot_security_details (NetDeviceWifi *device_wifi,
 }
 
 static void
+device_wifi_refresh_aps (NetDeviceWifi *device_wifi)
+{
+        const GPtrArray *aps;
+        GPtrArray *aps_unique = NULL;
+        GtkListStore *liststore_network;
+        guint i;
+        NMAccessPoint *active_ap;
+        NMAccessPoint *ap;
+        NMDevice *nm_device;
+
+        /* clear old value */
+        g_free (device_wifi->priv->ssid);
+        device_wifi->priv->ssid = NULL;
+
+        /* populate access points */
+        liststore_network = GTK_LIST_STORE (gtk_builder_get_object (device_wifi->priv->builder,
+                                                                    "liststore_network"));
+        device_wifi->priv->updating_device = TRUE;
+        gtk_list_store_clear (liststore_network);
+        nm_device = net_device_get_nm_device (NET_DEVICE (device_wifi));
+        aps = nm_device_wifi_get_access_points (NM_DEVICE_WIFI (nm_device));
+        aps_unique = panel_get_strongest_unique_aps (aps);
+        active_ap = nm_device_wifi_get_active_access_point (NM_DEVICE_WIFI (nm_device));
+
+        for (i = 0; i < aps_unique->len; i++) {
+                ap = NM_ACCESS_POINT (g_ptr_array_index (aps_unique, i));
+                add_access_point (device_wifi, ap, active_ap, nm_device);
+        }
+        add_access_point_other (device_wifi);
+
+        device_wifi->priv->updating_device = FALSE;
+        g_ptr_array_unref (aps_unique);
+}
+
+static void
 nm_device_wifi_refresh_ui (NetDeviceWifi *device_wifi)
 {
         char *wid_name;
         const char *str;
-        const GPtrArray *aps;
         gboolean can_start_hotspot;
         gboolean is_connected;
         gboolean is_hotspot;
@@ -506,16 +535,11 @@ nm_device_wifi_refresh_ui (NetDeviceWifi *device_wifi)
         gchar *hotspot_security;
         gchar *hotspot_ssid;
         gchar *str_tmp;
-        GPtrArray *aps_unique = NULL;
         GString *string;
-        GtkListStore *liststore_network;
-        GtkWidget *heading;
         GtkWidget *sw;
         GtkWidget *widget;
-        guint i;
         guint speed = 0;
         NMAccessPoint *active_ap;
-        NMAccessPoint *ap;
         NMClientPermissionResult perm;
         NMDevice *nm_device;
         NMDeviceState state;
@@ -641,41 +665,6 @@ nm_device_wifi_refresh_ui (NetDeviceWifi *device_wifi)
                                          str_tmp);
         g_free (str_tmp);
 
-        heading = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
-                                                      "heading_network_name"));
-        widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
-                                                     "combobox_network_name"));
-        /* populate access point dropdown */
-        if (is_hotspot || state == NM_DEVICE_STATE_UNAVAILABLE) {
-                gtk_widget_hide (heading);
-                gtk_widget_hide (widget);
-        } else {
-                gtk_widget_show (heading);
-                gtk_widget_show (widget);
-                liststore_network = GTK_LIST_STORE (gtk_builder_get_object (device_wifi->priv->builder,
-                                                                                     "liststore_network"));
-                device_wifi->priv->updating_device = TRUE;
-                gtk_list_store_clear (liststore_network);
-                aps = nm_device_wifi_get_access_points (NM_DEVICE_WIFI (nm_device));
-                aps_unique = panel_get_strongest_unique_aps (aps);
-
-                for (i = 0; i < aps_unique->len; i++) {
-                        ap = NM_ACCESS_POINT (g_ptr_array_index (aps_unique, i));
-                        add_access_point (device_wifi, ap, active_ap, nm_device);
-                }
-                add_access_point_other (device_wifi);
-                if (active_ap == NULL) {
-                        widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
-                                                                     "combobox_network_name"));
-                        gtk_combo_box_set_active_iter (GTK_COMBO_BOX (widget), NULL);
-                        gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))), "");
-                }
-
-                device_wifi->priv->updating_device = FALSE;
-
-                g_ptr_array_unref (aps_unique);
-        }
-
         /* setup wireless button */
         widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
                                                      "button_forget"));
@@ -687,6 +676,9 @@ nm_device_wifi_refresh_ui (NetDeviceWifi *device_wifi)
 
         /* set IP entries */
         panel_set_device_widgets (priv->builder, nm_device);
+
+        /* update list of APs */
+        device_wifi_refresh_aps (device_wifi);
 }
 
 static void
@@ -753,32 +745,25 @@ out:
 }
 
 static void
+disconnect_button_clicked_cb (GtkButton *button, NetDeviceWifi *device_wifi)
+{
+        NMDevice *device;
+        device = net_device_get_nm_device (NET_DEVICE (device_wifi));
+        if (device == NULL)
+                return;
+        nm_device_disconnect (device, NULL, NULL);
+}
+
+static void
 forget_button_clicked_cb (GtkButton *button, NetDeviceWifi *device_wifi)
 {
-        gboolean ret;
         gchar *ssid_pretty = NULL;
-        gchar *ssid_target = NULL;
         gchar *warning = NULL;
-        GtkComboBox *combobox;
-        GtkTreeIter iter;
-        GtkTreeModel *model;
         GtkWidget *dialog;
         GtkWidget *window;
         CcNetworkPanel *panel;
 
-        combobox = GTK_COMBO_BOX (gtk_builder_get_object (device_wifi->priv->builder,
-                                                          "combobox_network_name"));
-        ret = gtk_combo_box_get_active_iter (combobox, &iter);
-        if (!ret)
-                goto out;
-
-        /* get entry */
-        model = gtk_combo_box_get_model (GTK_COMBO_BOX (combobox));
-        gtk_tree_model_get (model, &iter,
-                            COLUMN_TITLE, &ssid_target,
-                            -1);
-
-        ssid_pretty = g_strdup_printf ("<b>%s</b>", ssid_target);
+        ssid_pretty = g_strdup_printf ("<b>%s</b>", device_wifi->priv->ssid);
         warning = g_strdup_printf (_("Network details for %s including password and any custom configuration will be lost"), ssid_pretty);
         panel = net_object_get_panel (NET_OBJECT (device_wifi));
         window = gtk_widget_get_toplevel (GTK_WIDGET (panel));
@@ -795,8 +780,7 @@ forget_button_clicked_cb (GtkButton *button, NetDeviceWifi *device_wifi)
         g_signal_connect (dialog, "response",
                           G_CALLBACK (forget_network_response_cb), device_wifi);
         gtk_window_present (GTK_WINDOW (dialog));
-out:
-        g_free (ssid_target);
+
         g_free (ssid_pretty);
         g_free (warning);
 }
@@ -845,17 +829,14 @@ connection_activate_cb (NMClient *client,
 }
 
 static void
-wireless_ap_changed_cb (GtkComboBox *combo_box, NetDeviceWifi *device_wifi)
+wireless_try_to_connect (NetDeviceWifi *device_wifi,
+                         const gchar *ssid_target,
+                         const gchar *object_path)
 {
         const GByteArray *ssid;
         const gchar *ssid_tmp;
-        gboolean ret;
-        gchar *object_path = NULL;
-        gchar *ssid_target = NULL;
         GSList *list, *l;
         GSList *filtered;
-        GtkTreeIter iter;
-        GtkTreeModel *model;
         NMConnection *connection;
         NMConnection *connection_activate = NULL;
         NMDevice *device;
@@ -866,22 +847,17 @@ wireless_ap_changed_cb (GtkComboBox *combo_box, NetDeviceWifi *device_wifi)
         if (device_wifi->priv->updating_device)
                 goto out;
 
-        ret = gtk_combo_box_get_active_iter (combo_box, &iter);
-        if (!ret)
+        if (object_path == NULL || object_path[0] == 0)
                 goto out;
 
         device = net_device_get_nm_device (NET_DEVICE (device_wifi));
         if (device == NULL)
                 goto out;
 
-        /* get entry */
-        model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box));
-        gtk_tree_model_get (model, &iter,
-                            COLUMN_ID, &object_path,
-                            COLUMN_TITLE, &ssid_target,
-                            -1);
         g_debug ("try to connect to WIFI network %s [%s]",
                  ssid_target, object_path);
+
+        /* hidden networks */
         if (g_strcmp0 (object_path, "ap-other...") == 0) {
                 connect_to_hidden_network (device_wifi);
                 goto out;
@@ -933,8 +909,7 @@ wireless_ap_changed_cb (GtkComboBox *combo_box, NetDeviceWifi *device_wifi)
                                                device, object_path,
                                                connection_add_activate_cb, device_wifi);
 out:
-        g_free (ssid_target);
-        g_free (object_path);
+        return;
 }
 
 static gint
@@ -1399,6 +1374,106 @@ stop_hotspot (GtkButton *button, NetDeviceWifi *device_wifi)
 }
 
 static void
+connect_wifi_network (NetDeviceWifi *device_wifi,
+                      GtkTreeView *tv,
+                      GtkTreePath *path)
+{
+        gchar *object_path;
+        gchar *ssid;
+        GtkTreeIter iter;
+        GtkTreeModel *model;
+
+        model = gtk_tree_view_get_model (tv);
+        gtk_tree_model_get_iter (model, &iter, path);
+
+        gtk_tree_model_get (model, &iter,
+                            COLUMN_ID, &object_path,
+                            COLUMN_TITLE, &ssid,
+                            -1);
+
+        wireless_try_to_connect (device_wifi, ssid, object_path);
+
+        g_free (object_path);
+        g_free (ssid);
+}
+
+static void
+show_wifi_details (NetDeviceWifi *device_wifi,
+                   GtkTreeView *tv,
+                   GtkTreePath *path)
+{
+        GtkWidget *widget;
+
+        widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder, "notebook_view"));
+        gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 1);
+}
+
+static void
+show_wifi_list (NetDeviceWifi *device_wifi)
+{
+        GtkWidget *widget;
+        widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder, "notebook_view"));
+        gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 0);
+}
+
+static gboolean
+over_arrow (NetDeviceWifi    *device_wifi,
+            GtkTreeView       *tv,
+            GtkTreeViewColumn *col,
+            GtkTreePath       *path,
+            gint               x,
+            gint               y)
+{
+        GtkTreeModel *model;
+        GtkTreeIter iter;
+        gint width;
+
+        model = gtk_tree_view_get_model (tv);
+        gtk_tree_model_get_iter (model, &iter, path);
+
+//        if (!arrow_visible (model, &iter))
+//                return FALSE;
+
+        width = gtk_tree_view_column_get_width (col);
+
+        /* FIXME: get actual arrow size */
+        if (x < width - 20)
+                return FALSE;
+
+        return TRUE;
+}
+
+static gboolean
+wifi_button_release_event (GtkWidget      *widget,
+                           GdkEventButton *event,
+                           gpointer        user_data)
+{
+        gboolean res;
+        GtkTreePath *path;
+        GtkTreeViewColumn *col;
+        GtkTreeView *tv = GTK_TREE_VIEW (widget);
+        NetDeviceWifi *device_wifi = NET_DEVICE_WIFI (user_data);
+
+        if (event->type != GDK_BUTTON_RELEASE)
+                return TRUE;
+
+        res = gtk_tree_view_get_path_at_pos (tv,
+                                             (int) event->x, (int) event->y,
+                                             &path, &col, NULL, NULL);
+
+        if (!res)
+                return FALSE;
+
+        if (over_arrow (device_wifi, tv, col, path, event->x, event->y))
+                show_wifi_details (device_wifi, tv, path);
+        else
+                connect_wifi_network (device_wifi, tv, path);
+
+        gtk_tree_path_free (path);
+        return FALSE;
+}
+
+static void
 edit_connection (GtkButton *button, NetDeviceWifi *device_wifi)
 {
         net_object_edit (NET_OBJECT (device_wifi));
@@ -1426,6 +1501,7 @@ net_device_wifi_finalize (GObject *object)
         NetDeviceWifiPrivate *priv = device_wifi->priv;
 
         g_object_unref (priv->builder);
+        g_free (priv->ssid);
 
         G_OBJECT_CLASS (net_device_wifi_parent_class)->finalize (object);
 }
@@ -1449,8 +1525,9 @@ net_device_wifi_init (NetDeviceWifi *device_wifi)
         GError *error = NULL;
         GtkWidget *widget;
         GtkCellRenderer *renderer;
-        GtkComboBox *combobox;
         GtkTreeSortable *sortable;
+        GtkTreeViewColumn *column;
+        GtkCellArea *area;
 
         device_wifi->priv = NET_DEVICE_WIFI_GET_PRIVATE (device_wifi);
 
@@ -1464,7 +1541,7 @@ net_device_wifi_init (NetDeviceWifi *device_wifi)
                 return;
         }
 
-        /* setup wifi combobox model */
+        /* setup wifi views */
         widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
                                                      "device_off_switch"));
         g_signal_connect (widget, "notify::active",
@@ -1480,12 +1557,15 @@ net_device_wifi_init (NetDeviceWifi *device_wifi)
         g_signal_connect (widget, "clicked",
                           G_CALLBACK (forget_button_clicked_cb), device_wifi);
 
-        /* setup wireless combobox model */
-        combobox = GTK_COMBO_BOX (gtk_builder_get_object (device_wifi->priv->builder,
-                                                          "combobox_network_name"));
-        g_signal_connect (combobox, "changed",
-                          G_CALLBACK (wireless_ap_changed_cb),
-                          device_wifi);
+        widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
+                                                     "button_disconnect"));
+        g_signal_connect (widget, "clicked",
+                          G_CALLBACK (disconnect_button_clicked_cb), device_wifi);
+
+        widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
+                                                     "treeview_list"));
+        g_signal_connect (widget, "button-release-event",
+                          G_CALLBACK (wifi_button_release_event), device_wifi);
 
         /* sort networks in drop down */
         sortable = GTK_TREE_SORTABLE (gtk_builder_get_object (device_wifi->priv->builder,
@@ -1499,38 +1579,80 @@ net_device_wifi_init (NetDeviceWifi *device_wifi)
                                          device_wifi,
                                          NULL);
 
+
+        column = GTK_TREE_VIEW_COLUMN (gtk_builder_get_object (device_wifi->priv->builder,
+                                                               "treeview_list_column"));
+        area = gtk_cell_layout_get_area (GTK_CELL_LAYOUT (column));
+
+        renderer = gtk_cell_renderer_pixbuf_new ();
+        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, FALSE);
+        g_object_set (renderer,
+                      "follow-state", TRUE,
+                      "icon-name", "object-select-symbolic",
+                      NULL);
+        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (column), renderer,
+                                        "visible", COLUMN_ACTIVE,
+                                        NULL);
+        gtk_cell_area_cell_set (area, renderer, "align", TRUE, NULL);
+
+        renderer = gtk_cell_renderer_text_new ();
+        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, TRUE);
+        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (column), renderer,
+                                        "markup", COLUMN_TITLE,
+                                        NULL);
+        gtk_cell_area_cell_set (area, renderer,
+                                "align", TRUE,
+                                "expand", TRUE,
+                                NULL);
+
         renderer = panel_cell_renderer_mode_new ();
         gtk_cell_renderer_set_padding (renderer, 4, 0);
-        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
+        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column),
                                     renderer,
                                     FALSE);
-        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
+        g_object_set (renderer, "follow-state", TRUE, NULL);
+        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (column), renderer,
                                         "mode", COLUMN_MODE,
                                         NULL);
 
         renderer = panel_cell_renderer_signal_new ();
         gtk_cell_renderer_set_padding (renderer, 4, 0);
-        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
+        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column),
                                     renderer,
                                     FALSE);
-        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
+        g_object_set (renderer, "follow-state", TRUE, NULL);
+        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (column), renderer,
                                         "signal", COLUMN_STRENGTH,
                                         NULL);
 
         renderer = panel_cell_renderer_security_new ();
         gtk_cell_renderer_set_padding (renderer, 4, 0);
-        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
+        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column),
                                     renderer,
                                     FALSE);
-        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
+        g_object_set (renderer, "follow-state", TRUE, NULL);
+        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (column), renderer,
                                         "security", COLUMN_SECURITY,
                                         NULL);
 
+        renderer = gtk_cell_renderer_pixbuf_new ();
+        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, FALSE);
+        g_object_set (renderer,
+                      "follow-state", TRUE,
+                      "icon-name", "go-next-symbolic",
+                      "visible", TRUE,
+                      NULL);
+
+        widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
+                                                     "button_back"));
+        g_signal_connect_swapped (widget, "clicked",
+                                  G_CALLBACK (show_wifi_list), device_wifi);
+
         /* setup view */
         widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
                                                      "notebook_view"));
         gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE);
-        gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 1);
+        gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 0);
 
         widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
                                                      "start_hotspot_button"));
diff --git a/panels/network/network-wifi.ui b/panels/network/network-wifi.ui
index b824dfc..d4f9e7a 100644
--- a/panels/network/network-wifi.ui
+++ b/panels/network/network-wifi.ui
@@ -26,10 +26,119 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <child>
-          <object class="GtkLabel" id="label4">
+          <object class="GtkScrolledWindow" id="scrolledwindow_list">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label">label</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">never</property>
+            <child>
+              <object class="GtkViewport" id="viewport_list">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkBox" id="box_list">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkBox" id="box_list_heading">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="margin_left">12</property>
+                        <property name="margin_right">12</property>
+                        <property name="margin_top">12</property>
+                        <property name="margin_bottom">6</property>
+                        <child>
+                          <object class="GtkLabel" id="heading_list">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="halign">start</property>
+                            <property name="hexpand">True</property>
+                            <property name="label">Wireless</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                              <attribute name="scale" value="1.2"/>
+                            </attributes>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSwitch" id="device_off_switch">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="halign">end</property>
+                            <property name="valign">start</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkTreeView" id="treeview_list">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="margin_left">12</property>
+                        <property name="margin_right">12</property>
+                        <property name="margin_top">6</property>
+                        <property name="margin_bottom">7</property>
+                        <property name="hexpand">True</property>
+                        <property name="model">liststore_network</property>
+                        <property name="headers_visible">False</property>
+                        <property name="headers_clickable">False</property>
+                        <property name="search_column">0</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection" id="treeview_list_selection">
+                            <property name="mode">none</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkTreeViewColumn" id="treeview_list_column"/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="start_hotspot_button">
+                        <property name="label" translatable="yes">_Use as Hotspot...</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="halign">start</property>
+                        <property name="valign">end</property>
+                        <property name="margin_left">12</property>
+                        <property name="margin_right">12</property>
+                        <property name="margin_top">6</property>
+                        <property name="margin_bottom">12</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
           </object>
         </child>
         <child type="tab">
@@ -56,24 +165,6 @@
                 <property name="row_spacing">10</property>
                 <property name="column_spacing">6</property>
                 <child>
-                  <object class="GtkImage" id="image_device">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="halign">end</property>
-                    <property name="valign">start</property>
-                    <property name="xalign">1</property>
-                    <property name="pixel_size">48</property>
-                    <property name="icon_name">network-wireless</property>
-                    <property name="icon-size">6</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
                   <object class="GtkVBox" id="vbox3">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -294,11 +385,15 @@
                     <property name="halign">end</property>
                     <property name="valign">start</property>
                     <child>
-                      <object class="GtkSwitch" id="device_off_switch">
+                      <object class="GtkButton" id="button_disconnect">
+                        <property name="label">_Disconnect</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
                         <property name="halign">end</property>
-                        <property name="valign">start</property>
+                        <property name="valign">center</property>
+                        <property name="hexpand">True</property>
+                        <property name="use_underline">True</property>
                       </object>
                     </child>
                   </object>
@@ -328,25 +423,6 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="heading_network_name">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">1</property>
-                    <property name="label" translatable="yes">_Network Name</property>
-                    <property name="use_underline">True</property>
-                    <property name="mnemonic_widget">combobox_network_name</property>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">3</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
                   <object class="GtkLabel" id="heading_hotspot_network_name">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -396,26 +472,6 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="combobox_network_name">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="model">liststore_network</property>
-                    <property name="has_entry">True</property>
-                    <property name="entry_text_column">1</property>
-                    <child internal-child="entry">
-                      <object class="GtkEntry" id="combobox-entry">
-                        <property name="can_focus">False</property>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">3</property>
-                    <property name="width">2</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
                   <object class="GtkLabel" id="label_hotspot_network_name">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -446,22 +502,46 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButton" id="button_forget">
-                    <property name="label" translatable="yes">_Forget Network</property>
+                  <object class="GtkButton" id="button_back">
+                    <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <property name="use_underline">True</property>
+                    <property name="halign">start</property>
+                    <property name="valign">center</property>
+                    <property name="hexpand">True</property>
+                    <child>
+                      <object class="GtkArrow" id="arrow1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="arrow_type">left</property>
+                      </object>
+                    </child>
                   </object>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">4</property>
-                    <property name="width">2</property>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
                     <property name="height">1</property>
                   </packing>
                 </child>
                 <child>
                   <placeholder/>
                 </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
               </object>
               <packing>
                 <property name="expand">True</property>
@@ -475,15 +555,12 @@
                 <property name="can_focus">False</property>
                 <property name="margin_top">12</property>
                 <child>
-                  <object class="GtkButton" id="start_hotspot_button">
-                    <property name="label" translatable="yes">_Use as Hotspot...</property>
-                    <property name="visible">True</property>
+                  <object class="GtkButton" id="button_forget">
+                    <property name="label" translatable="yes">_Forget Network</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
                     <property name="halign">start</property>
                     <property name="valign">end</property>
-                    <property name="hexpand">True</property>
-                    <property name="vexpand">True</property>
                     <property name="use_underline">True</property>
                   </object>
                   <packing>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]