[gnome-control-center] network: Make ap list more similar to the shell menu



commit 9efba451dc8f3de47669251b12996b084b157cb8
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jun 13 21:53:12 2012 -0400

    network: Make ap list more similar to the shell menu
    
    Sort the strength and security indicators in the combo box
    popup to be in the same order as the shell menu.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677788
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 panels/network/cc-network-panel.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 2716e8b..75eb773 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -3561,6 +3561,18 @@ cc_network_panel_init (CcNetworkPanel *panel)
                           G_CALLBACK (wireless_ap_changed_cb),
                           panel);
 
+        /* sort networks in drop down */
+        sortable = GTK_TREE_SORTABLE (gtk_builder_get_object (panel->priv->builder,
+                                                              "liststore_wireless_network"));
+        gtk_tree_sortable_set_sort_column_id (sortable,
+                                              PANEL_WIRELESS_COLUMN_SORT,
+                                              GTK_SORT_ASCENDING);
+        gtk_tree_sortable_set_sort_func (sortable,
+                                         PANEL_WIRELESS_COLUMN_SORT,
+                                         wireless_ap_model_sort_cb,
+                                         sortable,
+                                         NULL);
+
         renderer = panel_cell_renderer_mode_new ();
         gtk_cell_renderer_set_padding (renderer, 4, 0);
         gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
@@ -3570,34 +3582,22 @@ cc_network_panel_init (CcNetworkPanel *panel)
                                         "mode", PANEL_WIRELESS_COLUMN_MODE,
                                         NULL);
 
-        renderer = panel_cell_renderer_security_new ();
+        renderer = panel_cell_renderer_signal_new ();
         gtk_cell_renderer_set_padding (renderer, 4, 0);
         gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
                                     renderer,
                                     FALSE);
         gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
-                                        "security", PANEL_WIRELESS_COLUMN_SECURITY,
+                                        "signal", PANEL_WIRELESS_COLUMN_STRENGTH,
                                         NULL);
 
-        /* sort networks in drop down */
-        sortable = GTK_TREE_SORTABLE (gtk_builder_get_object (panel->priv->builder,
-                                                              "liststore_wireless_network"));
-        gtk_tree_sortable_set_sort_column_id (sortable,
-                                              PANEL_WIRELESS_COLUMN_SORT,
-                                              GTK_SORT_ASCENDING);
-        gtk_tree_sortable_set_sort_func (sortable,
-                                         PANEL_WIRELESS_COLUMN_SORT,
-                                         wireless_ap_model_sort_cb,
-                                         sortable,
-                                         NULL);
-
-        renderer = panel_cell_renderer_signal_new ();
+        renderer = panel_cell_renderer_security_new ();
         gtk_cell_renderer_set_padding (renderer, 4, 0);
         gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combobox),
                                     renderer,
                                     FALSE);
         gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer,
-                                        "signal", PANEL_WIRELESS_COLUMN_STRENGTH,
+                                        "security", PANEL_WIRELESS_COLUMN_SECURITY,
                                         NULL);
 
         /* use NetworkManager client */



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