aboutsummaryrefslogtreecommitdiff
path: root/src/gtk-dialog/gtk-logout-helper.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-25 16:55:00 -0600
committerTed Gould <ted@gould.cx>2010-02-25 16:55:00 -0600
commit37c3beae2b151742b561f7cae342c6a35314596f (patch)
treed5948c233c58245beafe1b5a88ffed522c9ae369 /src/gtk-dialog/gtk-logout-helper.c
parentab02e295a6e21e1acb577516f0796d0ff4cc7092 (diff)
parentd605a1086d9fd4ca887c42c237aec5c246cda749 (diff)
downloadayatana-indicator-session-37c3beae2b151742b561f7cae342c6a35314596f.tar.gz
ayatana-indicator-session-37c3beae2b151742b561f7cae342c6a35314596f.tar.bz2
ayatana-indicator-session-37c3beae2b151742b561f7cae342c6a35314596f.zip
Fixing ConsoleKit fallback to wait on responses.
Diffstat (limited to 'src/gtk-dialog/gtk-logout-helper.c')
-rw-r--r--src/gtk-dialog/gtk-logout-helper.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/gtk-dialog/gtk-logout-helper.c b/src/gtk-dialog/gtk-logout-helper.c
index 4c6614c..c8635e6 100644
--- a/src/gtk-dialog/gtk-logout-helper.c
+++ b/src/gtk-dialog/gtk-logout-helper.c
@@ -43,19 +43,23 @@ consolekit_fallback (LogoutDialogAction action)
return;
}
+ GError * error = NULL;
+
switch (action) {
case LOGOUT_DIALOG_LOGOUT:
g_warning("Unable to fallback to ConsoleKit for logout as it's a session issue. We need some sort of session handler.");
break;
case LOGOUT_DIALOG_SHUTDOWN:
- dbus_g_proxy_call_no_reply(proxy,
- "Stop",
- G_TYPE_INVALID);
+ dbus_g_proxy_call(proxy,
+ "Stop",
+ &error,
+ G_TYPE_INVALID);
break;
case LOGOUT_DIALOG_RESTART:
- dbus_g_proxy_call_no_reply(proxy,
- "Restart",
- G_TYPE_INVALID);
+ dbus_g_proxy_call(proxy,
+ "Restart",
+ &error,
+ G_TYPE_INVALID);
break;
default:
g_warning("Unknown action");
@@ -64,6 +68,11 @@ consolekit_fallback (LogoutDialogAction action)
g_object_unref(proxy);
+ if (error != NULL) {
+ g_error("Unable to signal ConsoleKit: %s", error->message);
+ g_error_free(error);
+ }
+
return;
}