Re: [patch] make "Wired" option a radio



if i have 2 network adapters why wouldn't i be able to use both of them at the same time? windows boxes allow it.

Robert Love wrote:
We're back!

I've mentioned before (see email subj "the wired checkbox.") that the
Wired menu items don't make sense as check boxes.  You cannot unselect
it, it is a mutually exclusive option with the wireless radio buttons,
and so on.  The behavior is identical to a radio button.

Attached patch makes the "Wired" menu items radio buttons, part of the
same group as the wireless networks.

May I apply?

	Robert Love



------------------------------------------------------------------------

Index: gnome/applet/applet.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet.c,v
retrieving revision 1.18
diff -u -u -r1.18 applet.c
--- gnome/applet/applet.c	27 Jun 2005 14:00:58 -0000	1.18
+++ gnome/applet/applet.c	30 Jun 2005 14:48:33 -0000
@@ -1283,9 +1284,11 @@
 		{
 			NMWiredMenuItem *item = wired_menu_item_new ();
 			GtkCheckMenuItem *gtk_item = wired_menu_item_get_check_item (item);
-		     wired_menu_item_update (item, device, n_devices);
+
+			wired_menu_item_update (item, device, n_devices);
 			if (network_device_get_active (device))
 				gtk_check_menu_item_set_active (gtk_item, TRUE);
+			gtk_check_menu_item_set_draw_as_radio (gtk_item, TRUE);
g_object_set_data (G_OBJECT (gtk_item), "device", g_strdup (network_device_get_nm_path (device)));
 			g_object_set_data (G_OBJECT (gtk_item), "nm-item-data", item);
@@ -1300,6 +1303,7 @@
 		{
 			NMWirelessMenuItem *item = wireless_menu_item_new ();
 			GtkMenuItem *gtk_item = wireless_menu_item_get_item (item);
+
 		     wireless_menu_item_update (item, device, n_devices);
g_object_set_data (G_OBJECT (gtk_item), "device", g_strdup (network_device_get_nm_path (device)));


------------------------------------------------------------------------

_______________________________________________
NetworkManager-list mailing list
NetworkManager-list gnome org
http://mail.gnome.org/mailman/listinfo/networkmanager-list

--
Jason Mellein, 1st Lt, USAF
MIT Leaders for Manufacturing Fellow – Class of 2007
MBA Candidate, Sloan School of Management
MS Candidate, Engineering Systems
e: mellein mit edu
m: 617.803.6955



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