[network-manager-netbook] Fix "Show Password" checkboxes on wireless security pages.



commit 7f9f8dd75176c4da515b60a73f9f3b93b98270c3
Author: Tambet Ingo <tambet gmail com>
Date:   Fri Jul 17 11:27:43 2009 +0300

    Fix "Show Password" checkboxes on wireless security pages.

 src/wireless-security.ui                  |   28 ++++++++++++++++++----------
 src/wireless-security/eap-method-leap.c   |    2 +-
 src/wireless-security/eap-method-simple.c |    2 +-
 src/wireless-security/eap-method-tls.c    |    2 +-
 src/wireless-security/ws-leap.c           |    2 +-
 src/wireless-security/ws-wep-key.c        |   16 ++++++++--------
 src/wireless-security/ws-wpa-psk.c        |    2 +-
 7 files changed, 31 insertions(+), 23 deletions(-)
---
diff --git a/src/wireless-security.ui b/src/wireless-security.ui
index 5529cec..986d66c 100644
--- a/src/wireless-security.ui
+++ b/src/wireless-security.ui
@@ -335,6 +335,8 @@
                 <property name="use_stock">True</property>
               </object>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">0</property>
               </packing>
             </child>
@@ -383,6 +385,8 @@
                 </child>
               </object>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
@@ -450,7 +454,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkCheckButton" id="show_checkbutton">
+              <object class="GtkCheckButton" id="wep_key_show_checkbutton">
                 <property name="label" translatable="yes">Show key</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -468,7 +472,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="auth_method_label">
+              <object class="GtkLabel" id="wep_key_auth_method_label">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Authentication:</property>
@@ -481,7 +485,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkComboBox" id="auth_method_combo">
+              <object class="GtkComboBox" id="wep_key_auth_method_combo">
                 <property name="visible">True</property>
                 <property name="model">model3</property>
                 <child>
@@ -501,7 +505,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="key_index_label">
+              <object class="GtkLabel" id="wep_key_index_label">
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">WEP Index:</property>
@@ -514,7 +518,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkComboBox" id="key_index_combo">
+              <object class="GtkComboBox" id="wep_key_index_combo">
                 <property name="visible">True</property>
                 <property name="model">model4</property>
                 <child>
@@ -599,7 +603,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkCheckButton" id="show_checkbutton">
+              <object class="GtkCheckButton" id="leap_show_checkbutton">
                 <property name="label" translatable="yes">Show password</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -708,7 +712,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkCheckButton" id="show_checkbutton">
+              <object class="GtkCheckButton" id="wpa_psk_show_checkbutton">
                 <property name="label" translatable="yes">Show password</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -948,7 +952,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkCheckButton" id="show_checkbutton">
+              <object class="GtkCheckButton" id="eap_tls_show_checkbutton">
                 <property name="label" translatable="yes">Show password</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -1047,7 +1051,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkCheckButton" id="show_checkbutton">
+              <object class="GtkCheckButton" id="eap_leap_show_checkbutton">
                 <property name="label" translatable="yes">Show password</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -1266,7 +1270,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkCheckButton" id="show_checkbutton">
+              <object class="GtkCheckButton" id="eap_simple_show_checkbutton">
                 <property name="label" translatable="yes">Show password</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -1495,6 +1499,8 @@
                 </child>
               </object>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">0</property>
               </packing>
             </child>
@@ -1542,6 +1548,8 @@
                 </child>
               </object>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
diff --git a/src/wireless-security/eap-method-leap.c b/src/wireless-security/eap-method-leap.c
index 1f2b3e1..150c033 100644
--- a/src/wireless-security/eap-method-leap.c
+++ b/src/wireless-security/eap-method-leap.c
@@ -156,7 +156,7 @@ eap_method_leap_new (GtkBuilder *builder,
 		                          NM_SETTING_802_1X_PASSWORD);
 	}
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_leap_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
diff --git a/src/wireless-security/eap-method-simple.c b/src/wireless-security/eap-method-simple.c
index 022cbe8..f050d07 100644
--- a/src/wireless-security/eap-method-simple.c
+++ b/src/wireless-security/eap-method-simple.c
@@ -179,7 +179,7 @@ eap_method_simple_new (GtkBuilder *builder,
 		                          NM_SETTING_802_1X_PASSWORD);
 	}
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_simple_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
diff --git a/src/wireless-security/eap-method-tls.c b/src/wireless-security/eap-method-tls.c
index c303547..fac95d3 100644
--- a/src/wireless-security/eap-method-tls.c
+++ b/src/wireless-security/eap-method-tls.c
@@ -409,7 +409,7 @@ eap_method_tls_new (GtkBuilder *builder,
 	                  parent, method, connection,
 	                  phase2 ? NMA_PATH_PHASE2_PRIVATE_KEY_TAG : NMA_PATH_PRIVATE_KEY_TAG);
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_tls_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
diff --git a/src/wireless-security/ws-leap.c b/src/wireless-security/ws-leap.c
index ac69424..f5e4282 100644
--- a/src/wireless-security/ws-leap.c
+++ b/src/wireless-security/ws-leap.c
@@ -169,7 +169,7 @@ ws_leap_new (GtkBuilder *builder, NMConnection *connection)
 	if (wsec)
 		gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_wireless_security_get_leap_username (wsec));
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "leap_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
diff --git a/src/wireless-security/ws-wep-key.c b/src/wireless-security/ws-wep-key.c
index a38f3bb..6f83827 100644
--- a/src/wireless-security/ws-wep-key.c
+++ b/src/wireless-security/ws-wep-key.c
@@ -124,13 +124,13 @@ add_to_size_group (WirelessSecurity *parent, GtkSizeGroup *group)
 {
 	GtkWidget *widget;
 
-	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "auth_method_label"));
+	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_auth_method_label"));
 	gtk_size_group_add_widget (group, widget);
 
 	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_label"));
 	gtk_size_group_add_widget (group, widget);
 
-	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "key_index_label"));
+	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_index_label"));
 	gtk_size_group_add_widget (group, widget);
 }
 
@@ -175,7 +175,7 @@ fill_connection (WirelessSecurity *parent, NMConnection *connection)
 	char *hashed = NULL;
 	int i;
 
-	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "auth_method_combo"));
+	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_auth_method_combo"));
 	auth_alg = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
 
 	widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_entry"));
@@ -368,7 +368,7 @@ ws_wep_key_new (GtkBuilder *builder,
 	else if (sec->type == WEP_KEY_TYPE_PASSPHRASE)
 		gtk_entry_set_max_length (GTK_ENTRY (widget), 64);
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "key_index_combo"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_index_combo"));
 	if (connection && s_wsec)
 		default_key_idx = nm_setting_wireless_security_get_wep_tx_keyidx (s_wsec);
 
@@ -381,7 +381,7 @@ ws_wep_key_new (GtkBuilder *builder,
 	/* Key index is useless with adhoc networks */
 	if (is_adhoc) {
 		gtk_widget_hide (widget);
-		widget = GTK_WIDGET (gtk_builder_get_object (builder, "key_index_label"));
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_index_label"));
 		gtk_widget_hide (widget);
 	}
 
@@ -390,13 +390,13 @@ ws_wep_key_new (GtkBuilder *builder,
 	if (strlen (sec->keys[default_key_idx]))
 		gtk_entry_set_text (GTK_ENTRY (widget), sec->keys[default_key_idx]);
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,
 	                  sec);
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "auth_method_combo"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_auth_method_combo"));
 	gtk_combo_box_set_active (GTK_COMBO_BOX (widget), is_shared_key ? 1 : 0);
 
 	g_signal_connect (G_OBJECT (widget), "changed",
@@ -407,7 +407,7 @@ ws_wep_key_new (GtkBuilder *builder,
 	if (is_adhoc) {
 		gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
 		gtk_widget_hide (widget);
-		widget = GTK_WIDGET (gtk_builder_get_object (builder, "auth_method_label"));
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_auth_method_label"));
 		gtk_widget_hide (widget);
 	}
 
diff --git a/src/wireless-security/ws-wpa-psk.c b/src/wireless-security/ws-wpa-psk.c
index 184da2c..f0a1c07 100644
--- a/src/wireless-security/ws-wpa-psk.c
+++ b/src/wireless-security/ws-wpa-psk.c
@@ -195,7 +195,7 @@ ws_wpa_psk_new (GtkBuilder *builder, NMConnection *connection)
 		                          NM_SETTING_WIRELESS_SECURITY_PSK);
 	}
 
-	widget = GTK_WIDGET (gtk_builder_get_object (builder, "show_checkbutton"));
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "wpa_psk_show_checkbutton"));
 	g_assert (widget);
 	g_signal_connect (G_OBJECT (widget), "toggled",
 	                  (GCallback) show_toggled_cb,



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