aboutsummaryrefslogtreecommitdiff
path: root/src/device-menu-mgr.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-02-07 16:45:50 -0600
committerTed Gould <ted@gould.cx>2012-02-07 16:45:50 -0600
commit361c2e6d7d1b51b0409a710affe3192b128cd909 (patch)
treef82aada3a6e72ca61287243101c0cbdb173e61b9 /src/device-menu-mgr.c
parent4f3cb40de26e5e60ab4b9426fe64b6a098a8f470 (diff)
parent38923e553288e7d69d7c524bd1a7010cc83e77db (diff)
downloadayatana-indicator-session-361c2e6d7d1b51b0409a710affe3192b128cd909.tar.gz
ayatana-indicator-session-361c2e6d7d1b51b0409a710affe3192b128cd909.tar.bz2
ayatana-indicator-session-361c2e6d7d1b51b0409a710affe3192b128cd909.zip
Screensaver code cleanup
Diffstat (limited to 'src/device-menu-mgr.c')
-rw-r--r--src/device-menu-mgr.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c
index 6ce5962..f8f0696 100644
--- a/src/device-menu-mgr.c
+++ b/src/device-menu-mgr.c
@@ -82,7 +82,6 @@ static DBusGProxy * up_prop_proxy = NULL;
static void device_menu_mgr_ensure_settings_client (DeviceMenuMgr* self);
static void setup_up (DeviceMenuMgr* self);
static void device_menu_mgr_rebuild_items (DeviceMenuMgr *self);
-static void lock_if_possible (DeviceMenuMgr* self);
static void machine_sleep_with_context (DeviceMenuMgr* self,
gchar* type);
static void show_system_settings_with_context (DbusmenuMenuitem * mi,
@@ -172,27 +171,6 @@ keybinding_changed (GSettings *settings,
return;
}
-/* Check to see if the lockdown key is protecting from
- locking the screen. If not, lock it. */
-static void
-lock_if_possible (DeviceMenuMgr* self) {
- device_menu_mgr_ensure_settings_client (self);
-
- if (!g_settings_get_boolean (lockdown_settings, LOCKDOWN_KEY_SCREENSAVER)) {
- lock_screen (NULL, 0, NULL);
- }
- return;
-}
-
-/* A return from the command to sleep the system. Make sure
- that we unthrottle the screensaver. */
-static void
-sleep_response (DBusGProxy * proxy, DBusGProxyCall * call, gpointer data)
-{
- screensaver_unthrottle();
- return;
-}
-
static void
machine_sleep_from_suspend (DbusmenuMenuitem * mi,
guint timestamp,
@@ -220,11 +198,9 @@ machine_sleep_with_context (DeviceMenuMgr* self, gchar* type)
g_warning("Can not %s as no upower proxy", type);
}
- screensaver_throttle(type);
- lock_if_possible (self);
dbus_g_proxy_begin_call(up_main_proxy,
type,
- sleep_response,
+ NULL,
NULL,
NULL,
G_TYPE_INVALID);