aboutsummaryrefslogtreecommitdiff
path: root/src/backend-dbus
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend-dbus')
-rw-r--r--src/backend-dbus/actions.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/backend-dbus/actions.c b/src/backend-dbus/actions.c
index d1508f4..41e7056 100644
--- a/src/backend-dbus/actions.c
+++ b/src/backend-dbus/actions.c
@@ -92,6 +92,7 @@ typedef enum
{
PROMPT_NONE,
PROMPT_WITH_ZENITY,
+ PROMPT_WITH_GNOME_SESSION_MANAGER,
PROMPT_WITH_AYATANA
}
prompt_status_t;
@@ -114,6 +115,16 @@ get_prompt_status (IndicatorSessionActionsDbus * self)
g_free (name);
}
+ /* can we use the GNOME's/MATE's session manager prompt? */
+ if ((prompt == PROMPT_NONE) && p && p->session_manager)
+ {
+ GDBusProxy * proxy = G_DBUS_PROXY (p->session_manager);
+ char * name = g_dbus_proxy_get_name_owner (proxy);
+ if (name != NULL)
+ prompt = PROMPT_WITH_GNOME_SESSION_MANAGER;;
+ g_free (name);
+ }
+
/* can we use zenity? */
if ((prompt == PROMPT_NONE) && p && p->zenity)
prompt = PROMPT_WITH_ZENITY;
@@ -776,6 +787,10 @@ my_logout (IndicatorSessionActions * actions)
show_desktop_end_session_dialog (self, END_SESSION_TYPE_LOGOUT);
break;
+ case PROMPT_WITH_GNOME_SESSION_MANAGER:
+ logout_now_gnome_session_manager (self);
+ break;
+
case PROMPT_NONE:
logout_now (self);
break;