[gnome-power-manager] Do not issue a console warning when laptop batteries are empty



commit 65752cc881d42d9eb27564e1855faa32dfd1bca4
Author: Richard Hughes <richard hughsie com>
Date:   Fri Apr 2 22:14:43 2010 +0100

    Do not issue a console warning when laptop batteries are empty

 src/gpm-upower.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gpm-upower.c b/src/gpm-upower.c
index bd1d74c..fbe3565 100644
--- a/src/gpm-upower.c
+++ b/src/gpm-upower.c
@@ -325,6 +325,12 @@ gpm_upower_get_device_summary (UpDevice *device)
 		g_string_append_printf (description, " (%.0f%%)", percentage);
 		goto out;
 	}
+	if (state == UP_DEVICE_STATE_EMPTY) {
+
+		/* TRANSLATORS: when the device has no charge left */
+		g_string_append_printf (description, _("%s empty"), kind_desc);
+		goto out;
+	}
 
 	/* fallback */
 	egg_warning ("in an undefined state we are not charging or "



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]