Updating branch refs/heads/master to 409ff695af87616fc7bb2c6bc07a2e7e3df1b018 (commit) from d15433775228add139237ff6189139ce85da5bd0 (commit)
commit 409ff695af87616fc7bb2c6bc07a2e7e3df1b018 Author: Landry Breuil <lan...@xfce.org> Date: Tue Apr 17 18:54:41 2012 +0200 Dont show percentage/time if charge = 0 That might hint that battery was removed (fixes bug #8631) panel-plugin/battery.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c index 0bade03..fc0c10a 100644 --- a/panel-plugin/battery.c +++ b/panel-plugin/battery.c @@ -466,7 +466,7 @@ battmon.c:241: for each function it appears in.) gtk_widget_hide(battmon->image); } - if(battmon->options.display_percentage && !(battmon->options.hide_when_full && acline && charge >= 99)){ + if(battmon->options.display_percentage && charge > 0 && !(battmon->options.hide_when_full && acline && charge >= 99)){ gtk_widget_show((GtkWidget *)battmon->charge); g_snprintf(buffer, sizeof(buffer),"%d%% ", charge); gtk_label_set_text(battmon->charge,buffer); @@ -474,7 +474,7 @@ battmon.c:241: for each function it appears in.) gtk_widget_hide((GtkWidget *)battmon->charge); } - if (battmon->options.display_time && !(battmon->options.hide_when_full && acline && charge >= 99 )){ + if (battmon->options.display_time && charge > 0 && !(battmon->options.hide_when_full && acline && charge >= 99 )){ GtkLabel *active_label; if ( battmon_time_labels_fits( battmon ) ) { active_label = battmon->rtime; _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits