ChangeLog, panel-plugin/netload.c:

* Fixed crash (gtk_rc_style_unref() only valid if the rc was created with
  gtk_rc_style_new())
* Fixed bug that causes an invalid displayed string if no device name was set.


(Old svn revision: 772)
master
Bernhard Walle 2005-08-21 10:11:03 +00:00
parent 7b2ca15079
commit ea900c3647
2 changed files with 21 additions and 19 deletions

View File

@ -2,6 +2,8 @@
* Fixed memory leak (thanks to Brian J. Tarricone) * Fixed memory leak (thanks to Brian J. Tarricone)
* Custom bar colors now also work with special Gtk theme engine where * Custom bar colors now also work with special Gtk theme engine where
the previous code doesn't work (thanks to Brian J. Tarricone) the previous code doesn't work (thanks to Brian J. Tarricone)
* Fixed bug that causes an invalid displayed string if no device name
was set.
* Released 0.3.3. * Released 0.3.3.
2005-08-01 Bernhard Walle 2005-08-01 Bernhard Walle

View File

@ -500,8 +500,12 @@ static void setup_monitor(t_global_monitor *global, gboolean supress_warnings)
{ {
gtk_widget_hide(GTK_WIDGET(global->monitor->status[i])); gtk_widget_hide(GTK_WIDGET(global->monitor->status[i]));
rc = gtk_widget_get_modifier_style(GTK_WIDGET(global->monitor->status[i])); rc = gtk_widget_get_modifier_style(GTK_WIDGET(global->monitor->status[i]));
if (!rc) { if (!rc) {
rc = gtk_rc_style_new(); rc = gtk_rc_style_new();
} else {
/* to free the style safely in any case */
gtk_rc_style_ref(rc);
} }
if (rc) { if (rc) {
@ -533,9 +537,6 @@ static void setup_monitor(t_global_monitor *global, gboolean supress_warnings)
gtk_widget_show(global->monitor->label); gtk_widget_show(global->monitor->label);
} }
if (!strcmp(global->monitor->options.network_device,
global->monitor->options.old_network_device) == 0)
{
if (!init_netload( &(global->monitor->data), global->monitor->options.network_device) if (!init_netload( &(global->monitor->data), global->monitor->options.network_device)
&& !supress_warnings) && !supress_warnings)
{ {
@ -552,7 +553,6 @@ static void setup_monitor(t_global_monitor *global, gboolean supress_warnings)
g_free(global->monitor->options.old_network_device); g_free(global->monitor->options.old_network_device);
} }
global->monitor->options.old_network_device = g_strdup(global->monitor->options.network_device); global->monitor->options.old_network_device = g_strdup(global->monitor->options.network_device);
}
run_update( global ); run_update( global );