diff -u gnome-power-manager-2.30.0/debian/changelog gnome-power-manager-2.30.0/debian/changelog --- gnome-power-manager-2.30.0/debian/changelog +++ gnome-power-manager-2.30.0/debian/changelog @@ -1,3 +1,10 @@ +gnome-power-manager (2.30.0-0ubuntu2) lucid; urgency=low + + * 12-add-appindicators.patch: Include battery percentage in indicator + (LP: #539912) + + -- Thomas Jaeger Mon, 29 Mar 2010 14:03:49 -0400 + gnome-power-manager (2.30.0-0ubuntu1) lucid; urgency=low * New upstream release: diff -u gnome-power-manager-2.30.0/debian/patches/12-add-appindicators.patch gnome-power-manager-2.30.0/debian/patches/12-add-appindicators.patch --- gnome-power-manager-2.30.0/debian/patches/12-add-appindicators.patch +++ gnome-power-manager-2.30.0/debian/patches/12-add-appindicators.patch @@ -3,10 +3,8 @@ Bug: https://bugzilla.gnome.org/show_bug.cgi?id=609654 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/497870 -Index: gnome-power-manager-2.29.91/configure.ac -=================================================================== ---- gnome-power-manager-2.29.91.orig/configure.ac 2010-03-01 13:17:42.000000000 +0000 -+++ gnome-power-manager-2.29.91/configure.ac 2010-03-12 09:44:48.483197569 +0000 +--- a/configure.ac ++++ b/configure.ac @@ -124,6 +124,7 @@ XRANDR_REQUIRED=1.2.0 CANBERRA_REQUIRED=0.10 @@ -51,10 +49,8 @@ documentation dir: $DOCDIR dbus-1 services dir: $DBUS_SERVICES_DIR gconf-schema dir: $GCONF_SCHEMA_FILE_DIR -Index: gnome-power-manager-2.29.91/src/Makefile.am -=================================================================== ---- gnome-power-manager-2.29.91.orig/src/Makefile.am 2010-03-12 09:44:48.353229794 +0000 -+++ gnome-power-manager-2.29.91/src/Makefile.am 2010-03-12 09:44:48.483197569 +0000 +--- a/src/Makefile.am ++++ b/src/Makefile.am @@ -20,6 +20,7 @@ $(GSTREAMER_CFLAGS) \ -DI_KNOW_THE_DEVICEKIT_POWER_API_IS_SUBJECT_TO_CHANGE \ @@ -71,10 +67,8 @@ -lm if HAVE_HAL -Index: gnome-power-manager-2.29.91/src/gpm-engine.c -=================================================================== ---- gnome-power-manager-2.29.91.orig/src/gpm-engine.c 2010-02-05 10:18:25.000000000 +0000 -+++ gnome-power-manager-2.29.91/src/gpm-engine.c 2010-03-12 09:44:48.483197569 +0000 +--- a/src/gpm-engine.c ++++ b/src/gpm-engine.c @@ -75,6 +75,7 @@ DISCHARGING, LOW_CAPACITY, @@ -106,10 +100,8 @@ } /** -Index: gnome-power-manager-2.29.91/src/gpm-engine.h -=================================================================== ---- gnome-power-manager-2.29.91.orig/src/gpm-engine.h 2010-01-27 16:24:52.000000000 +0000 -+++ gnome-power-manager-2.29.91/src/gpm-engine.h 2010-03-12 09:44:48.483197569 +0000 +--- a/src/gpm-engine.h ++++ b/src/gpm-engine.h @@ -65,6 +65,7 @@ DkpDevice *device); void (* discharging) (GpmEngine *engine, @@ -118,10 +110,8 @@ } GpmEngineClass; GType gpm_engine_get_type (void); -Index: gnome-power-manager-2.29.91/src/gpm-manager.c -=================================================================== ---- gnome-power-manager-2.29.91.orig/src/gpm-manager.c 2010-02-23 17:33:31.000000000 +0000 -+++ gnome-power-manager-2.29.91/src/gpm-manager.c 2010-03-12 09:44:48.483197569 +0000 +--- a/src/gpm-manager.c ++++ b/src/gpm-manager.c @@ -379,7 +379,7 @@ gpm_manager_notify_close (manager, *notification_class); @@ -131,7 +121,7 @@ notification = notify_notification_new_with_status_icon (title, message, icon, manager->priv->status_icon); else notification = notify_notification_new (title, message, icon, NULL); -@@ -1967,7 +1967,8 @@ +@@ -1927,7 +1927,8 @@ g_object_unref (manager->priv->backlight); g_object_unref (manager->priv->console); g_object_unref (manager->priv->client); @@ -141,10 +131,8 @@ G_OBJECT_CLASS (gpm_manager_parent_class)->finalize (object); } -Index: gnome-power-manager-2.29.91/src/gpm-tray-icon.c -=================================================================== ---- gnome-power-manager-2.29.91.orig/src/gpm-tray-icon.c 2010-02-05 10:18:25.000000000 +0000 -+++ gnome-power-manager-2.29.91/src/gpm-tray-icon.c 2010-03-12 09:47:03.703194589 +0000 +--- a/src/gpm-tray-icon.c ++++ b/src/gpm-tray-icon.c @@ -41,6 +41,10 @@ #include #include @@ -442,17 +430,18 @@ g_object_unref (tray_icon->priv->engine); g_return_if_fail (tray_icon->priv != NULL); -Index: gnome-power-manager-2.29.91/src/gpm-upower.c -=================================================================== ---- gnome-power-manager-2.29.91.orig/src/gpm-upower.c 2010-02-05 10:18:25.000000000 +0000 -+++ gnome-power-manager-2.29.91/src/gpm-upower.c 2010-03-12 09:44:48.483197569 +0000 -@@ -267,17 +272,28 @@ +--- a/src/gpm-upower.c ++++ b/src/gpm-upower.c +@@ -267,17 +267,31 @@ time_to_empty_str); g_free (time_to_empty_str); } else { +#ifdef HAVE_APP_INDICATOR + /* TRANSLATORS: the device is fully charged */ -+ description = g_strdup_printf (_("%s is charged"), type_desc); ++ if (percentage > 99) ++ description = g_strdup_printf (_("%s is charged"), type_desc); ++ else ++ description = g_strdup_printf (_("%s is charged (%.1f%%)"), type_desc, percentage); +#else /* TRANSLATORS: the device is fully charged */ description = g_strdup_printf (_("%s is fully charged"), type_desc); @@ -465,8 +454,8 @@ time_to_empty_str = gpm_get_timestring (time_to_empty_round); +#ifdef HAVE_APP_INDICATOR + /* TRANSLATORS: the device is discharging, and we have a time remaining */ -+ description = g_strdup_printf (_("%s %s left"), -+ type_desc, time_to_empty_str); ++ description = g_strdup_printf (_("%s %s left (%.1f%%)"), ++ type_desc, time_to_empty_str, percentage); +#else /* TRANSLATORS: the device is discharging, and we have a time remaining */ description = g_strdup_printf (_("%s %s remaining (%.1f%%)"), @@ -475,14 +464,14 @@ g_free (time_to_empty_str); } else { /* TRANSLATORS: the device is discharging, but we only have a percentage */ -@@ -294,9 +310,15 @@ +@@ -294,9 +308,15 @@ time_to_full_str = gpm_get_timestring (time_to_full_round); time_to_empty_str = gpm_get_timestring (time_to_empty_round); +#ifdef HAVE_APP_INDICATOR + /* TRANSLATORS: device is charging, and we have a time to full and a percentage */ -+ description = g_strdup_printf (_("%s %s until charged"), -+ type_desc, time_to_full_str); ++ description = g_strdup_printf (_("%s %s until charged (%.1f%%)"), ++ type_desc, time_to_full_str, percentage); +#else /* TRANSLATORS: the device is charging, and we have a time to full and empty */ description = g_strdup_printf (_("%s %s until charged (%.1f%%)\nProvides %s battery runtime"), @@ -491,19 +480,11 @@ g_free (time_to_full_str); g_free (time_to_empty_str); -@@ -305,9 +327,15 @@ - /* display only charge time */ - time_to_full_str = gpm_get_timestring (time_to_full_round); - -+#ifdef HAVE_APP_INDICATOR -+ /* TRANSLATORS: device is charging, and we have a time to full and a percentage */ -+ description = g_strdup_printf (_("%s %s until charged"), -+ type_desc, time_to_full_str); -+#else +@@ -308,6 +328,7 @@ /* TRANSLATORS: device is charging, and we have a time to full and a percentage */ description = g_strdup_printf (_("%s %s until charged (%.1f%%)"), type_desc, time_to_full_str, percentage); -+#endif ++ g_free (time_to_full_str); } else {