[network-manager-applet/jk/wifi-ap-mode-bgo755663: 2/4] editor: move Ad-Hoc mode to the end, rename "Infrastructure" to "Client"



commit ad87bfed4eb4cc64224a6d042132735908721770
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 0bb91b8..cc58fa8 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 3b39558..3ac3481 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -249,8 +249,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.
@@ -339,9 +339,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);
@@ -510,10 +510,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]