~ubuntu-branches/ubuntu/vivid/xfce4-systemload-plugin/vivid

« back to all changes in this revision

Viewing changes to debian/patches/02_fix-tooltip-gtk2.12.patch

  • Committer: Bazaar Package Importer
  • Author(s): Yves-Alexis Perez
  • Date: 2009-04-19 20:44:41 UTC
  • mto: (1.1.11 vivid-proposed)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20090419204441-4zy7khs1stxvzh30
Tags: 0.4.2-3
* debian/patches:
  - 02_fix-tooltip-gtk2.12 added, fix tooltips not appearing at all with 
    GTK 2.16.
* debian/control:
  - move to xfce section.
  - update standards version to 3.8.1.
  - update xfce4-panel-dev build-dep to 4.6.0. 
  - update debhelper build-dep to 7.
* debian/compat bumped to 7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
 
2
index cc96ec4..027e8fe 100644
 
3
--- a/panel-plugin/systemload.c
 
4
+++ b/panel-plugin/systemload.c
 
5
@@ -315,11 +315,18 @@ monitor_control_new(XfcePanelPlugin *plugin)
 
6
 {
 
7
     int count;
 
8
     t_global_monitor *global;
 
9
+    GtkSettings *settings;
 
10
 
 
11
     tooltips = gtk_tooltips_new ();
 
12
     g_object_ref (tooltips);
 
13
     gtk_object_sink (GTK_OBJECT (tooltips));
 
14
     
 
15
+    /* reduce the default tooltip timeout to be smaller than the update
 
16
+     * interval otherwise we won't see tooltips on GTK 2.16 or newer */
 
17
+    settings = gtk_settings_get_default();
 
18
+    if (g_object_class_find_property(G_OBJECT_GET_CLASS(settings), "gtk-tooltip-timeout"))
 
19
+      g_object_set(settings, "gtk-tooltip-timeout", UPDATE_TIMEOUT - 10, NULL);
 
20
+
 
21
     global = g_new(t_global_monitor, 1);
 
22
     global->plugin = plugin;
 
23
     global->timeout_id = 0;