rpms/gtk2/devel radio-proxy.patch, NONE, 1.1 tool-proxy.patch, NONE, 1.1 gtk2.spec, 1.346, 1.347

Matthias Clasen mclasen at fedoraproject.org
Mon Jan 26 03:03:56 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/gtk2/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15294

Modified Files:
	gtk2.spec 
Added Files:
	radio-proxy.patch tool-proxy.patch 
Log Message:
Fix more action issues


radio-proxy.patch:

--- NEW FILE radio-proxy.patch ---
diff -up gtk+-2.15.1/gtk/gtkradioaction.c.radio-proxy gtk+-2.15.1/gtk/gtkradioaction.c
--- gtk+-2.15.1/gtk/gtkradioaction.c.radio-proxy	2009-01-25 19:00:44.000000000 -0500
+++ gtk+-2.15.1/gtk/gtkradioaction.c	2009-01-25 19:01:09.000000000 -0500
@@ -176,6 +176,8 @@ gtk_radio_action_init (GtkRadioAction *a
   action->private_data = GTK_RADIO_ACTION_GET_PRIVATE (action);
   action->private_data->group = g_slist_prepend (NULL, action);
   action->private_data->value = 0;
+
+  gtk_toggle_action_set_draw_as_radio (GTK_TOGGLE_ACTION (action), TRUE);
 }
 
 /**

tool-proxy.patch:

--- NEW FILE tool-proxy.patch ---
Index: gtk/gtktoggletoolbutton.c
===================================================================
--- gtk/gtktoggletoolbutton.c	(revision 22216)
+++ gtk/gtktoggletoolbutton.c	(working copy)
@@ -201,11 +201,17 @@
   GtkStockItem stock_item;
   gboolean use_mnemonic = TRUE;
   const char *label;
+  GtkWidget *label_widget;
+  const gchar *label_text;
+  const gchar *stock_id;
 
-  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);
+  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))
     {
       label = gtk_label_get_label (GTK_LABEL (label_widget));
Index: gtk/gtktoolbutton.c
===================================================================
--- gtk/gtktoolbutton.c	(revision 22216)
+++ gtk/gtktoolbutton.c	(working copy)
@@ -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));
Index: gtk/gtkrecentchoosermenu.c
===================================================================
--- gtk/gtkrecentchoosermenu.c	(revision 22216)
+++ gtk/gtkrecentchoosermenu.c	(working copy)
@@ -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,
Index: gtk/gtktoolitem.c
===================================================================
--- gtk/gtktoolitem.c	(revision 22216)
+++ gtk/gtktoolitem.c	(working copy)
@@ -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;
Index: gtk/gtktoolitem.h
===================================================================
--- gtk/gtktoolitem.h	(revision 22216)
+++ gtk/gtktoolitem.h	(working copy)
@@ -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__ */


Index: gtk2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gtk2/devel/gtk2.spec,v
retrieving revision 1.346
retrieving revision 1.347
diff -u -r1.346 -r1.347
--- gtk2.spec	25 Jan 2009 03:42:16 -0000	1.346
+++ gtk2.spec	26 Jan 2009 03:03:26 -0000	1.347
@@ -16,7 +16,7 @@
 Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
 Name: gtk2
 Version: %{base_version}
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 Source: http://download.gnome.org/sources/gtk+/2.15/gtk+-%{version}.tar.bz2
@@ -30,10 +30,12 @@
 Patch2: workaround.patch
 # http://bugzilla.redhat.com/show_bug.cgi?id=478400
 Patch3: default_printer.patch
+
 # fixed upstream
 Patch4: activatable-toolitem.patch
-# fixed upstream
 Patch5: imcontext-reset.patch
+Patch6: radio-proxy.patch
+Patch7: tool-proxy.patch
 
 BuildRequires: atk-devel >= %{atk_version}
 BuildRequires: pango-devel >= %{pango_version}
@@ -123,6 +125,8 @@
 %patch3 -p0 -b .default-printer
 %patch4 -p0 -b .activatable-toolitem
 %patch5 -p0 -b .imcontext-reset
+%patch6 -p1 -b .radio-proxy
+%patch7 -p1 -b .tool-proxy
 
 %build
 libtoolize --force --copy
@@ -300,6 +304,10 @@
 %{_datadir}/gtk-2.0
 
 %changelog
+* Sun Jan 25 2009 Matthias Clasen <mclasen at redhat.com> - 2.15.1-4
+- Draw radio action proxies as radio menuitems
+- Fix issues with toolitem action proxies and overflow
+
 * Sat Jan 24 2009 Matthias Clasen <mclasen at redhat.com> - 2.15.1-3
 - Avoid triggering an assertion that makes the gdm greeter nonfunctional
 




More information about the fedora-extras-commits mailing list