[Goodies-commits] r2121 - in xfce4-battery-plugin/trunk: . panel-plugin po
Nick Schermer
nick at xfce.org
Sun Oct 22 20:45:24 CEST 2006
Author: nick
Date: 2006-10-22 18:45:23 +0000 (Sun, 22 Oct 2006)
New Revision: 2121
Modified:
xfce4-battery-plugin/trunk/ChangeLog
xfce4-battery-plugin/trunk/panel-plugin/battery.c
xfce4-battery-plugin/trunk/po/cs.po
xfce4-battery-plugin/trunk/po/fr.po
xfce4-battery-plugin/trunk/po/pl.po
xfce4-battery-plugin/trunk/po/xfce4-battery-plugin.pot
Log:
* Regenerated po files
* Applied atch from Tim Baga <tim.baga at gmail dot com>
* Fixed update_apm_status() to allow plugin display correct
information on systems with multiple batteries.
* Maid few fixes to avoid overlapping remaining time/percentage
labels on small panel height.
* Due to different ACPI data update time on different systems made
approx. 10 seconds averaging of calculations of remaining time/percentage.
* Now plugin shows remaining discharge time when ac adaptor is off,
otherwise remaining charge time.
* Added option "hide time/percentage when full". Actually it hides
appropriate labels when battery is charging, and it's charge >= 99%.
* Changed default low/critical battery action to "Display a warning message".
Modified: xfce4-battery-plugin/trunk/ChangeLog
===================================================================
--- xfce4-battery-plugin/trunk/ChangeLog 2006-10-22 17:47:27 UTC (rev 2120)
+++ xfce4-battery-plugin/trunk/ChangeLog 2006-10-22 18:45:23 UTC (rev 2121)
@@ -1,3 +1,18 @@
+2006-10-22 20:28 nick
+ * Regenerated po files
+ * Applied atch from Tim Baga <tim.baga at gmail dot com>
+ * Fixed update_apm_status() to allow plugin display correct
+ information on systems with multiple batteries.
+ * Maid few fixes to avoid overlapping remaining time/percentage
+ labels on small panel height.
+ * Due to different ACPI data update time on different systems made
+ approx. 10 seconds averaging of calculations of remaining time/percentage.
+ * Now plugin shows remaining discharge time when ac adaptor is off,
+ otherwise remaining charge time.
+ * Added option "hide time/percentage when full". Actually it hides
+ appropriate labels when battery is charging, and it's charge >= 99%.
+ * Changed default low/critical battery action to "Display a warning message".
+
2006-09-06 11:43 nick
* Added $Id$ using svn:keywords
Modified: xfce4-battery-plugin/trunk/panel-plugin/battery.c
===================================================================
--- xfce4-battery-plugin/trunk/panel-plugin/battery.c 2006-10-22 17:47:27 UTC (rev 2120)
+++ xfce4-battery-plugin/trunk/panel-plugin/battery.c 2006-10-22 18:45:23 UTC (rev 2121)
@@ -2,7 +2,7 @@
*
* Copyright (c) 2003 Nicholas Penwarden <toth64 at yahoo.com>
* Copyright (c) 2003 Benedikt Meurer <benedikt.meurer at unix-ag.uni-siegen.de>
- * Copyright (c) 2003 edscott wilson garcia <edscott at users.sourceforge.net>
+ * Copyright (c) 2003 Edscott Wilson Garcia <edscott at users.sourceforge.net>
* Copyright (c) 2005 Eduard Roccatello <eduard at xfce.org>
* Copyright (c) 2006 Nick Schermer <nick at xfce.org>
*
@@ -55,10 +55,14 @@
#include "battery.h"
#include "libacpi.h"
+#include <sys/time.h>
+#include <time.h>
+
#define BORDER 8
#define HIGH_COLOR "#00ff00"
#define LOW_COLOR "#ffff00"
#define CRITICAL_COLOR "#ff0000"
+#define AVERAGING_CYCLE 5
typedef struct
{
@@ -67,14 +71,14 @@
gboolean display_power; /* Options */
gboolean display_percentage; /* Options */
gboolean display_time;
+ gboolean hide_when_full;
gboolean tooltip_display_percentage;
gboolean tooltip_display_time;
int low_percentage;
int critical_percentage;
int action_on_low;
int action_on_critical;
- char *command_on_low;
- char *command_on_critical;
+ char *command_on_low; char *command_on_critical;
float hsize;
float vsize;
} t_battmon_options;
@@ -99,6 +103,7 @@
GtkLabel *label;
GtkLabel *charge;
GtkLabel *rtime;
+ GtkLabel *alt_rtime;
GtkLabel *acfan;
GtkLabel *temp;
GtkWidget *image;
@@ -110,6 +115,7 @@
GtkWidget *cb_disp_label;
GtkWidget *cb_disp_percentage;
GtkWidget *cb_disp_time;
+ GtkWidget *cb_hide_when_full;
GtkWidget *cb_disp_tooltip_percentage;
GtkWidget *cb_disp_tooltip_time;
GtkWidget *cb_disp_icon;
@@ -138,8 +144,8 @@
options->tooltip_display_time = FALSE;
options->low_percentage = 10;
options->critical_percentage = 5;
- options->action_on_low = 0;
- options->action_on_critical = 0;
+ options->action_on_low = 1;
+ options->action_on_critical = 1;
options->command_on_low = NULL;
options->command_on_critical = NULL;
options->hsize = 1.75;
@@ -161,7 +167,7 @@
int fd;
/* First check to see if ACPI is available */
- if(check_acpi()==0) {
+ if (check_acpi() == 0) {
int i;
/* ACPI detected */
battmon->method = BM_USE_ACPI;
@@ -246,16 +252,45 @@
}
static gboolean
+battmon_time_labels_fits(t_battmon *battmon)
+{
+ int plugin_size, labels_size;
+
+ GtkRequisition widget_size;
+ gtk_widget_size_request( GTK_WIDGET(battmon->plugin), &widget_size );
+ plugin_size = widget_size.height;
+
+ labels_size = 0;
+ gtk_widget_size_request( GTK_WIDGET(battmon->charge), &widget_size );
+ labels_size += widget_size.height;
+ gtk_widget_size_request( GTK_WIDGET(battmon->rtime), &widget_size );
+ labels_size += widget_size.height;
+
+ return labels_size <= plugin_size;
+}
+
+static gboolean
update_apm_status(t_battmon *battmon)
{
- int charge=0;
+ int charge=0, rate;
+
+ int lcapacity, ccapacity;
gboolean fan=FALSE;
const char *temp;
int time_remaining=0;
gboolean acline;
gchar buffer[128];
+ static int update_time = AVERAGING_CYCLE;
+ static int sum_lcapacity = 0;
+ static int sum_ccapacity = 0;
+ static int sum_rate = 0;
+ static int last_ccapacity = 0;
+ static int last_lcapacity = 0;
+ static int last_rate = 0;
+ static int last_acline = 0;
+
#if defined(__OpenBSD__) || defined(__NetBSD__)
/* Code for OpenBSD by Joe Ammond <jra at twinight.org>. Using the same
procedure as for FreeBSD.
@@ -279,11 +314,11 @@
DBG ("Updating battery status...");
if(battmon->method == BM_BROKEN) {
- /* See if ACPI or APM support has been enabled yet */
+ /* See if ACPI or APM support has been enabled yet */
if(!detect_battery_info(battmon)) return TRUE;
if(battmon->timeoutid != 0) g_source_remove(battmon->timeoutid);
/* Poll only once per minute if using ACPI due to a bug */
-#ifdef TURTLE_UPDATES
+#ifdef TUTTLE_UPDATES
/* what bug? I don't see any bug here. */
if(battmon->method == BM_USE_ACPI) {
battmon->timeoutid = g_timeout_add(60 * 1024,
@@ -297,29 +332,73 @@
/* Show initial state if using ACPI rather than waiting a minute */
if(battmon->flag) {
- battmon->flag = FALSE;
g_source_remove(battmon->timeoutid);
battmon->timeoutid = g_timeout_add(2 * 1024,
(GSourceFunc) update_apm_status, battmon);
}
+
if(battmon->method == BM_USE_ACPI) {
int i;
acline = read_acad_state();
+ lcapacity = rate = ccapacity = 0;
for (i=0;i<batt_count;i++) {
- if (read_acpi_state(i)) break;
+ if ( !read_acpi_info(i) || !read_acpi_state(i) )
+ continue;
+ lcapacity += acpiinfo->last_full_capacity;
+ ccapacity += acpistate->rcapacity;
+ rate += acpistate->prate;
}
- /*read_acpi_state(0);*/ /* only consider first battery... */
- if (batt_count) {
- charge = acpistate->percentage;
- time_remaining = acpistate->rtime;
+
+ if ( battmon->flag ) {
+ last_ccapacity = ccapacity;
+ last_lcapacity = lcapacity;
+ last_rate = rate;
}
- }
+
+ sum_lcapacity += lcapacity;
+ sum_ccapacity += ccapacity;
+ sum_rate += rate;
+
+ update_time++;
+ if ( update_time >= AVERAGING_CYCLE || last_acline != acline ) {
+ if ( last_acline != acline ) {
+ last_ccapacity = ccapacity;
+ last_lcapacity = lcapacity;
+ last_rate = rate;
+ } else {
+ last_ccapacity = ccapacity = (float)(sum_ccapacity)/(float)(update_time);
+ last_lcapacity = lcapacity = (float)(sum_lcapacity)/(float)(update_time);
+ last_rate = rate = (float)(sum_rate)/(float)(update_time);
+ }
+ update_time = 0;
+ sum_ccapacity = sum_lcapacity = sum_rate = 0;
+ } else {
+ ccapacity = last_ccapacity;
+ lcapacity = last_lcapacity;
+ rate = last_rate;
+ }
+
+ charge = (((float)ccapacity)/((float)lcapacity))*100;
+
+ if ( last_acline )
+ time_remaining = ((float)(lcapacity-ccapacity)/(float)(rate))*60;
+ else
+ time_remaining = ((float)(ccapacity)/(float)(rate))*60;
+
+ if ( time_remaining < 0 )
+ time_remaining = 0;
+
+ last_acline = acline;
+
+ }
#ifdef __linux__
else {
+ DBG ("Trying apm_read()...");
apm_read(&apm); /* not broken and not using ACPI, assume APM */
charge = apm.battery_percentage;
time_remaining = apm.battery_time;
acline = apm.ac_line_status ? TRUE : FALSE;
+
}
#elif __FreeBSD__
else {
@@ -362,8 +441,8 @@
}
#endif
#endif
+ battmon->flag = FALSE;
-
charge = CLAMP (charge, 0, 100);
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(battmon->battstatus), charge / 100.0);
@@ -379,7 +458,7 @@
gtk_widget_hide(battmon->image);
}
- if(battmon->options.display_percentage){
+ if(battmon->options.display_percentage && !(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);
@@ -387,13 +466,23 @@
gtk_widget_hide((GtkWidget *)battmon->charge);
}
- if (battmon->options.display_time){
- gtk_widget_show((GtkWidget *)battmon->rtime);
+ if (battmon->options.display_time && !(battmon->options.hide_when_full && acline && charge >= 99 )){
+ GtkLabel *active_label;
+ if ( battmon_time_labels_fits( battmon ) ) {
+ active_label = battmon->rtime;
+ gtk_widget_hide( (GtkWidget*)battmon->alt_rtime );
+ } else {
+ active_label = battmon->alt_rtime;
+ gtk_widget_hide( (GtkWidget*)battmon->rtime );
+ }
+
+ gtk_widget_show((GtkWidget *)active_label);
g_snprintf(buffer, sizeof(buffer),"%02d:%02d ",time_remaining/60,time_remaining%60);
- gtk_label_set_text(battmon->rtime,buffer);
+ gtk_label_set_text(active_label,buffer);
} else {
gtk_widget_hide((GtkWidget *)battmon->rtime);
+ gtk_widget_hide((GtkWidget *)battmon->alt_rtime);
}
@@ -503,6 +592,7 @@
}
}
}
+
return TRUE;
}
@@ -593,7 +683,13 @@
gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(battmon->charge),TRUE, TRUE, 0);
battmon->rtime = (GtkLabel *)gtk_label_new("01:00");
- gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(battmon->rtime),TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(battmon->rtime),TRUE, TRUE, 0);
+
+ vbox=gtk_vbox_new(FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(vbox), FALSE, FALSE, 0);
+
+ battmon->alt_rtime = (GtkLabel *)gtk_label_new("01:00");
+ gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(battmon->alt_rtime),TRUE, TRUE, 0);
vbox=gtk_vbox_new(FALSE, 0);
@@ -619,7 +715,14 @@
gtk_widget_hide((GtkWidget *)battmon->charge);
}
if (!battmon->options.display_time){
- gtk_widget_hide((GtkWidget *)battmon->rtime);
+ gtk_widget_hide((GtkWidget *)battmon->rtime);
+ gtk_widget_hide((GtkWidget *)battmon->alt_rtime);
+ } else {
+ if ( battmon_time_labels_fits(battmon) ) {
+ gtk_widget_hide((GtkWidget*)battmon->alt_rtime);
+ } else {
+ gtk_widget_hide((GtkWidget*)battmon->rtime);
+ }
}
gtk_container_add(GTK_CONTAINER(battmon->ebox),GTK_WIDGET(battmon->vbox));
@@ -639,6 +742,7 @@
if (battmon->timeoutid) g_source_remove(battmon->timeoutid);
gtk_container_remove(GTK_CONTAINER(battmon->ebox), GTK_WIDGET(battmon->vbox));
setup_battmon(battmon,orientation);
+ update_apm_status( battmon );
battmon->timeoutid = g_timeout_add(1 * 1024, (GSourceFunc) update_apm_status, battmon);
return TRUE;
@@ -664,8 +768,6 @@
g_object_ref (G_OBJECT (battmon->tips));
gtk_object_sink (GTK_OBJECT (battmon->tips));
-
-
return battmon;
}
@@ -726,6 +828,8 @@
battmon->options.action_on_critical = xfce_rc_read_int_entry (rc, "action_on_critical", 0);
+ battmon->options.hide_when_full = xfce_rc_read_int_entry (rc, "hide_when_full", 0);
+
if ((value = xfce_rc_read_entry (rc, "command_on_low", NULL)) && *value)
battmon->options.command_on_low = g_strdup (value);
@@ -771,6 +875,8 @@
xfce_rc_write_int_entry (rc, "action_on_low", battmon->options.action_on_low);
xfce_rc_write_int_entry (rc, "action_on_critical", battmon->options.action_on_critical);
+
+ xfce_rc_write_int_entry (rc, "hide_when_full", battmon->options.hide_when_full );
xfce_rc_write_entry (rc, "command_on_low", battmon->options.command_on_low ? battmon->options.command_on_low : "");
@@ -839,6 +945,7 @@
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->cb_disp_time), battmon->options.display_time);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->cb_disp_tooltip_percentage), battmon->options.tooltip_display_percentage);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->cb_disp_tooltip_time), battmon->options.tooltip_display_time);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->cb_hide_when_full), battmon->options.hide_when_full);
gtk_widget_set_sensitive(dialog->en_command_low, (battmon->options.action_on_low > 1) ? 1 : 0);
gtk_widget_set_sensitive(dialog->en_command_critical, (battmon->options.action_on_critical > 1) ? 1 : 0);
}
@@ -862,6 +969,15 @@
}
static void
+set_hide_when_full(GtkToggleButton *tb, t_battmon_dialog *dialog)
+{
+ t_battmon *battmon = dialog->battmon;
+
+ battmon->options.hide_when_full = gtk_toggle_button_get_active(tb);
+ update_apm_status(dialog->battmon);
+}
+
+static void
set_tooltip_disp_percentage(GtkToggleButton *tb, t_battmon_dialog *dialog)
{
t_battmon *battmon = dialog->battmon;
@@ -1108,14 +1224,15 @@
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
menu = gtk_menu_new();
- mi = gtk_menu_item_new_with_label(_("Do nothing"));
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
+ mi = gtk_menu_item_new_with_label(_("Do nothing"));
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
mi = gtk_menu_item_new_with_label(_("Display a warning message"));
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
mi = gtk_menu_item_new_with_label(_("Run command"));
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
mi = gtk_menu_item_new_with_label(_("Run command in terminal"));
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
+
dialog->om_action_low = gtk_option_menu_new();
gtk_option_menu_set_menu(GTK_OPTION_MENU(dialog->om_action_low), menu);
@@ -1148,8 +1265,8 @@
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
menu = gtk_menu_new();
- mi = gtk_menu_item_new_with_label(_("Do nothing"));
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
+ mi = gtk_menu_item_new_with_label(_("Do nothing"));
+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
mi = gtk_menu_item_new_with_label(_("Display a warning message"));
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
mi = gtk_menu_item_new_with_label(_("Run command"));
@@ -1198,6 +1315,9 @@
dialog->cb_disp_time = gtk_check_button_new_with_mnemonic(_("Display time"));
gtk_box_pack_start(GTK_BOX(vbox2), dialog->cb_disp_time, FALSE, FALSE, 0);
+ dialog->cb_hide_when_full = gtk_check_button_new_with_mnemonic(_("Hide time/percentage when full"));
+ gtk_box_pack_start(GTK_BOX(vbox2), dialog->cb_hide_when_full, FALSE, FALSE, 0);
+
dialog->cb_disp_tooltip_percentage = gtk_check_button_new_with_mnemonic(_("Display percentage in tooltip"));
gtk_box_pack_start(GTK_BOX(vbox2), dialog->cb_disp_tooltip_percentage, FALSE, FALSE, 0);
@@ -1217,6 +1337,7 @@
g_signal_connect(button2, "clicked", G_CALLBACK(command_browse_cb), dialog->en_command_critical);
g_signal_connect(dialog->cb_disp_percentage, "toggled", G_CALLBACK(set_disp_percentage), dialog);
g_signal_connect(dialog->cb_disp_time, "toggled", G_CALLBACK(set_disp_time), dialog);
+ g_signal_connect(dialog->cb_hide_when_full, "toggled", G_CALLBACK(set_hide_when_full), dialog);
g_signal_connect(dialog->cb_disp_tooltip_percentage, "toggled", G_CALLBACK(set_tooltip_disp_percentage), dialog);
g_signal_connect(dialog->cb_disp_power, "toggled", G_CALLBACK(set_disp_power), dialog);
g_signal_connect(dialog->cb_disp_tooltip_time, "toggled", G_CALLBACK(set_tooltip_time), dialog);
Modified: xfce4-battery-plugin/trunk/po/cs.po
===================================================================
--- xfce4-battery-plugin/trunk/po/cs.po 2006-10-22 17:47:27 UTC (rev 2120)
+++ xfce4-battery-plugin/trunk/po/cs.po 2006-10-22 18:45:23 UTC (rev 2121)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: xfce4-battery-plugin 0.4.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-10 21:12+0200\n"
+"POT-Creation-Date: 2006-10-22 20:37+0200\n"
"PO-Revision-Date: 2006-09-23 09:52+0100\n"
"Last-Translator: Michal Várady <miko.vaji at gmail.com>\n"
"Language-Team: Czech <translation-team-cs at lists.sourceforge.net>\n"
@@ -16,124 +16,131 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-#: ../panel-plugin/battery.c:401
+#: ../panel-plugin/battery.c:490
msgid "(Charging from AC)"
msgstr "(Nabíjení ze sítě)"
-#: ../panel-plugin/battery.c:401
+#: ../panel-plugin/battery.c:490
msgid "(AC on-line)"
msgstr "(Připojeno do sítě)"
-#: ../panel-plugin/battery.c:410
+#: ../panel-plugin/battery.c:499
#, c-format
msgid "%d%% (%02d:%02d) remaining"
msgstr "Zbývá %d%% (%02d:%02d)"
-#: ../panel-plugin/battery.c:412
+#: ../panel-plugin/battery.c:501
#, c-format
msgid "%02d:%02d remaining"
msgstr "Zbývá %02d:%02d"
-#: ../panel-plugin/battery.c:414
+#: ../panel-plugin/battery.c:503
#, c-format
msgid "%d%% remaining"
msgstr "Zbývá %d%%"
-#: ../panel-plugin/battery.c:416
+#: ../panel-plugin/battery.c:505
msgid "AC off-line"
msgstr "Napájení odpojeno"
-#: ../panel-plugin/battery.c:480
-msgid "WARNING: Your battery has reached critical status. You should plug in or shutdown your computer now to avoid possible data loss."
-msgstr "VAROVÁNÍ: Baterie dosáhla kritického stavu. Měli byste připojit počítač do elektrické sítě nebo jej vypnout, abyste předešli možné ztrátě dat."
+#: ../panel-plugin/battery.c:569
+msgid ""
+"WARNING: Your battery has reached critical status. You should plug in or "
+"shutdown your computer now to avoid possible data loss."
+msgstr ""
+"VAROVÁNÍ: Baterie dosáhla kritického stavu. Měli byste připojit počítač do "
+"elektrické sítě nebo jej vypnout, abyste předešli možné ztrátě dat."
-#: ../panel-plugin/battery.c:494
-msgid "WARNING: Your battery is running low. You should consider plugging in or shutting down your computer soon to avoid possible data loss."
-msgstr "VAROVÁNÍ: Úroveň nabití baterie je nízká. Měli byste zvážit připojení počítače do elektrické sítě nebo jej v dohledné době vypnout, abyste předešli ztrátě dat."
+#: ../panel-plugin/battery.c:583
+msgid ""
+"WARNING: Your battery is running low. You should consider plugging in or "
+"shutting down your computer soon to avoid possible data loss."
+msgstr ""
+"VAROVÁNÍ: Úroveň nabití baterie je nízká. Měli byste zvážit připojení "
+"počítače do elektrické sítě nebo jej v dohledné době vypnout, abyste "
+"předešli ztrátě dat."
-#: ../panel-plugin/battery.c:582
+#: ../panel-plugin/battery.c:672
msgid "Battery"
msgstr "Baterie"
-#: ../panel-plugin/battery.c:982
+#: ../panel-plugin/battery.c:1098
msgid "Select file"
msgstr "Vyberte soubor"
-#: ../panel-plugin/battery.c:1023
+#: ../panel-plugin/battery.c:1139
msgid "Select command"
msgstr "Vyberte příkaz"
-#: ../panel-plugin/battery.c:1053
-#: ../panel-plugin/battmon.desktop.in.in.h:1
+#: ../panel-plugin/battery.c:1169 ../panel-plugin/battmon.desktop.in.in.h:1
msgid "Battery Monitor"
msgstr "Sledování baterie"
-#: ../panel-plugin/battery.c:1081
+#: ../panel-plugin/battery.c:1197
msgid "Low percentage:"
msgstr "Nízký stav:"
-#: ../panel-plugin/battery.c:1092
+#: ../panel-plugin/battery.c:1208
msgid "Critical percentage:"
msgstr "Kritický stav:"
-#: ../panel-plugin/battery.c:1105
+#: ../panel-plugin/battery.c:1221
msgid "Low battery action:"
msgstr "Akce při nízkém stavu:"
-#: ../panel-plugin/battery.c:1111
-#: ../panel-plugin/battery.c:1151
+#: ../panel-plugin/battery.c:1227 ../panel-plugin/battery.c:1268
msgid "Do nothing"
msgstr "Žádná akce"
-#: ../panel-plugin/battery.c:1113
-#: ../panel-plugin/battery.c:1153
+#: ../panel-plugin/battery.c:1229 ../panel-plugin/battery.c:1270
msgid "Display a warning message"
msgstr "Zobrazit varování"
-#: ../panel-plugin/battery.c:1115
-#: ../panel-plugin/battery.c:1155
+#: ../panel-plugin/battery.c:1231 ../panel-plugin/battery.c:1272
msgid "Run command"
msgstr "Spustit příkaz"
-#: ../panel-plugin/battery.c:1117
-#: ../panel-plugin/battery.c:1157
+#: ../panel-plugin/battery.c:1233 ../panel-plugin/battery.c:1274
msgid "Run command in terminal"
msgstr "Spustit příkaz v terminálu"
-#: ../panel-plugin/battery.c:1129
-#: ../panel-plugin/battery.c:1169
+#: ../panel-plugin/battery.c:1246 ../panel-plugin/battery.c:1286
msgid "Command:"
msgstr "Příkaz:"
-#: ../panel-plugin/battery.c:1145
+#: ../panel-plugin/battery.c:1262
msgid "Critical battery action:"
msgstr "Akce při kritickém stavu:"
-#: ../panel-plugin/battery.c:1192
+#: ../panel-plugin/battery.c:1309
msgid "Display label"
msgstr "Zobrazit popisek"
-#: ../panel-plugin/battery.c:1195
+#: ../panel-plugin/battery.c:1312
msgid "Display percentage"
msgstr "Zobrazit údaj v procentech"
-#: ../panel-plugin/battery.c:1198
+#: ../panel-plugin/battery.c:1315
msgid "Display time"
msgstr "Zobrazit čas"
-#: ../panel-plugin/battery.c:1201
+#: ../panel-plugin/battery.c:1318
+msgid "Hide time/percentage when full"
+msgstr ""
+
+#: ../panel-plugin/battery.c:1321
msgid "Display percentage in tooltip"
msgstr "Zobrazit údaj v procentech jako tip"
-#: ../panel-plugin/battery.c:1204
+#: ../panel-plugin/battery.c:1324
msgid "Display time remaining in tooltip"
msgstr "Zobrazit zbývající čas jako tip"
-#: ../panel-plugin/battery.c:1207
+#: ../panel-plugin/battery.c:1327
msgid "Display power"
msgstr "Zobrazit úroveň nabití"
-#: ../panel-plugin/battery.c:1210
+#: ../panel-plugin/battery.c:1330
msgid "Display icon"
msgstr "Zobrazit ikonu"
@@ -143,4 +150,3 @@
#~ msgid "Configure Battery Monitor"
#~ msgstr "Nastavit sledování baterie"
-
Modified: xfce4-battery-plugin/trunk/po/fr.po
===================================================================
--- xfce4-battery-plugin/trunk/po/fr.po 2006-10-22 17:47:27 UTC (rev 2120)
+++ xfce4-battery-plugin/trunk/po/fr.po 2006-10-22 18:45:23 UTC (rev 2121)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: xfce4-battery-plugin 0.4.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-10 21:12+0200\n"
+"POT-Creation-Date: 2006-10-22 20:37+0200\n"
"PO-Revision-Date: 2006-09-14 21:15+0100\n"
"Last-Translator: Maximilian Schleiss <maxschleiss at bluewin.ch>\n"
"Language-Team: French <xfce-i18n at xfce.org>\n"
@@ -15,128 +15,134 @@
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../panel-plugin/battery.c:401
+#: ../panel-plugin/battery.c:490
msgid "(Charging from AC)"
msgstr "(Batterie en charge)"
-#: ../panel-plugin/battery.c:401
+#: ../panel-plugin/battery.c:490
msgid "(AC on-line)"
msgstr "(Secteur branché)"
-#: ../panel-plugin/battery.c:410
+#: ../panel-plugin/battery.c:499
#, c-format
msgid "%d%% (%02d:%02d) remaining"
msgstr "%d%% (%02d:%02d) restants"
-#: ../panel-plugin/battery.c:412
+#: ../panel-plugin/battery.c:501
#, c-format
msgid "%02d:%02d remaining"
msgstr "%02d:%02d restants"
-#: ../panel-plugin/battery.c:414
+#: ../panel-plugin/battery.c:503
#, c-format
msgid "%d%% remaining"
msgstr "%d%% restants"
-#: ../panel-plugin/battery.c:416
+#: ../panel-plugin/battery.c:505
msgid "AC off-line"
msgstr "Secteur débranché"
-#: ../panel-plugin/battery.c:480
-msgid "WARNING: Your battery has reached critical status. You should plug in or shutdown your computer now to avoid possible data loss."
-msgstr "ATTENTION : La batterie a atteint un seuil critique. Il est conseillé de brancher le chargeur ou d'éteindre l'ordinateur pour éviter toute perte de données."
+#: ../panel-plugin/battery.c:569
+msgid ""
+"WARNING: Your battery has reached critical status. You should plug in or "
+"shutdown your computer now to avoid possible data loss."
+msgstr ""
+"ATTENTION : La batterie a atteint un seuil critique. Il est conseillé de "
+"brancher le chargeur ou d'éteindre l'ordinateur pour éviter toute perte de "
+"données."
-#: ../panel-plugin/battery.c:494
-msgid "WARNING: Your battery is running low. You should consider plugging in or shutting down your computer soon to avoid possible data loss."
-msgstr "ATTENTION : La batterie est faible. Il est conseillé de brancher le chargeur ou d'éteindre l'ordinateur pour éviter toute perte de données."
+#: ../panel-plugin/battery.c:583
+msgid ""
+"WARNING: Your battery is running low. You should consider plugging in or "
+"shutting down your computer soon to avoid possible data loss."
+msgstr ""
+"ATTENTION : La batterie est faible. Il est conseillé de brancher le chargeur "
+"ou d'éteindre l'ordinateur pour éviter toute perte de données."
-#: ../panel-plugin/battery.c:582
+#: ../panel-plugin/battery.c:672
msgid "Battery"
msgstr "Batterie"
-#: ../panel-plugin/battery.c:982
+#: ../panel-plugin/battery.c:1098
msgid "Select file"
msgstr "Sélectionner un fichier"
-#: ../panel-plugin/battery.c:1023
+#: ../panel-plugin/battery.c:1139
msgid "Select command"
msgstr "Sélectionner une commande"
-#: ../panel-plugin/battery.c:1053
-#: ../panel-plugin/battmon.desktop.in.in.h:1
+#: ../panel-plugin/battery.c:1169 ../panel-plugin/battmon.desktop.in.in.h:1
msgid "Battery Monitor"
msgstr "Moniteur de batterie"
-#: ../panel-plugin/battery.c:1081
+#: ../panel-plugin/battery.c:1197
msgid "Low percentage:"
msgstr "Pourcentage faible :"
-#: ../panel-plugin/battery.c:1092
+#: ../panel-plugin/battery.c:1208
msgid "Critical percentage:"
msgstr "Seuil critique :"
-#: ../panel-plugin/battery.c:1105
+#: ../panel-plugin/battery.c:1221
msgid "Low battery action:"
msgstr "Action batterie faible"
-#: ../panel-plugin/battery.c:1111
-#: ../panel-plugin/battery.c:1151
+#: ../panel-plugin/battery.c:1227 ../panel-plugin/battery.c:1268
msgid "Do nothing"
msgstr "Ne rien faire"
-#: ../panel-plugin/battery.c:1113
-#: ../panel-plugin/battery.c:1153
+#: ../panel-plugin/battery.c:1229 ../panel-plugin/battery.c:1270
msgid "Display a warning message"
msgstr "Afficher un message d'avertissement"
-#: ../panel-plugin/battery.c:1115
-#: ../panel-plugin/battery.c:1155
+#: ../panel-plugin/battery.c:1231 ../panel-plugin/battery.c:1272
msgid "Run command"
msgstr "Lancer une commande"
-#: ../panel-plugin/battery.c:1117
-#: ../panel-plugin/battery.c:1157
+#: ../panel-plugin/battery.c:1233 ../panel-plugin/battery.c:1274
msgid "Run command in terminal"
msgstr "Lancer une commande dans la console"
-#: ../panel-plugin/battery.c:1129
-#: ../panel-plugin/battery.c:1169
+#: ../panel-plugin/battery.c:1246 ../panel-plugin/battery.c:1286
msgid "Command:"
msgstr "Commande :"
-#: ../panel-plugin/battery.c:1145
+#: ../panel-plugin/battery.c:1262
msgid "Critical battery action:"
msgstr "Action seuil critique :"
-#: ../panel-plugin/battery.c:1192
+#: ../panel-plugin/battery.c:1309
msgid "Display label"
msgstr "Afficher label"
-#: ../panel-plugin/battery.c:1195
+#: ../panel-plugin/battery.c:1312
msgid "Display percentage"
msgstr "Afficher pourcentage"
-#: ../panel-plugin/battery.c:1198
+#: ../panel-plugin/battery.c:1315
msgid "Display time"
msgstr "Afficher le temps"
-#: ../panel-plugin/battery.c:1201
+#: ../panel-plugin/battery.c:1318
+msgid "Hide time/percentage when full"
+msgstr ""
+
+#: ../panel-plugin/battery.c:1321
msgid "Display percentage in tooltip"
msgstr "Afficher pourcentage dans la bulle"
-#: ../panel-plugin/battery.c:1204
+#: ../panel-plugin/battery.c:1324
msgid "Display time remaining in tooltip"
msgstr "Afficher le temps restant dans la bulle"
-#: ../panel-plugin/battery.c:1207
+#: ../panel-plugin/battery.c:1327
msgid "Display power"
msgstr "Afficher la source"
-#: ../panel-plugin/battery.c:1210
+#: ../panel-plugin/battery.c:1330
msgid "Display icon"
msgstr "Afficher l'icône"
#: ../panel-plugin/battmon.desktop.in.in.h:2
msgid "Show and monitor the battery status"
msgstr "Afficher et suivre l'état de la batterie"
-
Modified: xfce4-battery-plugin/trunk/po/pl.po
===================================================================
--- xfce4-battery-plugin/trunk/po/pl.po 2006-10-22 17:47:27 UTC (rev 2120)
+++ xfce4-battery-plugin/trunk/po/pl.po 2006-10-22 18:45:23 UTC (rev 2121)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: xfce4-battery-plugin 0.4.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-10 21:29+0200\n"
+"POT-Creation-Date: 2006-10-22 20:37+0200\n"
"PO-Revision-Date: 2006-04-08 12:19+0900\n"
"Last-Translator: Piotr Maliński <admin at rk.edu.pl>\n"
"Language-Team: Polish <translation-team-pl at lists.sourceforge.net>\n"
@@ -14,34 +14,34 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../panel-plugin/battery.c:401
+#: ../panel-plugin/battery.c:490
msgid "(Charging from AC)"
msgstr "(Ładuję z AC)"
-#: ../panel-plugin/battery.c:401
+#: ../panel-plugin/battery.c:490
msgid "(AC on-line)"
msgstr "(AC podłączone)"
-#: ../panel-plugin/battery.c:410
+#: ../panel-plugin/battery.c:499
#, c-format
msgid "%d%% (%02d:%02d) remaining"
msgstr "%d%% (%02d:%02d) pozostało"
-#: ../panel-plugin/battery.c:412
+#: ../panel-plugin/battery.c:501
#, c-format
msgid "%02d:%02d remaining"
msgstr "%02d:%02d pozostało"
-#: ../panel-plugin/battery.c:414
+#: ../panel-plugin/battery.c:503
#, c-format
msgid "%d%% remaining"
msgstr "%d%% pozostało"
-#: ../panel-plugin/battery.c:416
+#: ../panel-plugin/battery.c:505
msgid "AC off-line"
msgstr "Brak zasilania"
-#: ../panel-plugin/battery.c:480
+#: ../panel-plugin/battery.c:569
msgid ""
"WARNING: Your battery has reached critical status. You should plug in or "
"shutdown your computer now to avoid possible data loss."
@@ -49,7 +49,7 @@
"UWAGA: Bateria jest prawie rozładowana. Powinieneś wyłączyć komputer lub "
"podłączyć zasilanie by uniknąć potencjalnej utraty danych."
-#: ../panel-plugin/battery.c:494
+#: ../panel-plugin/battery.c:583
msgid ""
"WARNING: Your battery is running low. You should consider plugging in or "
"shutting down your computer soon to avoid possible data loss."
@@ -57,83 +57,87 @@
"UWAGA: Pojemność baterii spada. Powinieneś wyłączyć komputer lub podłączyć "
"zasilanie by uniknąć potencjalnej utraty danych."
-#: ../panel-plugin/battery.c:582
+#: ../panel-plugin/battery.c:672
msgid "Battery"
msgstr "Bateria"
-#: ../panel-plugin/battery.c:982
+#: ../panel-plugin/battery.c:1098
msgid "Select file"
msgstr "Wybierz plik"
-#: ../panel-plugin/battery.c:1023
+#: ../panel-plugin/battery.c:1139
msgid "Select command"
msgstr "Wybierz polecenie"
-#: ../panel-plugin/battery.c:1053 ../panel-plugin/battmon.desktop.in.in.h:1
+#: ../panel-plugin/battery.c:1169 ../panel-plugin/battmon.desktop.in.in.h:1
msgid "Battery Monitor"
msgstr "Monitor Baterii"
-#: ../panel-plugin/battery.c:1081
+#: ../panel-plugin/battery.c:1197
msgid "Low percentage:"
msgstr "Stan niski (%):"
-#: ../panel-plugin/battery.c:1092
+#: ../panel-plugin/battery.c:1208
msgid "Critical percentage:"
msgstr "Stan krytyczny (%):"
-#: ../panel-plugin/battery.c:1105
+#: ../panel-plugin/battery.c:1221
msgid "Low battery action:"
msgstr "Akcja dla stanu niskiego:"
-#: ../panel-plugin/battery.c:1111 ../panel-plugin/battery.c:1151
+#: ../panel-plugin/battery.c:1227 ../panel-plugin/battery.c:1268
msgid "Do nothing"
msgstr "Nic nie rób"
-#: ../panel-plugin/battery.c:1113 ../panel-plugin/battery.c:1153
+#: ../panel-plugin/battery.c:1229 ../panel-plugin/battery.c:1270
msgid "Display a warning message"
msgstr "Wyświetl ostrzeżenie"
-#: ../panel-plugin/battery.c:1115 ../panel-plugin/battery.c:1155
+#: ../panel-plugin/battery.c:1231 ../panel-plugin/battery.c:1272
msgid "Run command"
msgstr "Wykonaj polecenie"
-#: ../panel-plugin/battery.c:1117 ../panel-plugin/battery.c:1157
+#: ../panel-plugin/battery.c:1233 ../panel-plugin/battery.c:1274
msgid "Run command in terminal"
msgstr "Wykonaj polecenie w terminalu"
-#: ../panel-plugin/battery.c:1129 ../panel-plugin/battery.c:1169
+#: ../panel-plugin/battery.c:1246 ../panel-plugin/battery.c:1286
msgid "Command:"
msgstr "Polecenie:"
-#: ../panel-plugin/battery.c:1145
+#: ../panel-plugin/battery.c:1262
msgid "Critical battery action:"
msgstr "Akcja dla stanu krytycznego:"
-#: ../panel-plugin/battery.c:1192
+#: ../panel-plugin/battery.c:1309
msgid "Display label"
msgstr "Wyświetl etykietę"
-#: ../panel-plugin/battery.c:1195
+#: ../panel-plugin/battery.c:1312
msgid "Display percentage"
msgstr "Wyświetl procenty"
-#: ../panel-plugin/battery.c:1198
+#: ../panel-plugin/battery.c:1315
msgid "Display time"
msgstr "Wyświetl czas"
-#: ../panel-plugin/battery.c:1201
+#: ../panel-plugin/battery.c:1318
+msgid "Hide time/percentage when full"
+msgstr ""
+
+#: ../panel-plugin/battery.c:1321
msgid "Display percentage in tooltip"
msgstr "Wyświetl procenty w dymku"
-#: ../panel-plugin/battery.c:1204
+#: ../panel-plugin/battery.c:1324
msgid "Display time remaining in tooltip"
msgstr "Wyświetl pozostały czas w dymku"
-#: ../panel-plugin/battery.c:1207
+#: ../panel-plugin/battery.c:1327
msgid "Display power"
msgstr "Wyświetl moc"
-#: ../panel-plugin/battery.c:1210
+#: ../panel-plugin/battery.c:1330
msgid "Display icon"
msgstr "Wyświetl ikonę"
Modified: xfce4-battery-plugin/trunk/po/xfce4-battery-plugin.pot
===================================================================
--- xfce4-battery-plugin/trunk/po/xfce4-battery-plugin.pot 2006-10-22 17:47:27 UTC (rev 2120)
+++ xfce4-battery-plugin/trunk/po/xfce4-battery-plugin.pot 2006-10-22 18:45:23 UTC (rev 2121)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-10 21:12+0200\n"
+"POT-Creation-Date: 2006-10-22 20:37+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -16,122 +16,126 @@
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../panel-plugin/battery.c:401
+#: ../panel-plugin/battery.c:490
msgid "(Charging from AC)"
msgstr ""
-#: ../panel-plugin/battery.c:401
+#: ../panel-plugin/battery.c:490
msgid "(AC on-line)"
msgstr ""
-#: ../panel-plugin/battery.c:410
+#: ../panel-plugin/battery.c:499
#, c-format
msgid "%d%% (%02d:%02d) remaining"
msgstr ""
-#: ../panel-plugin/battery.c:412
+#: ../panel-plugin/battery.c:501
#, c-format
msgid "%02d:%02d remaining"
msgstr ""
-#: ../panel-plugin/battery.c:414
+#: ../panel-plugin/battery.c:503
#, c-format
msgid "%d%% remaining"
msgstr ""
-#: ../panel-plugin/battery.c:416
+#: ../panel-plugin/battery.c:505
msgid "AC off-line"
msgstr ""
-#: ../panel-plugin/battery.c:480
+#: ../panel-plugin/battery.c:569
msgid ""
"WARNING: Your battery has reached critical status. You should plug in or "
"shutdown your computer now to avoid possible data loss."
msgstr ""
-#: ../panel-plugin/battery.c:494
+#: ../panel-plugin/battery.c:583
msgid ""
"WARNING: Your battery is running low. You should consider plugging in or "
"shutting down your computer soon to avoid possible data loss."
msgstr ""
-#: ../panel-plugin/battery.c:582
+#: ../panel-plugin/battery.c:672
msgid "Battery"
msgstr ""
-#: ../panel-plugin/battery.c:982
+#: ../panel-plugin/battery.c:1098
msgid "Select file"
msgstr ""
-#: ../panel-plugin/battery.c:1023
+#: ../panel-plugin/battery.c:1139
msgid "Select command"
msgstr ""
-#: ../panel-plugin/battery.c:1053 ../panel-plugin/battmon.desktop.in.in.h:1
+#: ../panel-plugin/battery.c:1169 ../panel-plugin/battmon.desktop.in.in.h:1
msgid "Battery Monitor"
msgstr ""
-#: ../panel-plugin/battery.c:1081
+#: ../panel-plugin/battery.c:1197
msgid "Low percentage:"
msgstr ""
-#: ../panel-plugin/battery.c:1092
+#: ../panel-plugin/battery.c:1208
msgid "Critical percentage:"
msgstr ""
-#: ../panel-plugin/battery.c:1105
+#: ../panel-plugin/battery.c:1221
msgid "Low battery action:"
msgstr ""
-#: ../panel-plugin/battery.c:1111 ../panel-plugin/battery.c:1151
+#: ../panel-plugin/battery.c:1227 ../panel-plugin/battery.c:1268
msgid "Do nothing"
msgstr ""
-#: ../panel-plugin/battery.c:1113 ../panel-plugin/battery.c:1153
+#: ../panel-plugin/battery.c:1229 ../panel-plugin/battery.c:1270
msgid "Display a warning message"
msgstr ""
-#: ../panel-plugin/battery.c:1115 ../panel-plugin/battery.c:1155
+#: ../panel-plugin/battery.c:1231 ../panel-plugin/battery.c:1272
msgid "Run command"
msgstr ""
-#: ../panel-plugin/battery.c:1117 ../panel-plugin/battery.c:1157
+#: ../panel-plugin/battery.c:1233 ../panel-plugin/battery.c:1274
msgid "Run command in terminal"
msgstr ""
-#: ../panel-plugin/battery.c:1129 ../panel-plugin/battery.c:1169
+#: ../panel-plugin/battery.c:1246 ../panel-plugin/battery.c:1286
msgid "Command:"
msgstr ""
-#: ../panel-plugin/battery.c:1145
+#: ../panel-plugin/battery.c:1262
msgid "Critical battery action:"
msgstr ""
-#: ../panel-plugin/battery.c:1192
+#: ../panel-plugin/battery.c:1309
msgid "Display label"
msgstr ""
-#: ../panel-plugin/battery.c:1195
+#: ../panel-plugin/battery.c:1312
msgid "Display percentage"
msgstr ""
-#: ../panel-plugin/battery.c:1198
+#: ../panel-plugin/battery.c:1315
msgid "Display time"
msgstr ""
-#: ../panel-plugin/battery.c:1201
+#: ../panel-plugin/battery.c:1318
+msgid "Hide time/percentage when full"
+msgstr ""
+
+#: ../panel-plugin/battery.c:1321
msgid "Display percentage in tooltip"
msgstr ""
-#: ../panel-plugin/battery.c:1204
+#: ../panel-plugin/battery.c:1324
msgid "Display time remaining in tooltip"
msgstr ""
-#: ../panel-plugin/battery.c:1207
+#: ../panel-plugin/battery.c:1327
msgid "Display power"
msgstr ""
-#: ../panel-plugin/battery.c:1210
+#: ../panel-plugin/battery.c:1330
msgid "Display icon"
msgstr ""
More information about the Goodies-commits
mailing list