PKGBUILDs/extra/xfce4-netload-plugin/missing_tooltip.diff
2009-10-09 21:23:22 -05:00

17 lines
825 B
Diff

--- panel-plugin/netload.c 2009-05-14 17:03:57.987823647 +0000
+++ panel-plugin/netload.c.new 2009-05-14 17:04:10.663656158 +0000
@@ -237,6 +237,14 @@
if (global->monitor->options.update_interval > 0)
{
+ /* reduce the default tooltip timeout to be smaller than the update interval otherwise
+ * we won't see tooltips on GTK 2.16 or newer */
+ GtkSettings *settings;
+ 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",
+ global->monitor->options.update_interval - 10, NULL);
+
global->timeout_id = g_timeout_add( global->monitor->options.update_interval,
(GtkFunction)update_monitors, global);
}