gnome-system-tools r4130 - trunk/src/network



Author: carlosg
Date: Wed Feb  6 01:28:03 2008
New Revision: 4130
URL: http://svn.gnome.org/viewvc/gnome-system-tools?rev=4130&view=rev

Log:
2008-02-06  Carlos Garnacho  <carlosg gnome org>

        * connection.c: Check the dialog fields when the essid changes, do not
        take a wifi interface without essid as configured.


Modified:
   trunk/src/network/ChangeLog
   trunk/src/network/connection.c

Modified: trunk/src/network/connection.c
==============================================================================
--- trunk/src/network/connection.c	(original)
+++ trunk/src/network/connection.c	Wed Feb  6 01:28:03 2008
@@ -26,6 +26,7 @@
 #include "connection.h"
 #include "essid-list.h"
 #include "nm-integration.h"
+#include "callbacks.h"
 
 extern GstTool *tool;
 
@@ -138,6 +139,9 @@
 
   /* reuse text cell renderer for the essid */
   gtk_combo_box_entry_set_text_column (combo, 1);
+
+  g_signal_connect (GTK_BIN (combo)->child, "changed",
+		    G_CALLBACK (on_dialog_changed), tool);
 }
 
 static void
@@ -340,6 +344,12 @@
   g_free (key_type);
 }
 
+static gboolean
+wireless_dialog_check_fields (GstConnectionDialog *dialog)
+{
+  return (get_entry_text (GTK_BIN (dialog->essid)->child) != NULL);
+}
+
 static void
 plip_dialog_prepare (GstConnectionDialog *dialog)
 {
@@ -816,8 +826,10 @@
 {
   gboolean active = FALSE;
 
-  if (OOBS_IS_IFACE_ETHERNET (dialog->iface) ||
-      OOBS_IS_IFACE_WIRELESS (dialog->iface) ||
+  if (OOBS_IS_IFACE_WIRELESS (dialog->iface))
+    active = (ethernet_dialog_check_fields (dialog) &&
+	      wireless_dialog_check_fields (dialog));
+  else if (OOBS_IS_IFACE_ETHERNET (dialog->iface) ||
       OOBS_IS_IFACE_IRLAN    (dialog->iface))
     active = ethernet_dialog_check_fields (dialog);
   else if (OOBS_IS_IFACE_PLIP (dialog->iface))



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