[patch] make "Wired" option a radio



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)));


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