aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-10-03 10:44:23 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-10-03 10:44:23 -0400
commit45187581e3231940c482eb1f1dd747884a321b0c (patch)
tree259861fcbdb710ce4609221ff34d052e203f77e2
parentf0c76b883bbd02592eca5e283c10d1f42135fd44 (diff)
parent2d4b6f0d208efe4ce63299785cceac30228598c6 (diff)
downloadayatana-indicator-power-45187581e3231940c482eb1f1dd747884a321b0c.tar.gz
ayatana-indicator-power-45187581e3231940c482eb1f1dd747884a321b0c.tar.bz2
ayatana-indicator-power-45187581e3231940c482eb1f1dd747884a321b0c.zip
releasing version 0.9-0ubuntu2
-rw-r--r--debian/changelog8
-rw-r--r--src/indicator-power.c9
2 files changed, 15 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 9cfa1bb..c00d341 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+indicator-power (0.9-0ubuntu2) oneiric; urgency=low
+
+ * src/indicator-power.c
+ - Add a workaround to fix the case when we get a empty bay as a real
+ battery. (LP: #863518)
+
+ -- Ken VanDine <ken.vandine@canonical.com> Mon, 03 Oct 2011 10:35:48 -0400
+
indicator-power (0.9-0ubuntu1) oneiric; urgency=low
* New upstream release.
diff --git a/src/indicator-power.c b/src/indicator-power.c
index 275e871..64392cd 100644
--- a/src/indicator-power.c
+++ b/src/indicator-power.c
@@ -427,11 +427,11 @@ menu_add_device (GtkMenu *menu,
&state,
&time);
+ g_debug ("%s: got data from object %s", G_STRFUNC, object_path);
+
if (kind == UP_DEVICE_KIND_LINE_POWER)
return;
- g_debug ("%s: got data from object %s", G_STRFUNC, object_path);
-
/* Process the data */
device_gicons = get_device_icon (kind, state, device_icon);
icon = gtk_image_new_from_gicon (device_gicons,
@@ -582,6 +582,11 @@ get_primary_device (GVariant *devices)
g_debug ("%s: got data from object %s", G_STRFUNC, object_path);
+ /* Try to fix the case when we get a empty battery bay as a real battery */
+ if (state == UP_DEVICE_STATE_UNKNOWN &&
+ percentage == 0)
+ continue;
+
/* not battery */
if (kind != UP_DEVICE_KIND_BATTERY)
continue;