[gnome-power-manager] Show the processor device if we have capability, not if we have events
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-power-manager] Show the processor device if we have capability, not if we have events
- Date: Wed, 22 Apr 2009 12:47:24 -0400 (EDT)
commit 32f2a204b15468574d975175826206c4c8226316
Author: Richard Hughes <richard hughsie com>
Date: Wed Apr 22 17:19:38 2009 +0100
Show the processor device if we have capability, not if we have events
This fixes the bug where we didn't get wakeup data the first time we
opened gnome-power-statistics. DeviceKit-power only populates the
data on the second request, and thus g-p-s wasn't showing the info
in the majority of cases
---
src/gpm-statistics.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c
index 25a9e85..e275a12 100644
--- a/src/gpm-statistics.c
+++ b/src/gpm-statistics.c
@@ -1596,9 +1596,14 @@ main (int argc, char *argv[])
last_device = gconf_client_get_string (gconf_client, GPM_CONF_INFO_LAST_DEVICE, NULL);
+#if 0
+ /* FIXME: this is only available in DeviceKit 008 */
+ ret = dkp_wakeups_has_capability (wakeups);
+#else
/* can we get wakeup data? */
- i = dkp_wakeups_get_total (wakeups, NULL);
- if (i > 0) {
+ ret = TRUE;
+#endif
+ if (ret) {
GtkTreeIter iter;
gtk_list_store_append (list_store_devices, &iter);
gtk_list_store_set (list_store_devices, &iter,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]