From 46250bfcf014c2e99395b712ca9bf0fb0b500edd Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 2 Feb 2010 16:21:47 -0800 Subject: Changing the lock_screen function to match the new activate prototype. --- src/lock-helper.c | 2 +- src/lock-helper.h | 2 +- src/session-service.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lock-helper.c b/src/lock-helper.c index 0bdec6c..991aba2 100644 --- a/src/lock-helper.c +++ b/src/lock-helper.c @@ -279,7 +279,7 @@ activate_timeout (gpointer data) /* A fun little function to actually lock the screen. If, that's what you want, let's do it! */ void -lock_screen (DbusmenuMenuitem * mi, gpointer data) +lock_screen (DbusmenuMenuitem * mi, guint timestamp, gpointer data) { g_debug("Lock Screen"); if (!will_lock_screen()) { diff --git a/src/lock-helper.h b/src/lock-helper.h index b4a382e..ebcd635 100644 --- a/src/lock-helper.h +++ b/src/lock-helper.h @@ -30,7 +30,7 @@ void screensaver_throttle (gchar * reason); void screensaver_unthrottle (void); gboolean will_lock_screen (void); -void lock_screen (DbusmenuMenuitem * mi, gpointer data); +void lock_screen (DbusmenuMenuitem * mi, guint timestamp, gpointer data); gboolean lock_screen_setup (gpointer data); void lock_screen_gdm_cb_set (gdm_autologin_cb_t cb); diff --git a/src/session-service.c b/src/session-service.c index bec7749..d6cada7 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -101,7 +101,7 @@ machine_sleep (DbusmenuMenuitem * mi, gpointer userdata) } screensaver_throttle(type); - lock_screen(NULL, NULL); + lock_screen(NULL, 0, NULL); dbus_g_proxy_begin_call(dkp_main_proxy, type, -- cgit v1.2.3 From bf210e14548de5629a2cd48e0507f83ff0cf9587 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 2 Feb 2010 16:27:39 -0800 Subject: Changing more prototypes to match the new activate signal. --- src/session-service.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/session-service.c b/src/session-service.c index d6cada7..2e7b1a2 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -92,7 +92,7 @@ sleep_response (DBusGProxy * proxy, DBusGProxyCall * call, gpointer data) /* Let's put this machine to sleep, with some info on how it should sleep. */ static void -machine_sleep (DbusmenuMenuitem * mi, gpointer userdata) +machine_sleep (DbusmenuMenuitem * mi, guint timestamp, gpointer userdata) { gchar * type = (gchar *)userdata; @@ -245,7 +245,7 @@ setup_dkp (void) { but it seems that in the future it should figure out what's going on and something better. */ static void -show_dialog (DbusmenuMenuitem * mi, gchar * type) +show_dialog (DbusmenuMenuitem * mi, guint timestamp, gchar * type) { gchar * helper = g_build_filename(LIBEXECDIR, "gtk-logout-helper", NULL); gchar * dialog_line = g_strdup_printf("%s --%s", helper, type); @@ -298,7 +298,7 @@ check_guest_session (void) /* Called when someone clicks on the guest session item. */ static void -activate_guest_session (DbusmenuMenuitem * mi, gpointer user_data) +activate_guest_session (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data) { GError * error = NULL; if (!g_spawn_command_line_async(GUEST_SESSION_LAUNCHER, &error)) { @@ -338,7 +338,7 @@ check_new_session (void) /* Starts a new generic session */ static void -activate_new_session (DbusmenuMenuitem * mi, gpointer user_data) +activate_new_session (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data) { GError * error = NULL; if (!g_spawn_command_line_async("gdmflexiserver --startnew", &error)) { @@ -351,7 +351,7 @@ activate_new_session (DbusmenuMenuitem * mi, gpointer user_data) /* Activates a session for a particular user. */ static void -activate_user_session (DbusmenuMenuitem *mi, gpointer user_data) +activate_user_session (DbusmenuMenuitem *mi, guint timestamp, gpointer user_data) { UserData *user = (UserData *)user_data; UsersServiceDbus *service = user->service; -- cgit v1.2.3 From 9d061e9432e672c5fdc33bee56f42941f0d993d7 Mon Sep 17 00:00:00 2001 From: Marc Deslauriers Date: Thu, 4 Feb 2010 09:52:52 -0800 Subject: - src/lock-helper.c: use dbus_g_proxy_new_for_name so when gnome-screensaver gets respawned by D-Bus, indicator-session will still be able to communicate with it. (LP: #484603) --- src/lock-helper.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lock-helper.c b/src/lock-helper.c index 0bdec6c..f30e866 100644 --- a/src/lock-helper.c +++ b/src/lock-helper.c @@ -248,11 +248,10 @@ build_gss_proxy (void) DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); g_return_if_fail(session_bus != NULL); - gss_proxy = dbus_g_proxy_new_for_name_owner(session_bus, - "org.gnome.ScreenSaver", - "/", - "org.gnome.ScreenSaver", - NULL); + gss_proxy = dbus_g_proxy_new_for_name(session_bus, + "org.gnome.ScreenSaver", + "/", + "org.gnome.ScreenSaver"); g_return_if_fail(gss_proxy != NULL); dbus_g_proxy_add_signal(gss_proxy, "ActiveChanged", G_TYPE_BOOLEAN, G_TYPE_INVALID); -- cgit v1.2.3