[Xfce4-commits] <xfce4-cpugraph-plugin:master> Set a better default to the size

Florian Rivoal noreply at xfce.org
Mon May 31 13:26:03 CEST 2010


Updating branch refs/heads/master
         to 694e926cbe1caf5f4d6ff773d759dd7fbd3ff6d3 (commit)
       from cf07dff98ef98e6c9d9be1c0a3b6f9eaa5626ed9 (commit)

commit 694e926cbe1caf5f4d6ff773d759dd7fbd3ff6d3
Author: Florian Rivoal <frivoal at gmail.com>
Date:   Mon May 31 11:04:54 2010 +0900

    Set a better default to the size
    
    Having options is nice, but not needing them is better. A good default
    size is subjective, but a size similar to the size of the panel is
    about what I like to use, so that's a start.

 panel-plugin/settings.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/settings.c b/panel-plugin/settings.c
index 4759f81..d266edc 100644
--- a/panel-plugin/settings.c
+++ b/panel-plugin/settings.c
@@ -26,20 +26,20 @@ void read_settings( XfcePanelPlugin * plugin, CPUGraph * base )
 
 	guint rate = 0;
 	gboolean nonlinear = FALSE;
-	guint size = 70;
 	guint mode = 0;
 	guint color_mode = 0;
 	gboolean frame = TRUE;
 	gboolean border = TRUE;
 	gboolean bars = TRUE;
-	const gchar  *associated_command;
-	gboolean in_terminal;
-	gboolean startup_notification;
 
 	GdkColor foreground1;
 	GdkColor foreground2;
 	GdkColor foreground3;
 	GdkColor background;
+	guint size;
+	const gchar  *associated_command;
+	gboolean in_terminal;
+	gboolean startup_notification;
 
 	foreground1.red = 0;
 	foreground1.green = 65535;
@@ -57,6 +57,7 @@ void read_settings( XfcePanelPlugin * plugin, CPUGraph * base )
 	background.green = 65535;
 	background.blue = 65535;
 
+	size = xfce_panel_plugin_get_size( plugin );
 	default_command( &associated_command, &in_terminal, &startup_notification );
 
 	if( (file = xfce_panel_plugin_lookup_rc_file( plugin )) != NULL )



More information about the Xfce4-commits mailing list