From bcc1d391440ca6df3b57f30c440b761f2034348f Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 5 Jun 2012 14:53:36 -0500 Subject: constify the machine_sleep_with_context() API --- src/device-menu-mgr.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/device-menu-mgr.c') diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c index beefc3e..0af0af7 100644 --- a/src/device-menu-mgr.c +++ b/src/device-menu-mgr.c @@ -66,7 +66,7 @@ struct _DeviceMenuMgr static void setup_up (DeviceMenuMgr* self); static void device_menu_mgr_rebuild_items (DeviceMenuMgr *self); static void machine_sleep_with_context (DeviceMenuMgr* self, - gchar* type); + const gchar* type); static void show_system_settings (DbusmenuMenuitem * mi, guint timestamp, gpointer userdata); @@ -154,27 +154,25 @@ screensaver_keybinding_changed (GSettings * settings, } static void -machine_sleep_from_suspend (DbusmenuMenuitem * mi, - guint timestamp, - gpointer userdata) +machine_sleep_from_suspend (DbusmenuMenuitem * mi G_GNUC_UNUSED, + guint timestamp G_GNUC_UNUSED, + gpointer userdata) { - DeviceMenuMgr* self = DEVICE_MENU_MGR (userdata); - machine_sleep_with_context (self, "Suspend"); + machine_sleep_with_context (DEVICE_MENU_MGR(userdata), "Suspend"); } static void -machine_sleep_from_hibernate (DbusmenuMenuitem * mi, - guint timestamp, - gpointer userdata) +machine_sleep_from_hibernate (DbusmenuMenuitem * mi G_GNUC_UNUSED, + guint timestamp G_GNUC_UNUSED, + gpointer userdata) { - DeviceMenuMgr* self = DEVICE_MENU_MGR (userdata); - machine_sleep_with_context (self, "Hibernate"); + machine_sleep_with_context (DEVICE_MENU_MGR(userdata), "Hibernate"); } /* Let's put this machine to sleep, with some info on how it should sleep. */ static void -machine_sleep_with_context (DeviceMenuMgr* self, gchar* type) +machine_sleep_with_context (DeviceMenuMgr* self, const gchar* type) { if (self->up_main_proxy == NULL) { g_warning("Can not %s as no upower proxy", type); -- cgit v1.2.3