[Xfce4-commits] <xfce4-session:xfce-4.10> Fix logic of the --fast action (bug #8857).
Nick Schermer
noreply at xfce.org
Sun May 5 17:36:06 CEST 2013
Updating branch refs/heads/xfce-4.10
to 51e19f01cb5d8f432f58f03a785c703f9afbf9e0 (commit)
from 53f4835ff550e72e45268f0437e213c35ba8ea77 (commit)
commit 51e19f01cb5d8f432f58f03a785c703f9afbf9e0
Author: Nick Schermer <nick at xfce.org>
Date: Sun Jul 22 11:44:49 2012 +0200
Fix logic of the --fast action (bug #8857).
(cherry picked from commit 499a719019e03da90b6901bb0f8a89d06ae167ee)
xfce4-session-logout/main.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/xfce4-session-logout/main.c b/xfce4-session-logout/main.c
index bf8af40..d9067ce 100644
--- a/xfce4-session-logout/main.c
+++ b/xfce4-session-logout/main.c
@@ -48,7 +48,7 @@ gboolean opt_halt = FALSE;
gboolean opt_reboot = FALSE;
gboolean opt_suspend = FALSE;
gboolean opt_hibernate = FALSE;
-gboolean allow_save = FALSE;
+gboolean opt_fast = FALSE;
gboolean opt_version = FALSE;
enum
@@ -83,7 +83,7 @@ static GOptionEntry option_entries[] =
N_("Hibernate without displaying the logout dialog"),
NULL
},
- { "fast", 'f', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &allow_save,
+ { "fast", 'f', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &opt_fast,
N_("Log out quickly; don't save the session"),
NULL
},
@@ -123,6 +123,7 @@ main (int argc, char **argv)
gboolean show_dialog;
gboolean result = FALSE;
guint shutdown_type;
+ gboolean allow_save;
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
@@ -149,6 +150,9 @@ main (int argc, char **argv)
return EXIT_FAILURE;
}
+ /* save the session, unless fast is provided */
+ allow_save = !opt_fast;
+
/* create messsage */
proxy = dbus_g_proxy_new_for_name_owner (conn,
"org.xfce.SessionManager",
More information about the Xfce4-commits
mailing list