gtk+ r22218 - in trunk: . gtk



Author: matthiasc
Date: Mon Jan 26 03:01:01 2009
New Revision: 22218
URL: http://svn.gnome.org/viewvc/gtk+?rev=22218&view=rev

Log:
More action-related fixes


Modified:
   trunk/ChangeLog
   trunk/gtk/gtkrecentchoosermenu.c
   trunk/gtk/gtktoggletoolbutton.c
   trunk/gtk/gtktoolbutton.c
   trunk/gtk/gtktoolitem.c
   trunk/gtk/gtktoolitem.h

Modified: trunk/gtk/gtkrecentchoosermenu.c
==============================================================================
--- trunk/gtk/gtkrecentchoosermenu.c	(original)
+++ trunk/gtk/gtkrecentchoosermenu.c	Mon Jan 26 03:01:01 2009
@@ -970,6 +970,8 @@
 
 	  return FALSE;
 	}
+      else
+        gtk_widget_hide (pdata->placeholder);
       
       pdata->n_items = g_list_length (pdata->items);
       pdata->loaded_items = 0;
@@ -1056,9 +1058,8 @@
 
   priv->icon_size = get_icon_size_for_widget (GTK_WIDGET (menu));
   
-  /* remove our menu items first and hide the placeholder */
+  /* remove our menu items first */
   gtk_recent_chooser_menu_dispose_items (menu);
-  gtk_widget_hide (priv->placeholder);
   
   priv->populate_id = gdk_threads_add_idle_full (G_PRIORITY_HIGH_IDLE + 30,
   					         idle_populate_func,

Modified: trunk/gtk/gtktoggletoolbutton.c
==============================================================================
--- trunk/gtk/gtktoggletoolbutton.c	(original)
+++ trunk/gtk/gtktoggletoolbutton.c	Mon Jan 26 03:01:01 2009
@@ -201,10 +201,16 @@
   GtkStockItem stock_item;
   gboolean use_mnemonic = TRUE;
   const char *label;
-
-  GtkWidget *label_widget = gtk_tool_button_get_label_widget (tool_button);
-  const gchar *label_text = gtk_tool_button_get_label (tool_button);
-  const gchar *stock_id = gtk_tool_button_get_stock_id (tool_button);
+  GtkWidget *label_widget;
+  const gchar *label_text;
+  const gchar *stock_id;
+
+  if (_gtk_tool_item_create_menu_proxy (item))
+    return TRUE;
+
+  label_widget = gtk_tool_button_get_label_widget (tool_button);
+  label_text = gtk_tool_button_get_label (tool_button);
+  stock_id = gtk_tool_button_get_stock_id (tool_button);
 
   if (GTK_IS_LABEL (label_widget))
     {

Modified: trunk/gtk/gtktoolbutton.c
==============================================================================
--- trunk/gtk/gtktoolbutton.c	(original)
+++ trunk/gtk/gtktoolbutton.c	Mon Jan 26 03:01:01 2009
@@ -642,6 +642,9 @@
   gboolean use_mnemonic = TRUE;
   const char *label;
 
+  if (_gtk_tool_item_create_menu_proxy (item))
+    return TRUE;
+ 
   if (GTK_IS_LABEL (button->priv->label_widget))
     {
       label = gtk_label_get_label (GTK_LABEL (button->priv->label_widget));

Modified: trunk/gtk/gtktoolitem.c
==============================================================================
--- trunk/gtk/gtktoolitem.c	(original)
+++ trunk/gtk/gtktoolitem.c	Mon Jan 26 03:01:01 2009
@@ -127,8 +127,6 @@
 						const gchar *tip_text,
 						const gchar *tip_private);
 
-static gboolean gtk_tool_item_create_menu_proxy (GtkToolItem *item);
-
 static void gtk_tool_item_activatable_interface_init (GtkActivatableIface  *iface);
 static void gtk_tool_item_activatable_update         (GtkActivatable       *activatable,
 						      GtkAction            *action,
@@ -169,7 +167,7 @@
   widget_class->size_allocate = gtk_tool_item_size_allocate;
   widget_class->parent_set    = gtk_tool_item_parent_set;
 
-  klass->create_menu_proxy = gtk_tool_item_create_menu_proxy;
+  klass->create_menu_proxy = _gtk_tool_item_create_menu_proxy;
   klass->set_tooltip       = gtk_tool_item_real_set_tooltip;
   
   g_object_class_install_property (object_class,
@@ -554,8 +552,8 @@
     }
 }
 
-static gboolean
-gtk_tool_item_create_menu_proxy (GtkToolItem *item)
+gboolean
+_gtk_tool_item_create_menu_proxy (GtkToolItem *item)
 {
   GtkWidget *menu_item;
   gboolean visible_overflown;
@@ -574,6 +572,8 @@
 	}
       else
 	gtk_tool_item_set_proxy_menu_item (item, "gtk-action-menu-item", NULL);
+
+      return TRUE;
     }
 
   return FALSE;

Modified: trunk/gtk/gtktoolitem.h
==============================================================================
--- trunk/gtk/gtktoolitem.h	(original)
+++ trunk/gtk/gtktoolitem.h	Mon Jan 26 03:01:01 2009
@@ -128,6 +128,10 @@
 
 void            gtk_tool_item_toolbar_reconfigured     (GtkToolItem *tool_item);
 
+/* private */
+
+gboolean       _gtk_tool_item_create_menu_proxy        (GtkToolItem *tool_item);
+
 G_END_DECLS
 
 #endif /* __GTK_TOOL_ITEM_H__ */



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