From 072fd2cf1937c4339a56885758119e59882c9f88 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 24 Jan 2009 22:03:26 +0000 Subject: [PATCH] fix blank toolitems in the evo composer --- activatable-toolitem.patch | 43 ++++++++++++++++++++++++++++++++++++++ gtk2.spec | 10 +++++++-- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 activatable-toolitem.patch diff --git a/activatable-toolitem.patch b/activatable-toolitem.patch new file mode 100644 index 0000000..641caba --- /dev/null +++ b/activatable-toolitem.patch @@ -0,0 +1,43 @@ +Index: gtk/gtktoolbutton.c +=================================================================== +--- gtk/gtktoolbutton.c (revision 22204) ++++ gtk/gtktoolbutton.c (working copy) +@@ -772,6 +772,7 @@ gtk_tool_button_activatable_update (GtkA + gtk_tool_button_set_label (button, NULL); + gtk_tool_button_set_icon_name (button, NULL); + } ++ gtk_tool_button_set_icon_widget (button, NULL); + gtk_tool_button_set_stock_id (button, gtk_action_get_stock_id (action)); + } + else if (strcmp (property_name, "gicon") == 0) +@@ -812,6 +813,7 @@ gtk_tool_button_activatable_reset (GtkAc + { + GtkToolButton *button; + GIcon *icon; ++ const gchar *stock_id; + + parent_activatable_iface->reset (activatable, action); + +@@ -822,14 +824,15 @@ gtk_tool_button_activatable_reset (GtkAc + return; + + button = GTK_TOOL_BUTTON (activatable); +- +- gtk_tool_button_set_label (button, NULL); +- gtk_tool_button_set_stock_id (button, NULL); +- gtk_tool_button_set_icon_name (button, NULL); ++ stock_id = gtk_action_get_stock_id (action); ++ ++ gtk_tool_button_set_label (button, gtk_action_get_short_label (action)); + gtk_tool_button_set_use_underline (button, TRUE); +- +- if (gtk_action_get_stock_id (action)) +- gtk_tool_button_set_stock_id (button, gtk_action_get_stock_id (action)); ++ gtk_tool_button_set_stock_id (button, stock_id); ++ gtk_tool_button_set_icon_name (button, gtk_action_get_icon_name (action)); ++ ++ if (stock_id && gtk_icon_factory_lookup_default (stock_id)) ++ gtk_tool_button_set_icon_widget (button, NULL); + else if ((icon = gtk_action_get_gicon (action)) != NULL) + { + GtkIconSize icon_size = gtk_tool_item_get_icon_size (GTK_TOOL_ITEM (button)); diff --git a/gtk2.spec b/gtk2.spec index 3eda60e..66525af 100644 --- a/gtk2.spec +++ b/gtk2.spec @@ -16,7 +16,7 @@ Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X Name: gtk2 Version: %{base_version} -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://download.gnome.org/sources/gtk+/2.15/gtk+-%{version}.tar.bz2 @@ -30,6 +30,8 @@ Patch0: gtk+-2.13.5-lib64.patch Patch2: workaround.patch # http://bugzilla.redhat.com/show_bug.cgi?id=478400 Patch3: default_printer.patch +# fixed upstream +Patch4: activatable-toolitem.patch BuildRequires: atk-devel >= %{atk_version} BuildRequires: pango-devel >= %{pango_version} @@ -116,7 +118,8 @@ GTK+ widget toolkit. %patch0 -p1 -b .lib64 %patch2 -p1 -b .workaround -%patch3 -p0 -b default-printer +%patch3 -p0 -b .default-printer +%patch4 -p0 -b .activatable-toolitem %build libtoolize --force --copy @@ -294,6 +297,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/gtk-2.0 %changelog +* Sat Jan 24 2009 Matthias Clasen - 2.15.1-2 +- Fix blank toolbuttons in the evolution composer + * Fri Jan 23 2009 Matthias Clasen - 2.15.1-1 - Update to 2.15.1