[Xfce4-commits] [panel-plugins/xfce4-systemload-plugin] 01/04: Set the default update interval to 0.5s (workaround for #13536)

noreply at xfce.org noreply at xfce.org
Sat Dec 23 22:14:38 CET 2017


This is an automated email from the git hooks/post-receive script.

l   a   n   d   r   y       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-systemload-plugin.

commit 364956da514590ceac30c6443f1f421461bcdfa7
Author: Landry Breuil <landry at xfce.org>
Date:   Sat Dec 23 22:09:18 2017 +0100

    Set the default update interval to 0.5s (workaround for #13536)
    
    There's a bug with tooltips in Gtk if they're updated too often.
    Cf https://bugzilla.gnome.org/show_bug.cgi?id=782978
    
    If the value read in the config is below 500ms, default to 500ms.
    
    While here change the GtkSpin to start at 0.5s, and only use 0.1s increments.
---
 panel-plugin/systemload.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
index 76b076a..17a3ff8 100644
--- a/panel-plugin/systemload.c
+++ b/panel-plugin/systemload.c
@@ -55,7 +55,7 @@ static gchar *DEFAULT_TEXT[] = { "cpu", "mem", "swap" };
 static gchar *DEFAULT_COLOR[] = { "#0000c0", "#00c000", "#f0f000" };
 static gchar *DEFAULT_COMMAND_TEXT = "xfce4-taskmanager";
 
-#define UPDATE_TIMEOUT 250
+#define UPDATE_TIMEOUT 500
 #define UPDATE_TIMEOUT_SECONDS 1
 
 #define BORDER 8
@@ -515,6 +515,8 @@ monitor_read_config(XfcePanelPlugin *plugin, t_global_monitor *global)
     {
         xfce_rc_set_group (rc, "Main");
         global->timeout = xfce_rc_read_int_entry (rc, "Timeout", global->timeout);
+        if (global->timeout < 500)
+            global->timeout = 500;
         global->timeout_seconds = xfce_rc_read_int_entry (
                 rc, "Timeout_Seconds", global->timeout_seconds);
         global->use_timeout_seconds = xfce_rc_read_bool_entry (
@@ -877,7 +879,7 @@ monitor_create_options(XfcePanelPlugin *plugin, t_global_monitor *global)
     gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
 
     /* Update interval */
-    button = gtk_spin_button_new_with_range (0.100, 10.000, .050);
+    button = gtk_spin_button_new_with_range (0.5, 10.0, .1);
     gtk_label_set_mnemonic_widget (GTK_LABEL(label), button);
     gtk_widget_set_halign (button, GTK_ALIGN_START);
     gtk_spin_button_set_value (GTK_SPIN_BUTTON (button), (gfloat)global->timeout/1000.0);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list