From 59b26453a1afbc8b03cd912aeccec793ae3058ae Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 8 Aug 2007 14:57:00 +0000 Subject: [PATCH] improve tooltip compatibility --- gtk2.spec | 8 +++++++- tooltip-compat.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 tooltip-compat.patch diff --git a/gtk2.spec b/gtk2.spec index f20e50c..a18d550 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: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://download.gnome.org/sources/gtk+/2.11/gtk+-%{version}.tar.bz2 @@ -35,6 +35,8 @@ Patch3: cups-authstring.patch Patch4: silence-icon-cache-validator.patch # fixed in upstream svn Patch5: systray-tooltips.patch +# fixed in upstream svn +Patch6: tooltip-compat.patch BuildRequires: atk-devel >= %{atk_version} BuildRequires: pango-devel >= %{pango_version} @@ -124,6 +126,7 @@ docs for the GTK+ widget toolkit. %patch3 -p0 -b .authstring %patch4 -p1 -b .silence %patch5 -p1 -b .tooltips +%patch6 -p0 -b .tooltip-compat for i in config.guess config.sub ; do test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i . @@ -294,6 +297,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/gtk-2.0 %changelog +* Wed Aug 8 2007 Matthias Clasen - 2.11.6-6 +- Improve tooltip compatibility to make acroread work again + * Sun Aug 5 2007 Matthias Clasen - 2.11.6-5 - Really move gtk-demo over diff --git a/tooltip-compat.patch b/tooltip-compat.patch new file mode 100644 index 0000000..11284b3 --- /dev/null +++ b/tooltip-compat.patch @@ -0,0 +1,44 @@ +--- trunk/gtk/gtktooltips.c 2007/07/21 13:19:11 18520 ++++ trunk/gtk/gtktooltips.c 2007/08/07 13:32:19 18587 +@@ -103,6 +103,8 @@ + private->tips_data_table = + g_hash_table_new_full (NULL, NULL, NULL, + (GDestroyNotify) gtk_tooltips_destroy_data); ++ ++ gtk_tooltips_force_window (tooltips); + } + + static void +@@ -144,6 +146,12 @@ + + g_return_if_fail (tooltips != NULL); + ++ if (tooltips->tip_window) ++ { ++ gtk_widget_destroy (tooltips->tip_window); ++ tooltips->tip_window = NULL; ++ } ++ + g_hash_table_remove_all (private->tips_data_table); + + GTK_OBJECT_CLASS (gtk_tooltips_parent_class)->destroy (object); +@@ -154,7 +162,18 @@ + { + g_return_if_fail (GTK_IS_TOOLTIPS (tooltips)); + +- /* nop */ ++ if (!tooltips->tip_window) ++ { ++ tooltips->tip_window = gtk_window_new (GTK_WINDOW_POPUP); ++ g_signal_connect (tooltips->tip_window, ++ "destroy", ++ G_CALLBACK (gtk_widget_destroyed), ++ &tooltips->tip_window); ++ ++ tooltips->tip_label = gtk_label_new (NULL); ++ gtk_container_add (GTK_CONTAINER (tooltips->tip_window), ++ tooltips->tip_label); ++ } + } + + void