[network-manager-applet: 2/7] editor: move Ad-Hoc mode to the end, rename "Infrastructure" to "Client"



commit 4cf81f629022b6518cdf83f7c5deadfd1e036318
Author: Jiří Klimeš <jklimes redhat com>
Date:   Fri Oct 2 13:26:33 2015 +0200

    editor: move Ad-Hoc mode to the end, rename "Infrastructure" to "Client"
    
    as suggested in https://bugzilla.redhat.com/show_bug.cgi?id=970752#c4

 src/connection-editor/ce-page-wifi.ui |    6 +++---
 src/connection-editor/page-wifi.c     |   12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/connection-editor/ce-page-wifi.ui b/src/connection-editor/ce-page-wifi.ui
index 050c516..1ab2f2b 100644
--- a/src/connection-editor/ce-page-wifi.ui
+++ b/src/connection-editor/ce-page-wifi.ui
@@ -45,13 +45,13 @@
     </columns>
     <data>
       <row>
-        <col id="0" translatable="yes">Infrastructure</col>
+        <col id="0" translatable="yes">Client</col>
       </row>
       <row>
-        <col id="0" translatable="yes">Ad-hoc</col>
+        <col id="0" translatable="yes">Hotspot</col>
       </row>
       <row>
-        <col id="0" translatable="yes">Hotspot</col>
+        <col id="0" translatable="yes">Ad-hoc</col>
       </row>
     </data>
   </object>
diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c
index b169306..1724ec3 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -246,8 +246,8 @@ mode_combo_changed_cb (GtkComboBox *combo,
        gboolean show_bssid = TRUE;
 
        switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combo))) {
-       case 2: /* hotspot */
-       case 1: /* adhoc */
+       case 1: /* hotspot */
+       case 2: /* adhoc */
                /* BSSID is random and is created by kernel for Ad-Hoc networks
                 * http://lxr.linux.no/linux+v3.7.6/net/mac80211/ibss.c#L685
                 * For AP-mode, the BSSID is the MAC address of the device.
@@ -332,9 +332,9 @@ populate_ui (CEPageWifi *self)
 
        /* Default to Infrastructure */
        gtk_combo_box_set_active (priv->mode, 0);
-       if (!g_strcmp0 (mode, "adhoc"))
-               gtk_combo_box_set_active (priv->mode, 1);
        if (!g_strcmp0 (mode, "ap"))
+               gtk_combo_box_set_active (priv->mode, 1);
+       if (!g_strcmp0 (mode, "adhoc"))
                gtk_combo_box_set_active (priv->mode, 2);
        mode_combo_changed_cb (priv->mode, self);
        g_signal_connect (priv->mode, "changed", G_CALLBACK (mode_combo_changed_cb), self);
@@ -499,10 +499,10 @@ ui_to_setting (CEPageWifi *self)
 
        switch (gtk_combo_box_get_active (priv->mode)) {
        case 1:
-               mode = "adhoc";
+               mode = "ap";
                break;
        case 2:
-               mode = "ap";
+               mode = "adhoc";
                break;
        default:
                mode = "infrastructure";


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