[Xfce4-commits] <xfce4-systemload-plugin:master> Fix bug 3587
Florian Rivoal
noreply at xfce.org
Thu Oct 14 17:20:01 CEST 2010
Updating branch refs/heads/master
to 7a83fe84b96cc07011b4f5a123466c54be3f5c84 (commit)
from 30cf77940d335265ac42be2b943543ab52499b54 (commit)
commit 7a83fe84b96cc07011b4f5a123466c54be3f5c84
Author: Florian Rivoal <frivoal at gmail.com>
Date: Sat Oct 9 15:57:31 2010 +0900
Fix bug 3587
Make the plugin more compact, by removing unnecessary margins. People who
liked these margins can achieve the same effect by putting several
instances of the plugin next to each other.
Inspired by a proposed patch from Brian J. Tarricone.
panel-plugin/systemload.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
index cc96ec4..5e53418 100644
--- a/panel-plugin/systemload.c
+++ b/panel-plugin/systemload.c
@@ -247,8 +247,6 @@ monitor_set_orientation (XfcePanelPlugin *plugin, GtkOrientation orientation,
GTK_WIDGET(global->monitor[count]->label),
FALSE, FALSE, 0);
- gtk_container_set_border_width(GTK_CONTAINER(global->monitor[count]->box),
- BORDER / 2);
gtk_widget_show(GTK_WIDGET(global->monitor[count]->box));
global->monitor[count]->ebox = gtk_event_box_new();
@@ -282,8 +280,6 @@ monitor_set_orientation (XfcePanelPlugin *plugin, GtkOrientation orientation,
gtk_widget_show(global->uptime->ebox);
global->uptime->box = GTK_WIDGET(gtk_vbox_new(FALSE, 0));
- gtk_container_set_border_width(GTK_CONTAINER(global->uptime->box),
- BORDER / 2);
gtk_widget_show(GTK_WIDGET(global->uptime->box));
gtk_container_add(GTK_CONTAINER(global->uptime->ebox),
@@ -324,6 +320,7 @@ monitor_control_new(XfcePanelPlugin *plugin)
global->plugin = plugin;
global->timeout_id = 0;
global->ebox = gtk_event_box_new();
+ gtk_container_set_border_width (GTK_CONTAINER (global->ebox), BORDER/2);
gtk_widget_show(global->ebox);
global->box = NULL;
@@ -407,6 +404,12 @@ setup_monitor(t_global_monitor *global)
}
if(global->uptime->enabled)
{
+ if (global->monitor[0]->options.enabled ||
+ global->monitor[1]->options.enabled ||
+ global->monitor[2]->options.enabled)
+ {
+ gtk_container_set_border_width(GTK_CONTAINER(global->uptime->box), 2);
+ }
gtk_widget_show(GTK_WIDGET(global->uptime->ebox));
}
}
More information about the Xfce4-commits
mailing list