always properly saved when rebooting or shutting down from the
xfce4-session-logout dialog or the actions panel plugin.
This commit is contained in:
landry 2012-08-06 13:28:15 +00:00
parent 85390daaf6
commit 6d36d1f5a1
4 changed files with 84 additions and 4 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.49 2012/06/15 08:30:25 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.50 2012/08/06 13:28:15 landry Exp $
COMMENT= Xfce4 desktop panel
XFCE_PROJECT= xfce4-panel
SHARED_LIBS= xfce4panel-1.0 1.0 # 4.0
REVISION= 0
REVISION= 1
# GPLv2
PERMIT_DISTFILES_CDROM= Yes

View File

@ -0,0 +1,40 @@
$OpenBSD: patch-plugins_actions_actions_c,v 1.1 2012/08/06 13:28:15 landry Exp $
http://git.xfce.org/xfce/xfce4-panel/commit/?id=17643fd28f499691ae97503eb58755b4b9fabb53
--- plugins/actions/actions.c.orig Sat Apr 28 22:31:35 2012
+++ plugins/actions/actions.c Mon Aug 6 15:25:02 2012
@@ -705,7 +705,7 @@ actions_plugin_action_confirmation_time (gpointer data
if (timeout->time_left == 0)
{
- /* unattended shutdown, so don't allow apps to cancel shutdown */
+ /* unattended shutdown, don't save the session to avoid blocking the logout */
timeout->unattended = TRUE;
gtk_dialog_response (GTK_DIALOG (timeout->dialog),
@@ -928,22 +928,22 @@ actions_plugin_action_activate (GtkWidget *widget
{
case ACTION_TYPE_LOGOUT:
succeed = actions_plugin_action_dbus_xfsm ("Logout", FALSE,
- unattended, &error);
+ !unattended, &error);
break;
case ACTION_TYPE_LOGOUT_DIALOG:
succeed = actions_plugin_action_dbus_xfsm ("Logout", TRUE,
- unattended, &error);
+ !unattended, &error);
break;
case ACTION_TYPE_RESTART:
succeed = actions_plugin_action_dbus_xfsm ("Restart", FALSE,
- unattended, &error);
+ !unattended, &error);
break;
case ACTION_TYPE_SHUTDOWN:
succeed = actions_plugin_action_dbus_xfsm ("Shutdown", FALSE,
- unattended, &error);
+ !unattended, &error);
break;
case ACTION_TYPE_HIBERNATE:

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.59 2012/06/15 08:30:25 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.60 2012/08/06 13:28:15 landry Exp $
COMMENT= Xfce4 session manager
XFCE_PROJECT= xfce4-session
REVISION= 1
REVISION= 2
SHARED_LIBS += xfsm-4.6 1.0 # .0.0

View File

@ -0,0 +1,40 @@
$OpenBSD: patch-xfce4-session-logout_main_c,v 1.1 2012/08/06 13:28:15 landry Exp $
http://git.xfce.org/xfce/xfce4-session/commit/?id=499a719019e03da90b6901bb0f8a89d06ae167ee
--- xfce4-session-logout/main.c.orig Sat Apr 28 22:43:27 2012
+++ xfce4-session-logout/main.c Mon Aug 6 15:26:05 2012
@@ -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");
@@ -148,6 +149,9 @@ main (int argc, char **argv)
g_error_free (err);
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,