improve tooltip compatibility
This commit is contained in:
parent
511da4522b
commit
59b26453a1
@ -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 <mclasen@redhat.com> - 2.11.6-6
|
||||
- Improve tooltip compatibility to make acroread work again
|
||||
|
||||
* Sun Aug 5 2007 Matthias Clasen <mclasen@redhat.com> - 2.11.6-5
|
||||
- Really move gtk-demo over
|
||||
|
||||
|
44
tooltip-compat.patch
Normal file
44
tooltip-compat.patch
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user