[gnome-power-manager] Add some state debugging to help diagnose AC confusion
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-power-manager] Add some state debugging to help diagnose AC confusion
- Date: Sun, 28 Jun 2009 17:28:55 +0000 (UTC)
commit 9e3216509d80109d72bf0dbd9934261860771968
Author: Richard Hughes <richard hughsie com>
Date: Sun Jun 28 18:25:27 2009 +0100
Add some state debugging to help diagnose AC confusion
src/gpm-engine.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gpm-engine.c b/src/gpm-engine.c
index dc8de76..d7b25f0 100644
--- a/src/gpm-engine.c
+++ b/src/gpm-engine.c
@@ -674,6 +674,7 @@ gpm_engine_device_add (GpmEngine *engine, DkpDevice *device)
NULL);
/* add old state for transitions */
+ egg_debug ("adding %s with state %s", dkp_device_get_object_path (device), dkp_device_state_to_text (state));
g_object_set_data (G_OBJECT(device), "engine-state-old", GUINT_TO_POINTER(state));
if (type == DKP_DEVICE_TYPE_BATTERY) {
@@ -772,6 +773,7 @@ gpm_engine_device_removed_cb (DkpClient *client, DkpDevice *device, GpmEngine *e
gpm_engine_recalculate_state (engine);
}
+
/**
* gpm_engine_device_changed_cb:
**/
@@ -790,6 +792,8 @@ gpm_engine_device_changed_cb (DkpClient *client, DkpDevice *device, GpmEngine *e
"state", &state,
NULL);
+ egg_debug ("%s state is now %s", dkp_device_get_object_path (device), dkp_device_state_to_text (state));
+
/* see if any interesting state changes have happened */
state_old = GPOINTER_TO_INT(g_object_get_data (G_OBJECT(device), "engine-state-old"));
if (state_old != state) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]