summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Taylor <rob.taylor@codethink.co.uk>2007-09-24 17:59:10 +0100
committerRob Taylor <rob.taylor@codethink.co.uk>2007-09-24 17:59:10 +0100
commitae876ad4f754f45a85b06a7ec1060d3c71f899c2 (patch)
tree18d7976bc0f6320ff0605ece3e91cff36d47ad50
parentdbd1446caf5dececfa3066bcb5fa2c12326ff73a (diff)
display policy: add some debug output for state.
-rw-r--r--plugins/policy/display/ohm-plugin-display.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/policy/display/ohm-plugin-display.c b/plugins/policy/display/ohm-plugin-display.c
index 034474b..e8ba21a 100644
--- a/plugins/policy/display/ohm-plugin-display.c
+++ b/plugins/policy/display/ohm-plugin-display.c
@@ -44,12 +44,15 @@ reset_brightness (OhmPlugin *plugin)
/* FIXME: turn on dcon -- why was this here? */
/* ohm_plugin_conf_set_key (plugin, "backlight.state", 1); */
+ g_debug("%s", G_STRFUNC);
+
ohm_plugin_conf_get_key (plugin, "acadapter.state", &onac);
if (onac == TRUE) {
ohm_plugin_conf_get_key (plugin, "display.value_ac", &value);
} else {
ohm_plugin_conf_get_key (plugin, "display.value_battery", &value);
}
+ g_debug("%s: acadapter.state = %d, setting brightness %d", G_STRFUNC, onac, value);
/* dim screen to idle brightness */
ohm_plugin_conf_set_key (plugin, "backlight.percent_brightness", value);
@@ -63,6 +66,8 @@ brightness_momentary (OhmPlugin *plugin, gboolean is_idle)
gint value;
gint state;
+ g_debug("%s", G_STRFUNC);
+
ohm_plugin_conf_get_key (plugin, "backlight.state", &state);
if (state == 0) {
/* work round a idletime bugs */
@@ -78,12 +83,14 @@ brightness_momentary (OhmPlugin *plugin, gboolean is_idle)
/* if not idle any more */
if (is_idle == FALSE) {
+ g_debug("%s: is_idle=FALSE< restting brighness", G_STRFUNC);
reset_brightness (plugin);
return;
}
/* dim screen to idle brightness */
ohm_plugin_conf_get_key (plugin, "display.value_idle", &value);
+ g_debug ("%s: Setting brightness to %d", G_STRFUNC, value);
ohm_plugin_conf_set_key (plugin, "backlight.percent_brightness", value);
}