[patch] make 'Wireless Network Discovery' menu items radios
- From: Robert Love <rml novell com>
- To: networkmanager list <networkmanager-list gnome org>
- Subject: [patch] make 'Wireless Network Discovery' menu items radios
- Date: Sat, 25 Jun 2005 23:01:25 -0400
Hey,
The 'Wireless Network Discovery' menu items are drawn as check boxes,
but they have the properties of radio items: a given item cannot be
unselected, the items are mutually exclusive, and so on.
Attached patch draws the three menu items as radios.
May I apply?
Robert Love
Index: gnome/applet/applet.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet.c,v
retrieving revision 1.17
diff -u -u -r1.17 applet.c
--- gnome/applet/applet.c 23 Jun 2005 20:34:57 -0000 1.17
+++ gnome/applet/applet.c 26 Jun 2005 02:54:42 -0000
@@ -1805,6 +1805,7 @@
applet->scanning_menu = gtk_menu_new ();
scanning_subitem = GTK_WIDGET (gtk_check_menu_item_new_with_label (_("Always Search")));
+ gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
g_object_set_data (G_OBJECT (scanning_subitem), "scan_method", GUINT_TO_POINTER (NM_SCAN_METHOD_ALWAYS));
if (applet->scan_method == NM_SCAN_METHOD_ALWAYS)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
@@ -1812,6 +1813,7 @@
gtk_menu_shell_append (GTK_MENU_SHELL (applet->scanning_menu), GTK_WIDGET (scanning_subitem));
scanning_subitem = GTK_WIDGET (gtk_check_menu_item_new_with_label (_("Search Only When Disconnected")));
+ gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
g_object_set_data (G_OBJECT (scanning_subitem), "scan_method", GINT_TO_POINTER (NM_SCAN_METHOD_WHEN_UNASSOCIATED));
if (applet->scan_method == NM_SCAN_METHOD_WHEN_UNASSOCIATED)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
@@ -1819,6 +1821,7 @@
gtk_menu_shell_append (GTK_MENU_SHELL (applet->scanning_menu), GTK_WIDGET (scanning_subitem));
scanning_subitem = GTK_WIDGET (gtk_check_menu_item_new_with_label (_("Never Search")));
+ gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
g_object_set_data (G_OBJECT (scanning_subitem), "scan_method", GINT_TO_POINTER (NM_SCAN_METHOD_NEVER));
if (applet->scan_method == NM_SCAN_METHOD_NEVER)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]