summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Taylor <rob.taylor@codethink.co.uk>2007-08-20 10:12:31 +0100
committerRob Taylor <rob.taylor@codethink.co.uk>2007-08-22 15:17:50 +0100
commit26315eca26197a541184190f41d6683f8939d003 (patch)
treed35f229f089813aab23d6993e2f9ecf5bb696709
parentaf911c97b3e14271d50c68632760324efcb4fdf9 (diff)
convert existing policy plugins to use the timeouts policy module
Convert suspend and display policy plugins to use the new timouts policy instead of the old idle plugin interface.
-rw-r--r--plugins/policy/display/ohm-plugin-display.c14
-rw-r--r--plugins/policy/suspend/ohm-plugin-suspend.c8
2 files changed, 11 insertions, 11 deletions
diff --git a/plugins/policy/display/ohm-plugin-display.c b/plugins/policy/display/ohm-plugin-display.c
index a81f1d2..cfb032c 100644
--- a/plugins/policy/display/ohm-plugin-display.c
+++ b/plugins/policy/display/ohm-plugin-display.c
@@ -30,8 +30,8 @@ enum {
CONF_BRIGHTNESS_AC_CHANGED,
CONF_BRIGHTNESS_BATTERY_CHANGED,
CONF_BRIGHTNESS_IDLE_CHANGED,
- CONF_IDLE_POWERSAVE_CHANGED,
- CONF_IDLE_MOMENTARY_CHANGED,
+ CONF_TIMEOUTS_POWERSAVE_CHANGED,
+ CONF_TIMEOUTS_MOMENTARY_CHANGED,
CONF_LAST
};
@@ -147,7 +147,7 @@ plugin_notify (OhmPlugin *plugin, gint id, gint value)
case CONF_BRIGHTNESS_IDLE_CHANGED:
reset_brightness (plugin);
break;
- case CONF_IDLE_POWERSAVE_CHANGED:
+ case CONF_TIMEOUTS_POWERSAVE_CHANGED:
backlight_powersave (plugin, (value == 1));
break;
case CONF_LID_STATE_CHANGED:
@@ -164,7 +164,7 @@ plugin_notify (OhmPlugin *plugin, gint id, gint value)
case CONF_BACKLIGHT_STATE_CHANGED:
reset_brightness (plugin);
break;
- case CONF_IDLE_MOMENTARY_CHANGED:
+ case CONF_TIMEOUTS_MOMENTARY_CHANGED:
brightness_momentary (plugin, (value == 1));
break;
}
@@ -181,7 +181,7 @@ OHM_PLUGIN_DESCRIPTION (
);
OHM_PLUGIN_SUGGESTS (
- "idle",
+ "timeouts",
"acadapter",
"buttons",
"xrandr",
@@ -193,8 +193,8 @@ OHM_PLUGIN_INTERESTED (
{"backlight.state", CONF_BACKLIGHT_STATE_CHANGED},
{"button.lid", CONF_LID_STATE_CHANGED},
{"button.tablet", CONF_TABLET_STATE_CHANGED},
- {"idle.powersave", CONF_IDLE_POWERSAVE_CHANGED},
- {"idle.momentary", CONF_IDLE_MOMENTARY_CHANGED},
+ {"timeouts.powersave", CONF_TIMEOUTS_POWERSAVE_CHANGED},
+ {"timeouts.momentary", CONF_TIMEOUTS_MOMENTARY_CHANGED},
{"display.value_ac", CONF_BRIGHTNESS_AC_CHANGED},
{"display.value_battery", CONF_BRIGHTNESS_BATTERY_CHANGED},
{"display.value_idle", CONF_BRIGHTNESS_IDLE_CHANGED}
diff --git a/plugins/policy/suspend/ohm-plugin-suspend.c b/plugins/policy/suspend/ohm-plugin-suspend.c
index 2c3d5c5..794dcef 100644
--- a/plugins/policy/suspend/ohm-plugin-suspend.c
+++ b/plugins/policy/suspend/ohm-plugin-suspend.c
@@ -30,7 +30,7 @@
enum {
CONF_BUTTON_POWER_CHANGED,
CONF_BUTTON_LID_CHANGED,
- CONF_IDLE_POWERDOWN_CHANGED,
+ CONF_TIMEOUTS_POWERDOWN_CHANGED,
CONF_INHIBIT_CHANGED,
CONF_LAST
};
@@ -148,7 +148,7 @@ plugin_notify (OhmPlugin *plugin, gint id, gint value)
if (value == 1) {
power_button_pressed (plugin);
}
- } else if (id == CONF_IDLE_POWERDOWN_CHANGED) {
+ } else if (id == CONF_TIMEOUTS_POWERDOWN_CHANGED) {
/* only match on idle, not reset */
if (value == 1) {
system_is_idle (plugin);
@@ -167,13 +167,13 @@ OHM_PLUGIN_DESCRIPTION (
);
OHM_PLUGIN_SUGGESTS (
- "idle",
+ "timeouts",
"buttons"
);
OHM_PLUGIN_INTERESTED (
{"button.power", CONF_BUTTON_POWER_CHANGED},
{"button.lid", CONF_BUTTON_LID_CHANGED},
- {"idle.powerdown", CONF_IDLE_POWERDOWN_CHANGED},
+ {"timeouts.powerdown", CONF_TIMEOUTS_POWERDOWN_CHANGED},
{"suspend.fixme_inhibit", CONF_INHIBIT_CHANGED}
);