[gnome-power-manager] Correctly coldplug the list of devices in the stats viewer
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-power-manager] Correctly coldplug the list of devices in the stats viewer
- Date: Wed, 31 Mar 2010 15:02:47 +0000 (UTC)
commit 50f5854a87b7fd90696cea6b5e9da104101ca5b1
Author: Richard Hughes <richard hughsie com>
Date: Wed Mar 31 14:57:05 2010 +0100
Correctly coldplug the list of devices in the stats viewer
src/gpm-statistics.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c
index f46c411..b655049 100644
--- a/src/gpm-statistics.c
+++ b/src/gpm-statistics.c
@@ -1706,19 +1706,19 @@ main (int argc, char *argv[])
g_signal_connect (G_OBJECT (widget), "changed",
G_CALLBACK (gpm_stats_range_combo_changed), NULL);
- client = up_client_new ();
- g_signal_connect (client, "device-added", G_CALLBACK (gpm_stats_device_added_cb), NULL);
- g_signal_connect (client, "device-removed", G_CALLBACK (gpm_stats_device_removed_cb), NULL);
- g_signal_connect (client, "device-changed", G_CALLBACK (gpm_stats_device_changed_cb), NULL);
wakeups = up_wakeups_new ();
g_signal_connect (wakeups, "data-changed", G_CALLBACK (gpm_stats_data_changed_cb), NULL);
/* coldplug */
+ client = up_client_new ();
ret = up_client_enumerate_devices_sync (client, NULL, NULL);
if (!ret)
goto out;
devices = up_client_get_devices (client);
+ g_signal_connect (client, "device-added", G_CALLBACK (gpm_stats_device_added_cb), NULL);
+ g_signal_connect (client, "device-removed", G_CALLBACK (gpm_stats_device_removed_cb), NULL);
+ g_signal_connect (client, "device-changed", G_CALLBACK (gpm_stats_device_changed_cb), NULL);
/* add devices in visually pleasing order */
for (i=0; i < devices->len; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]