summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAli Abdallah <ali.slackware@gmail.com>2009-04-10 17:54:03 +0000
committerAli Abdallah <ali.slackware@gmail.com>2009-04-10 17:54:03 +0000
commitc0748802ac41f216e26124f7204cbc23f4f5cf78 (patch)
treeaa9e98abd124fd963347bf714935cc3d4fe19d4a /src
parente0458a23c55e31138e25e26122513334903eec53 (diff)
downloadixfce4-power-manager-c0748802ac41f216e26124f7204cbc23f4f5cf78.tar.gz
Change the session restart style to if running when we are exiting
(Old svn revision: 7157)
Diffstat (limited to 'src')
-rw-r--r--src/xfpm-manager.c1
-rw-r--r--src/xfpm-session.c7
-rw-r--r--src/xfpm-session.h3
3 files changed, 11 insertions, 0 deletions
diff --git a/src/xfpm-manager.c b/src/xfpm-manager.c
index 5d37ec24..50ebbbe2 100644
--- a/src/xfpm-manager.c
+++ b/src/xfpm-manager.c
@@ -148,6 +148,7 @@ static gboolean
xfpm_manager_quit (XfpmManager *manager)
{
xfpm_manager_release_names (manager);
+ xfpm_session_quit (manager->priv->session);
g_object_unref(G_OBJECT(manager));
diff --git a/src/xfpm-session.c b/src/xfpm-session.c
index e9417b9d..0483cd4f 100644
--- a/src/xfpm-session.c
+++ b/src/xfpm-session.c
@@ -167,3 +167,10 @@ void xfpm_session_set_client_id (XfpmSession *session, const gchar *client_id)
client_session_set_client_id (session->priv->client, client_id);
}
+
+void xfpm_session_quit (XfpmSession *session)
+{
+ g_return_if_fail (XFPM_IS_SESSION (session));
+
+ client_session_set_restart_style (session->priv->client, SESSION_RESTART_IF_RUNNING);
+}
diff --git a/src/xfpm-session.h b/src/xfpm-session.h
index be4d01d7..147bed5f 100644
--- a/src/xfpm-session.h
+++ b/src/xfpm-session.h
@@ -51,6 +51,9 @@ XfpmSession *xfpm_session_new (void);
void xfpm_session_set_client_id (XfpmSession *session,
const gchar *client_id);
+
+/* This is used to change the restart Style */
+void xfpm_session_quit (XfpmSession *session);
G_END_DECLS