network-manager-applet r1033 - in trunk: . src src/wireless-security



Author: dcbw
Date: Tue Nov 18 13:05:00 2008
New Revision: 1033
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=1033&view=rev

Log:
2008-11-18  Dan Williams  <dcbw redhat com>

	* src/wireless-security/eap-method-tls.c
		- (eap_method_tls_new, revalidate): don't validate here, since the
			validation would only be for the TLS object, which may not be
			what's actually selected in the security combo

	* src/wireless-dialog.c
		- (internal_init, revalidate): instead, validate here from an idle
			handler to match revalidation done in nm-connection-editor.c.
			Fixes a bug introduced by the PKCS#12 support where the secrets
			dialog's OK button wouldn't be initially enabled



Modified:
   trunk/ChangeLog
   trunk/src/wireless-dialog.c
   trunk/src/wireless-security/eap-method-tls.c

Modified: trunk/src/wireless-dialog.c
==============================================================================
--- trunk/src/wireless-dialog.c	(original)
+++ trunk/src/wireless-dialog.c	Tue Nov 18 13:05:00 2008
@@ -868,6 +868,16 @@
 }
 
 static gboolean
+revalidate (gpointer user_data)
+{
+	NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
+	NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+
+	security_combo_changed (priv->sec_combo, self);
+	return FALSE;
+}
+
+static gboolean
 internal_init (NMAWirelessDialog *self,
                NMConnection *specific_connection,
                NMDevice *specific_device,
@@ -999,6 +1009,11 @@
 	gtk_label_set_markup (GTK_LABEL (widget), label);
 	g_free (label);
 
+	/* Re-validate from an idle handler so that widgets like file choosers
+	 * have had time to find their files.
+	 */
+	g_idle_add (revalidate, self);
+
 	return TRUE;
 }
 

Modified: trunk/src/wireless-security/eap-method-tls.c
==============================================================================
--- trunk/src/wireless-security/eap-method-tls.c	(original)
+++ trunk/src/wireless-security/eap-method-tls.c	Tue Nov 18 13:05:00 2008
@@ -412,13 +412,6 @@
 		g_signal_connect (G_OBJECT (widget), "notify::filter", (GCallback) reset_filter, filter);
 }
 
-static gboolean
-revalidate (gpointer user_data)
-{
-	wireless_security_changed_cb (NULL, (WirelessSecurity *) user_data);
-	return FALSE;
-}
-
 EAPMethodTLS *
 eap_method_tls_new (const char *glade_file,
                     WirelessSecurity *parent,
@@ -530,11 +523,6 @@
 	                  (GCallback) show_toggled_cb,
 	                  method);
 
-	/* Re-validate from an idle-handler becuase file chooser widgets set their
-	 * file asynchronously, not when gtk_file_chooser_set_filename() is called.
-	 */
-	g_idle_add (revalidate, parent);
-
 	return method;
 }
 



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