xfce4-systemload-plugin/xfce4-systemload-plugin-0.4.2-tooltip.patch
Christoph Wickert fcb805e531 - Bring back tooltips in GTK >= 2.16 (#508637, bugzilla.xfce.org #5175)
- Fix bar colors (#505214, bugzilla.xfce.org #1889)
- Fix wrong free memory value (bugzilla.xfce.org #4215)
2009-09-09 21:00:13 +00:00

23 lines
893 B
Diff

diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
index cc96ec4..027e8fe 100644
--- a/panel-plugin/systemload.c
+++ b/panel-plugin/systemload.c
@@ -315,11 +315,18 @@ monitor_control_new(XfcePanelPlugin *plugin)
{
int count;
t_global_monitor *global;
+ GtkSettings *settings;
tooltips = gtk_tooltips_new ();
g_object_ref (tooltips);
gtk_object_sink (GTK_OBJECT (tooltips));
+ /* reduce the default tooltip timeout to be smaller than the update
+ * interval otherwise we won't see tooltips on GTK 2.16 or newer */
+ settings = gtk_settings_get_default();
+ if (g_object_class_find_property(G_OBJECT_GET_CLASS(settings), "gtk-tooltip-timeout"))
+ g_object_set(settings, "gtk-tooltip-timeout", UPDATE_TIMEOUT - 10, NULL);
+
global = g_new(t_global_monitor, 1);
global->plugin = plugin;
global->timeout_id = 0;