[gnumeric] Fix toolbar accept menu sensitivity



commit e92f2fe1cb9026f37e1f45909754c56636478cd9
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Fri Aug 5 11:49:35 2011 -0600

    Fix toolbar accept menu sensitivity
    
    2011-08-05 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/wbc-gtk.c (edit_area_button_menu): make sure everything is
    	initially insensitive

 ChangeLog     |    5 +++++
 src/wbc-gtk.c |    6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2223591..0b9b16b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-04 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* src/wbc-gtk.c (edit_area_button_menu): make sure everything is
+	initially insensitive
+
 2011-08-05  Jean Brefort  <jean brefort normalesup org>
 
 	* src/graph.c (gnm_go_data_vector_finalize), (cb_assign_markup),
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 3ba9fe8..4c1bec2 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -2317,19 +2317,19 @@ edit_area_button_menu (WBCGtk *wbcg, GtkToolbar *tb,
 	GObject *button =
 		g_object_new (GTK_TYPE_MENU_TOOL_BUTTON,
 			      "stock-id", stock_id,
-			      "sensitive", sensitive,
 			      "can-focus", FALSE,
 			      NULL);
 	gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), tip);
 	g_signal_connect_swapped (button, "clicked", func, wbcg);
 	gtk_toolbar_insert (tb, GTK_TOOL_ITEM (button), -1);
 	gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (button),
-				      gtk_menu_new ());
+				       gtk_menu_new ());
 	if (menu_func != NULL)
 		g_signal_connect (button, "show-menu", menu_func, wbcg);
 	gtk_menu_tool_button_set_arrow_tooltip_text
 		(GTK_MENU_TOOL_BUTTON (button), menu_tip);
 
+	gtk_widget_set_sensitive (GTK_WIDGET (button), sensitive);
 	return GTK_WIDGET (button);
 }
 
@@ -4227,7 +4227,7 @@ static struct ToolbarInfo {
 	{ "FormatToolbar", N_("Format Toolbar"), NULL },
 	{ "LongFormatToolbar", N_("Long Format Toolbar"), NULL },
 	{ "ObjectToolbar", N_("Object Toolbar"), NULL },
-	{ NULL }
+	{ NULL, NULL, NULL }
 };
 
 



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