From 7b2ca15079c387f20cd3c5365ddf92e9abc9fd17 Mon Sep 17 00:00:00 2001 From: Bernhard Walle Date: Sun, 21 Aug 2005 09:03:16 +0000 Subject: [PATCH] 2005-08-21 Bernhard Walle * Fixed memory leak (thanks to Brian J. Tarricone) * Custom bar colors now also work with special Gtk theme engine where the previous code doesn't work (thanks to Brian J. Tarricone) * Released 0.3.3. (Old svn revision: 771) --- ChangeLog | 6 ++++++ panel-plugin/netload.c | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6419e7c..af5929a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-08-21 Bernhard Walle + * Fixed memory leak (thanks to Brian J. Tarricone) + * Custom bar colors now also work with special Gtk theme engine where + the previous code doesn't work (thanks to Brian J. Tarricone) + * Released 0.3.3. + 2005-08-01 Bernhard Walle * Fixed error output if not in debug mode (#4707) * Increased version number to 0.3.3. diff --git a/panel-plugin/netload.c b/panel-plugin/netload.c index 288713f..acd7536 100644 --- a/panel-plugin/netload.c +++ b/panel-plugin/netload.c @@ -503,13 +503,17 @@ static void setup_monitor(t_global_monitor *global, gboolean supress_warnings) if (!rc) { rc = gtk_rc_style_new(); } - else - { + + if (rc) { rc->color_flags[GTK_STATE_PRELIGHT] |= GTK_RC_BG; + rc->color_flags[GTK_STATE_SELECTED] |= GTK_RC_BASE; rc->bg[GTK_STATE_PRELIGHT] = global->monitor->options.color[i]; + rc->base[GTK_STATE_SELECTED] = global->monitor->options.color[i]; + + gtk_widget_modify_style(GTK_WIDGET(global->monitor->status[i]), rc); + gtk_rc_style_unref(rc); } - - gtk_widget_modify_style(GTK_WIDGET(global->monitor->status[i]), rc); + gtk_widget_show(GTK_WIDGET(global->monitor->status[i])); /* Maximum */ @@ -1181,4 +1185,3 @@ G_MODULE_EXPORT void xfce_control_class_init(ControlClass *cc) cc->set_orientation = monitor_set_orientation; } -