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
parent
7b2ca15079
commit
ea900c3647
|
@ -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
|
||||||
|
|
|
@ -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,27 +537,23 @@ 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,
|
if (!init_netload( &(global->monitor->data), global->monitor->options.network_device)
|
||||||
global->monitor->options.old_network_device) == 0)
|
&& !supress_warnings)
|
||||||
{
|
{
|
||||||
if (!init_netload( &(global->monitor->data), global->monitor->options.network_device)
|
xfce_err (_("%s: Error in initalizing:\n%s"),
|
||||||
&& !supress_warnings)
|
_(APP_NAME),
|
||||||
{
|
_(errormessages[
|
||||||
xfce_err (_("%s: Error in initalizing:\n%s"),
|
global->monitor->data.errorcode == 0
|
||||||
_(APP_NAME),
|
? INTERFACE_NOT_FOUND
|
||||||
_(errormessages[
|
: global->monitor->data.errorcode ]));
|
||||||
global->monitor->data.errorcode == 0
|
|
||||||
? INTERFACE_NOT_FOUND
|
|
||||||
: global->monitor->data.errorcode ]));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (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);
|
||||||
|
|
||||||
run_update( global );
|
run_update( global );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue