aboutsummaryrefslogtreecommitdiff
path: root/src/device-menu-mgr.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-06-05 14:53:36 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-06-05 14:53:36 -0500
commitbcc1d391440ca6df3b57f30c440b761f2034348f (patch)
treea5a544336e9d33d840b3cb69dc3d2d3db3317cfa /src/device-menu-mgr.c
parent19dd59771d7921fa927840d9864e8ba7b4795a87 (diff)
downloadayatana-indicator-session-bcc1d391440ca6df3b57f30c440b761f2034348f.tar.gz
ayatana-indicator-session-bcc1d391440ca6df3b57f30c440b761f2034348f.tar.bz2
ayatana-indicator-session-bcc1d391440ca6df3b57f30c440b761f2034348f.zip
constify the machine_sleep_with_context() API
Diffstat (limited to 'src/device-menu-mgr.c')
-rw-r--r--src/device-menu-mgr.c22
1 files changed, 10 insertions, 12 deletions
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);