panel/menu properties patch



Is this the right place for patches, or should they go to gnome-devel?

Anyhow, this makes the menu properties dialog have frames desensitized
as necessary when the dialog is created. (eg. right click the foot,
properties - the 'menu type' buttons choose what is desensitized, but
not when the dialog is created).

Can someone please apply this?

And what could be the cause of the message "An error occured while
loading or saving configuration information for (null)..." the first
time I click on the foot menu after starting the panel? I'm mostly on
the dev. platform beta, + gconf & gnome-core from CVS.

Thanks;

mibus

-- 
Robert Mibus <mibus bigpond com>
Polar bear: a Cartesian bear after a coordinate transform.
Index: menu-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-core/panel/menu-properties.c,v
retrieving revision 1.47
diff -u -r1.47 menu-properties.c
--- menu-properties.c	2001/12/14 13:05:18	1.47
+++ menu-properties.c	2001/12/17 04:18:47
@@ -455,6 +455,7 @@
 	if (menu->main_menu &&
 	    menu->global_main)
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), TRUE);
+
 	g_signal_connect (G_OBJECT (w), "toggled", 
 			  G_CALLBACK (toggle_global_main), 
 			  menu);
@@ -468,6 +469,7 @@
 	if (menu->main_menu &&
 	    ! menu->global_main)
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), TRUE);
+
 	g_signal_connect (G_OBJECT (w), "toggled", 
 			  G_CALLBACK (toggle_main_menu), 
 			  menu);
@@ -478,6 +480,7 @@
 		  _("Normal menu"));
 	if ( ! menu->main_menu)
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w2), TRUE);
+
 	g_signal_connect (G_OBJECT (w2), "toggled", 
 			  G_CALLBACK (toggle_normal_menu), 
 			  menu);
@@ -614,6 +617,20 @@
 	g_signal_connect (G_OBJECT (dialog), "response",
 			  G_CALLBACK (dialog_response),
 			  menu);
+
+	/* Set the sensitivity of the frames as req'd. */
+	if (menu->main_menu) {
+		if (menu->global_main) {
+			gtk_widget_set_sensitive(menu->dialog_info->main_frame, FALSE);
+			gtk_widget_set_sensitive(menu->dialog_info->normal_frame, FALSE);
+		} else {
+			gtk_widget_set_sensitive(menu->dialog_info->main_frame, TRUE);
+			gtk_widget_set_sensitive(menu->dialog_info->normal_frame, FALSE);
+		}
+	} else {
+		gtk_widget_set_sensitive(menu->dialog_info->main_frame, FALSE);
+		gtk_widget_set_sensitive(menu->dialog_info->normal_frame, TRUE);
+	}
 
 	return dialog;
 }


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