1 diff -r -c xfce4-session-4.8.2/panel-plugin/xfsm-logout-plugin.c xfce4-session-working/panel-plugin/xfsm-logout-plugin.c
2 *** xfce4-session-4.8.2/panel-plugin/xfsm-logout-plugin.c 2011-09-13 09:17:17.000000000 -0700
3 --- xfce4-session-working/panel-plugin/xfsm-logout-plugin.c 2011-09-30 12:46:00.519182001 -0700
9 XFSM_SHUTDOWN_HIBERNATE,
10 + XFSM_SHUTDOWN_SWITCH_USER,
11 + XFSM_SHUTDOWN_LOCK_SCREEN,
19 static void xfsm_logout_plugin_lock_screen(GtkAction *action,
21 + static void xfsm_logout_plugin_switch_user(GtkAction *action,
22 + gpointer user_data);
23 static void xfsm_logout_plugin_do_something(GtkAction *action,
30 { "session-menu", NULL, N_("Session"), NULL, NULL, NULL },
31 { "lock-screen", "system-lock-screen", N_("Loc_k screen"), NULL, NULL, G_CALLBACK(xfsm_logout_plugin_lock_screen) },
32 + { "switch-user", "system-switch-user", N_("Switch _user"), NULL, NULL, G_CALLBACK(xfsm_logout_plugin_switch_user) },
33 { "suspend", "xfsm-suspend", N_("_Suspend"), NULL, NULL, G_CALLBACK(xfsm_logout_plugin_do_something) },
34 { "hibernate", "xfsm-hibernate", N_("_Hibernate"), NULL, NULL, G_CALLBACK(xfsm_logout_plugin_do_something) },
35 { "reboot", "xfsm-reboot", N_("_Reboot"), NULL, NULL, G_CALLBACK(xfsm_logout_plugin_do_something) },
36 { "shutdown", "system-shutdown", N_("Shut _down"), NULL, NULL, G_CALLBACK(xfsm_logout_plugin_do_something) },
37 { "logout", "system-log-out", N_("_Log out"), NULL, NULL, G_CALLBACK(xfsm_logout_plugin_do_something) },
45 N_("Failed to hibernate")
50 xfsm_logout_plugin_lock_screen(GtkAction *action,
57 N_("Failed to hibernate")
59 + { /* XFSM_SHUTDOWN_SWITCH_USER */
63 + "system-switch-user",
64 + N_("Failed to switch user")
66 + { /* XFSM_SHUTDOWN_LOCK_SCREEN */
71 + N_("Failed to lock screen")
76 xfsm_logout_plugin_lock_screen(GtkAction *action,
88 + xfsm_logout_plugin_switch_user(GtkAction *action,
91 + GError *error = NULL;
93 + if (!g_spawn_command_line_async("gdmflexiserver", &error)) {
94 + xfce_dialog_show_error (NULL,
96 + _("gdmflexiserver could not be launched"));
101 xfsm_logout_plugin_do_dbus_call(XfsmLogoutPlugin *logout_plugin,
102 XfsmShutdownType type,
106 type = XFSM_SHUTDOWN_SUSPEND;
107 else if(!strcmp(name, "hibernate"))
108 type = XFSM_SHUTDOWN_HIBERNATE;
109 + else if(!strcmp(name, "switch-user"))
110 + type = XFSM_SHUTDOWN_SWITCH_USER;
112 g_critical(G_STRLOC ": Invalid action \"%s\"", name);
114 diff -r -c xfce4-session-4.8.2/panel-plugin/xfsm-logout-plugin-ui.h xfce4-session-working/panel-plugin/xfsm-logout-plugin-ui.h
115 *** xfce4-session-4.8.2/panel-plugin/xfsm-logout-plugin-ui.h 2011-09-13 09:17:44.000000000 -0700
116 --- xfce4-session-working/panel-plugin/xfsm-logout-plugin-ui.h 2011-09-30 15:47:40.505398430 -0700
121 "<ui><menubar name=\"main-menubar\"><menu action=\"session-menu\"><menui"
122 ! "tem action=\"lock-screen\"/><separator/><menuitem action=\"suspend\"/><"
123 "menuitem action=\"hibernate\"/><separator/><menuitem action=\"reboot\"/"
124 ! "><menuitem action=\"shutdown\"/><separator/><menuitem action=\"logout\""
125 ! "/></menu></menubar></ui>"
128 static const unsigned logout_plugin_ui_length = 292u;
132 "<ui><menubar name=\"main-menubar\"><menu action=\"session-menu\"><menui"
133 ! "tem action=\"lock-screen\"/><separator/><menuitem action=\"switch-user\""
134 ! "/><separator/><menuitem action=\"logout\""
135 ! "/><separator/><menuitem action=\"suspend\"/><separator/><"
136 "menuitem action=\"hibernate\"/><separator/><menuitem action=\"reboot\"/"
137 ! "><menuitem action=\"shutdown\"/><separator/></menu></menubar></ui>"
140 static const unsigned logout_plugin_ui_length = 292u;
141 diff -r -c xfce4-session-4.8.2/panel-plugin/xfsm-logout-plugin-ui.xml xfce4-session-working/panel-plugin/xfsm-logout-plugin-ui.xml
142 *** xfce4-session-4.8.2/panel-plugin/xfsm-logout-plugin-ui.xml 2011-09-13 09:17:17.000000000 -0700
143 --- xfce4-session-working/panel-plugin/xfsm-logout-plugin-ui.xml 2011-09-30 15:54:59.703685558 -0700
146 <menubar name="main-menubar">
147 <menu action="session-menu">
148 <menuitem action="lock-screen"/>
150 <menuitem action="suspend"/>
151 <menuitem action="hibernate"/>
153 - <menuitem action="reboot"/>
154 - <menuitem action="shutdown"/>
156 - <menuitem action="logout"/>
161 <menubar name="main-menubar">
162 <menu action="session-menu">
163 <menuitem action="lock-screen"/>
164 + <menuitem action="switch-user"/>
165 + <menuitem action="logout"/>
167 + <menuitem action="shutdown"/>
168 + <menuitem action="reboot"/>
169 <menuitem action="suspend"/>
170 <menuitem action="hibernate"/>
174 diff -r -c xfce4-session-4.8.2/xfce4-session/main.c xfce4-session-working/xfce4-session/main.c
175 *** xfce4-session-4.8.2/xfce4-session/main.c 2011-09-13 09:17:17.000000000 -0700
176 --- xfce4-session-working/xfce4-session/main.c 2011-09-30 14:05:11.179381123 -0700
182 shutdown_type = xfsm_manager_get_shutdown_type (manager);
184 + if ((shutdown_type == XFSM_SHUTDOWN_LOCK_SCREEN) || (shutdown_type == XFSM_SHUTDOWN_SWITCH_USER))
186 + return EXIT_SUCCESS;
189 g_object_unref (manager);
190 g_object_unref (channel);
192 diff -r -c xfce4-session-4.8.2/xfce4-session/shutdown.c xfce4-session-working/xfce4-session/shutdown.c
193 *** xfce4-session-4.8.2/xfce4-session/shutdown.c 2011-09-13 09:17:17.000000000 -0700
194 --- xfce4-session-working/xfce4-session/shutdown.c 2011-09-30 15:57:33.306420037 -0700
198 gtk_dialog_response (GTK_DIALOG (shutdown_dialog), GTK_RESPONSE_OK);
202 + lock_screen_button_clicked (GtkWidget *b, gint *shutdownType)
204 + *shutdownType = XFSM_SHUTDOWN_LOCK_SCREEN;
206 + gtk_dialog_response (GTK_DIALOG (shutdown_dialog), GTK_RESPONSE_OK);
210 + switch_user_button_clicked (GtkWidget *b, gint *shutdownType)
212 + *shutdownType = XFSM_SHUTDOWN_SWITCH_USER;
214 + gtk_dialog_response (GTK_DIALOG (shutdown_dialog), GTK_RESPONSE_OK);
223 GtkWidget *halt_button;
224 GtkWidget *suspend_button = NULL;
225 GtkWidget *hibernate_button = NULL;
226 + GtkWidget *lock_screen_button;
227 + GtkWidget *switch_user_button;
228 GtkWidget *cancel_button;
229 GtkWidget *ok_button;
235 gboolean show_suspend;
236 gboolean show_hibernate;
238 + gboolean show_switch_user;
239 + gboolean show_lock_screen;
241 gboolean show_restart;
242 gboolean show_shutdown;
246 prompt = xfconf_channel_get_bool (channel, "/general/PromptOnLogout", TRUE);
247 show_suspend = xfconf_channel_get_bool (channel, "/shutdown/ShowSuspend", TRUE);
248 show_hibernate = xfconf_channel_get_bool (channel, "/shutdown/ShowHibernate", TRUE);
249 + show_lock_screen = xfconf_channel_get_bool (channel, "/general/ShowLockScreen", TRUE);
250 + show_switch_user = xfconf_channel_get_bool (channel, "/general/ShowSwitchUser", TRUE);
252 /* make the session-save settings obey the kiosk settings */
253 if (!kiosk_can_save_session)
257 gtk_widget_show (hbox);
258 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
261 + if (kiosk_can_shutdown && show_lock_screen)
263 + lock_screen_button = gtk_button_new ();
264 + gtk_widget_show (lock_screen_button);
265 + gtk_box_pack_start (GTK_BOX (hbox), lock_screen_button, TRUE, TRUE, 0);
267 + g_signal_connect (lock_screen_button, "clicked",
268 + G_CALLBACK (lock_screen_button_clicked), shutdownType);
270 + vbox2 = gtk_vbox_new (FALSE, BORDER);
271 + gtk_container_set_border_width (GTK_CONTAINER (vbox2), BORDER);
272 + gtk_widget_show (vbox2);
273 + gtk_container_add (GTK_CONTAINER (lock_screen_button), vbox2);
275 + icon = gtk_icon_theme_load_icon (icon_theme,
282 + icon = gtk_icon_theme_load_icon (icon_theme,
283 + "xfsm-lock-screen",
285 + GTK_ICON_LOOKUP_GENERIC_FALLBACK,
288 + image = gtk_image_new_from_pixbuf (icon);
289 + gtk_widget_show (image);
290 + gtk_box_pack_start (GTK_BOX (vbox2), image, FALSE, FALSE, 0);
291 + g_object_unref (icon);
293 + label = gtk_label_new (_("Lock Screen"));
294 + gtk_widget_show (label);
295 + gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
299 + if (kiosk_can_shutdown && show_switch_user)
301 + switch_user_button = gtk_button_new ();
302 + gtk_widget_show (switch_user_button);
303 + gtk_box_pack_start (GTK_BOX (hbox), switch_user_button, TRUE, TRUE, 0);
305 + g_signal_connect (switch_user_button, "clicked",
306 + G_CALLBACK (switch_user_button_clicked), shutdownType);
308 + vbox2 = gtk_vbox_new (FALSE, BORDER);
309 + gtk_container_set_border_width (GTK_CONTAINER (vbox2), BORDER);
310 + gtk_widget_show (vbox2);
311 + gtk_container_add (GTK_CONTAINER (switch_user_button), vbox2);
313 + icon = gtk_icon_theme_load_icon (icon_theme,
314 + "system-switch-user",
320 + icon = gtk_icon_theme_load_icon (icon_theme,
323 + GTK_ICON_LOOKUP_GENERIC_FALLBACK,
326 + image = gtk_image_new_from_pixbuf (icon);
327 + gtk_widget_show (image);
328 + gtk_box_pack_start (GTK_BOX (vbox2), image, FALSE, FALSE, 0);
329 + g_object_unref (icon);
331 + label = gtk_label_new (_("Switch User"));
332 + gtk_widget_show (label);
333 + gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
337 logout_button = gtk_button_new ();
338 gtk_widget_show (logout_button);
341 gtk_widget_show (label);
342 gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
345 ! reboot_button = gtk_button_new ();
346 ! gtk_widget_show (reboot_button);
347 ! gtk_box_pack_start (GTK_BOX (hbox), reboot_button, TRUE, TRUE, 0);
349 ! g_signal_connect (reboot_button, "clicked",
350 ! G_CALLBACK (reboot_button_clicked), shutdownType);
352 vbox2 = gtk_vbox_new (FALSE, BORDER);
353 gtk_container_set_border_width (GTK_CONTAINER (vbox2), BORDER);
354 gtk_widget_show (vbox2);
355 ! gtk_container_add (GTK_CONTAINER (reboot_button), vbox2);
357 icon = gtk_icon_theme_load_icon (icon_theme,
364 icon = gtk_icon_theme_load_icon (icon_theme,
367 GTK_ICON_LOOKUP_GENERIC_FALLBACK,
370 gtk_widget_show (label);
371 gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
373 ! if (!kiosk_can_shutdown || !show_shutdown)
374 ! gtk_widget_set_sensitive (halt_button, FALSE);
377 ! g_object_get (shutdown_helper,
378 ! "user-can-suspend", &show_suspend,
381 ! if (show_hibernate)
382 ! g_object_get (shutdown_helper,
383 ! "user-can-hibernate", &show_hibernate,
387 ! if (kiosk_can_shutdown && (show_suspend || show_hibernate))
389 ! hbox = gtk_hbox_new (FALSE, BORDER);
390 ! gtk_widget_show (hbox);
391 ! gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
395 ! halt_button = gtk_button_new ();
396 ! gtk_widget_show (halt_button);
397 ! gtk_box_pack_start (GTK_BOX (hbox), halt_button, TRUE, TRUE, 0);
399 ! g_signal_connect (halt_button, "clicked",
400 ! G_CALLBACK (halt_button_clicked), shutdownType);
402 vbox2 = gtk_vbox_new (FALSE, BORDER);
403 gtk_container_set_border_width (GTK_CONTAINER (vbox2), BORDER);
404 gtk_widget_show (vbox2);
405 ! gtk_container_add (GTK_CONTAINER (halt_button), vbox2);
407 icon = gtk_icon_theme_load_icon (icon_theme,
414 icon = gtk_icon_theme_load_icon (icon_theme,
417 GTK_ICON_LOOKUP_GENERIC_FALLBACK,
421 gtk_box_pack_start (GTK_BOX (vbox2), image, FALSE, FALSE, 0);
422 g_object_unref (icon);
424 ! label = gtk_label_new (_("Restart"));
425 gtk_widget_show (label);
426 gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
428 g_object_get (shutdown_helper,
429 ! "user-can-restart", &show_restart,
432 ! if (!kiosk_can_shutdown || !show_restart )
433 ! gtk_widget_set_sensitive (reboot_button, FALSE);
436 ! halt_button = gtk_button_new ();
437 ! gtk_widget_show (halt_button);
438 ! gtk_box_pack_start (GTK_BOX (hbox), halt_button, TRUE, TRUE, 0);
440 ! g_signal_connect (halt_button, "clicked",
441 ! G_CALLBACK (halt_button_clicked), shutdownType);
443 vbox2 = gtk_vbox_new (FALSE, BORDER);
444 gtk_container_set_border_width (GTK_CONTAINER (vbox2), BORDER);
445 gtk_widget_show (vbox2);
446 ! gtk_container_add (GTK_CONTAINER (halt_button), vbox2);
448 icon = gtk_icon_theme_load_icon (icon_theme,
455 icon = gtk_icon_theme_load_icon (icon_theme,
458 GTK_ICON_LOOKUP_GENERIC_FALLBACK,
461 gtk_box_pack_start (GTK_BOX (vbox2), image, FALSE, FALSE, 0);
462 g_object_unref (icon);
464 ! label = gtk_label_new (_("Shut Down"));
465 gtk_widget_show (label);
466 gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
468 g_object_get (shutdown_helper,
469 ! "user-can-shutdown", &show_shutdown,
473 ! reboot_button = gtk_button_new ();
474 ! gtk_widget_show (reboot_button);
475 ! gtk_box_pack_start (GTK_BOX (hbox), reboot_button, TRUE, TRUE, 0);
477 ! g_signal_connect (reboot_button, "clicked",
478 ! G_CALLBACK (reboot_button_clicked), shutdownType);
480 vbox2 = gtk_vbox_new (FALSE, BORDER);
481 gtk_container_set_border_width (GTK_CONTAINER (vbox2), BORDER);
482 gtk_widget_show (vbox2);
483 ! gtk_container_add (GTK_CONTAINER (reboot_button), vbox2);
485 icon = gtk_icon_theme_load_icon (icon_theme,
492 icon = gtk_icon_theme_load_icon (icon_theme,
495 GTK_ICON_LOOKUP_GENERIC_FALLBACK,
499 gtk_box_pack_start (GTK_BOX (vbox2), image, FALSE, FALSE, 0);
500 g_object_unref (icon);
502 ! label = gtk_label_new (_("Shut Down"));
503 gtk_widget_show (label);
504 gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
506 g_object_get (shutdown_helper,
507 ! "user-can-shutdown", &show_shutdown,
510 ! if (!kiosk_can_shutdown || !show_shutdown)
511 ! gtk_widget_set_sensitive (halt_button, FALSE);
514 ! g_object_get (shutdown_helper,
515 ! "user-can-suspend", &show_suspend,
518 ! if (show_hibernate)
519 ! g_object_get (shutdown_helper,
520 ! "user-can-hibernate", &show_hibernate,
524 ! if (kiosk_can_shutdown && (show_suspend || show_hibernate))
526 ! hbox = gtk_hbox_new (FALSE, BORDER);
527 ! gtk_widget_show (hbox);
528 ! gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
532 if (kiosk_can_shutdown && show_suspend)
534 gtk_box_pack_start (GTK_BOX (vbox2), image, FALSE, FALSE, 0);
535 g_object_unref (icon);
537 ! label = gtk_label_new (_("Restart"));
538 gtk_widget_show (label);
539 gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
541 g_object_get (shutdown_helper,
542 ! "user-can-restart", &show_restart,
545 ! if (!kiosk_can_shutdown || !show_restart )
546 ! gtk_widget_set_sensitive (reboot_button, FALSE);
549 if (kiosk_can_shutdown && show_suspend)
552 g_object_get (shutdown_helper,
553 "require-password", &require_password,
557 ! if (result == GTK_RESPONSE_OK && *shutdownType != XFSM_SHUTDOWN_LOGOUT
558 ! && require_password )
560 gtk_widget_show (ok_button);
563 g_object_get (shutdown_helper,
564 "require-password", &require_password,
567 ! if ((result == GTK_RESPONSE_OK && *shutdownType != XFSM_SHUTDOWN_LOGOUT
568 ! && require_password) )
570 gtk_widget_show (ok_button);
576 GError *error = NULL;
579 if (type == XFSM_SHUTDOWN_ASK)
584 GError *error = NULL;
587 if (type == XFSM_SHUTDOWN_ASK)
589 diff -r -c xfce4-session-4.8.2/xfce4-session/xfsm-global.h xfce4-session-working/xfce4-session/xfsm-global.h
590 *** xfce4-session-4.8.2/xfce4-session/xfsm-global.h 2011-09-13 09:17:17.000000000 -0700
591 --- xfce4-session-working/xfce4-session/xfsm-global.h 2011-09-29 19:25:34.000000000 -0700
595 XFSM_SHUTDOWN_REBOOT,
596 XFSM_SHUTDOWN_SUSPEND,
597 XFSM_SHUTDOWN_HIBERNATE,
598 + XFSM_SHUTDOWN_SWITCH_USER,
599 + XFSM_SHUTDOWN_LOCK_SCREEN,
602 typedef struct _FailsafeClient FailsafeClient;
603 diff -r -c xfce4-session-4.8.2/xfce4-session/xfsm-manager.c xfce4-session-working/xfce4-session/xfsm-manager.c
604 *** xfce4-session-4.8.2/xfce4-session/xfsm-manager.c 2011-09-13 09:17:17.000000000 -0700
605 --- xfce4-session-working/xfce4-session/xfsm-manager.c 2011-09-30 15:33:30.778711307 -0700
609 if (shutdown_type != XFSM_SHUTDOWN_ASK)
610 manager->shutdown_type = shutdown_type;
612 + if (manager->shutdown_type == XFSM_SHUTDOWN_LOCK_SCREEN)
614 + g_spawn_command_line_async("xflock4", NULL);
619 + if (manager->shutdown_type == XFSM_SHUTDOWN_SWITCH_USER)
621 + g_spawn_command_line_async("gdmflexiserver", NULL);
626 /* we only save the session and quit if we're actually shutting down;
627 * suspend and hibernate will (if successful) return us to
628 * exactly the same state, so there's no need to save session */
629 diff -r -c xfce4-session-4.8.2/xfce4-session/xfsm-shutdown-helper.c xfce4-session-working/xfce4-session/xfsm-shutdown-helper.c
630 *** xfce4-session-4.8.2/xfce4-session/xfsm-shutdown-helper.c 2011-09-13 09:17:17.000000000 -0700
631 --- xfce4-session-working/xfce4-session/xfsm-shutdown-helper.c 2011-09-29 17:58:07.000000000 -0700
640 + * xfsm_lock_screen:
646 + xfsm_lock_screen (void)
648 + gboolean ret = g_spawn_command_line_async ("xflock4", NULL);
652 + /* this should be the default*/
653 + ret = g_spawn_command_line_async ("xdg-screensaver lock", NULL);
658 + g_spawn_command_line_async ("gnome-screensaver-command -l", NULL);
663 + ret = g_spawn_command_line_async ("xscreensaver-command -lock", NULL);
668 + g_critical ("Connot lock screen\n");
674 * xfsm_shutdown_helper_restart:
676 diff -r -c xfce4-session-4.8.2/xfce4-session-logout/main.c xfce4-session-working/xfce4-session-logout/main.c
677 *** xfce4-session-4.8.2/xfce4-session-logout/main.c 2011-09-13 09:17:17.000000000 -0700
678 --- xfce4-session-working/xfce4-session-logout/main.c 2011-09-29 19:23:11.000000000 -0700
683 - * Copyright (c) 2004,2008 Brian Tarricone <kelnos@xfce.org>
684 - * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org>
685 - * All rights reserved.
687 - * This program is free software; you can redistribute it and/or modify
688 - * it under the terms of the GNU General Public License as published by
689 - * the Free Software Foundation; either version 2, or (at your option)
690 - * any later version.
692 - * This program is distributed in the hope that it will be useful,
693 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
694 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
695 - * GNU General Public License for more details.
697 - * You should have received a copy of the GNU General Public License
698 - * along with this program; if not, write to the Free Software
699 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
700 - * MA 02110-1301 USA.
709 #include <libxfce4util/libxfce4util.h>
712 - /* copied from xfce4-session/shutdown.h -- ORDER MATTERS. The numbers
713 - * correspond to the 'type' parameter of org.xfce.Session.Manager.Shutdown
717 XFSM_SHUTDOWN_ASK = 0,
722 XFSM_SHUTDOWN_REBOOT,
723 XFSM_SHUTDOWN_SUSPEND,
724 XFSM_SHUTDOWN_HIBERNATE,
725 + XFSM_SHUTDOWN_LOCK_SCREEN,
726 + XFSM_SHUTDOWN_SWITCH_USER,
729 gboolean opt_logout = FALSE;
733 gboolean opt_reboot = FALSE;
734 gboolean opt_suspend = FALSE;
735 gboolean opt_hibernate = FALSE;
736 + gboolean opt_lock_screen = FALSE;
737 + gboolean opt_switch_user = FALSE;
738 gboolean opt_fast = FALSE;
739 gboolean opt_version = FALSE;
744 N_("Hibernate without displaying the logout dialog"),
747 + { "lock", 'k', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &opt_lock_screen,
748 + N_("Lock the screen without displaying the logout dialog"),
751 + { "switch-user", 'w', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &opt_switch_user,
752 + N_("Switch users without displaying the logout dialog"),
755 { "fast", 'f', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &opt_fast,
756 N_("Log out quickly; don't save the session"),
762 shutdown_type = XFSM_SHUTDOWN_HIBERNATE;
764 + else if (opt_lock_screen)
766 + shutdown_type = XFSM_SHUTDOWN_LOCK_SCREEN;
768 + else if (opt_switch_user)
770 + shutdown_type = XFSM_SHUTDOWN_SWITCH_USER;
772 else if (opt_version)
774 printf ("%s (Xfce %s)\n\n"