[Xfce4-commits] [panel-plugins/xfce4-systemload-plugin] 11/16: Drop units label, useless and clutters the UI with Gtk+3

noreply at xfce.org noreply at xfce.org
Fri Apr 29 16:07:28 CEST 2016


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

landry pushed a commit to branch master
in repository panel-plugins/xfce4-systemload-plugin.

commit 192803f43a736a56fd79e3793a2e8ace5a11f40b
Author: Landry Breuil <landry at xfce.org>
Date:   Fri Apr 29 12:46:51 2016 +0200

    Drop units label, useless and clutters the UI with Gtk+3
---
 panel-plugin/systemload.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
index bd3015a..faa7da5 100644
--- a/panel-plugin/systemload.c
+++ b/panel-plugin/systemload.c
@@ -824,23 +824,17 @@ static void new_color_button(t_global_monitor *global, GtkTable *table, guint ro
 /* Adds a new spin button, optionally with a checkbox to enable it.
  * Set boolvar to NULL if you do not want a checkbox. */
 static void new_spin_button(t_global_monitor *global, GtkTable *table, guint row,
-                            const gchar *labeltext, const gchar *units,
+                            const gchar *labeltext,
                             gfloat value, gfloat min, gfloat max, gfloat step,
                             GCallback callback, gboolean* boolvar) {
-    GtkWidget *label, *button, *box;
-    /* Hbox for spin button + units */
-    box = gtk_hbox_new(TRUE, 2);
+    GtkWidget *label, *button;
     button = gtk_spin_button_new_with_range (min, max, step);
     gtk_spin_button_set_value (GTK_SPIN_BUTTON (button), value);
     g_signal_connect (G_OBJECT (button), "value-changed", callback, global);
-    gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 0);
-    label = gtk_label_new (units);
-    gtk_misc_set_alignment (GTK_MISC(label), 0, .5);
-    gtk_box_pack_start(GTK_BOX(box), label, TRUE, TRUE, 0);
     /* Label/check button */
-    label = new_label_or_check_button(global, labeltext, boolvar, box);
+    label = new_label_or_check_button(global, labeltext, boolvar, button);
     gtk_table_attach_defaults(table, label,  0, 1, row, row+1);
-    gtk_table_attach_defaults(table, box, 1, 2, row, row+1);
+    gtk_table_attach_defaults(table, button, 1, 2, row, row+1);
 }
 
 static void
@@ -876,12 +870,12 @@ monitor_create_options(XfcePanelPlugin *plugin, t_global_monitor *global)
 
     table = new_frame(global, content, _("General"), 3, NULL);
     new_spin_button(global, table, 0,
-            _("Update interval:"), _("s"),
+            _("Update interval:"),
             (gfloat)global->timeout/1000.0, 0.100, 10.000, .050,
             G_CALLBACK(change_timeout_cb), NULL);
 #ifdef HAVE_UPOWER_GLIB
     new_spin_button(global, table, 1,
-            _("Power-saving interval:"), _("s"),
+            _("Power-saving interval:"),
             (gfloat)global->timeout_seconds, 1, 10, 1,
             G_CALLBACK(change_timeout_seconds_cb),
             &global->use_timeout_seconds);

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


More information about the Xfce4-commits mailing list