From: | "Samuli Suominen (ssuominen)" <ssuominen@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in xfce-extra/xfce4-systemload-plugin/files: xfce4-systemload-plugin-0.4.2-fix-tooltip-gtk2.12.patch |
Date: | Thu, 22 Apr 2010 16:32:24 |
Message-Id: | 20100422163219.7966A291DC@corvid.gentoo.org |
1 | ssuominen 10/04/22 16:32:19 |
2 | |
3 | Added: |
4 | xfce4-systemload-plugin-0.4.2-fix-tooltip-gtk2.12.patch |
5 | Log: |
6 | Fix tooltips with GTK+ >= 2.16 wrt #316685 by Ivan Ponomarev. |
7 | (Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.1 xfce-extra/xfce4-systemload-plugin/files/xfce4-systemload-plugin-0.4.2-fix-tooltip-gtk2.12.patch |
11 | |
12 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/xfce-extra/xfce4-systemload-plugin/files/xfce4-systemload-plugin-0.4.2-fix-tooltip-gtk2.12.patch?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/xfce-extra/xfce4-systemload-plugin/files/xfce4-systemload-plugin-0.4.2-fix-tooltip-gtk2.12.patch?rev=1.1&content-type=text/plain |
14 | |
15 | Index: xfce4-systemload-plugin-0.4.2-fix-tooltip-gtk2.12.patch |
16 | =================================================================== |
17 | diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c |
18 | index cc96ec4..027e8fe 100644 |
19 | --- a/panel-plugin/systemload.c |
20 | +++ b/panel-plugin/systemload.c |
21 | @@ -315,11 +315,18 @@ monitor_control_new(XfcePanelPlugin *plugin) |
22 | { |
23 | int count; |
24 | t_global_monitor *global; |
25 | + GtkSettings *settings; |
26 | |
27 | tooltips = gtk_tooltips_new (); |
28 | g_object_ref (tooltips); |
29 | gtk_object_sink (GTK_OBJECT (tooltips)); |
30 | |
31 | + /* reduce the default tooltip timeout to be smaller than the update |
32 | + * interval otherwise we won't see tooltips on GTK 2.16 or newer */ |
33 | + settings = gtk_settings_get_default(); |
34 | + if (g_object_class_find_property(G_OBJECT_GET_CLASS(settings), "gtk-tooltip-timeout")) |
35 | + g_object_set(settings, "gtk-tooltip-timeout", UPDATE_TIMEOUT - 10, NULL); |
36 | + |
37 | global = g_new(t_global_monitor, 1); |
38 | global->plugin = plugin; |
39 | global->timeout_id = 0; |