[gnome-session] gsm: Add a flag to show the fail whale dialog on request
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] gsm: Add a flag to show the fail whale dialog on request
- Date: Fri, 26 Aug 2011 23:01:13 +0000 (UTC)
commit edbf310a825a48f7d7eb10a2dfbd91525aeb83de
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Aug 16 13:03:26 2011 -0400
gsm: Add a flag to show the fail whale dialog on request
https://bugzilla.gnome.org/show_bug.cgi?id=656747
doc/man/gnome-session.1 | 3 +++
gnome-session/main.c | 9 +++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/doc/man/gnome-session.1 b/doc/man/gnome-session.1
index 4a475e9..3f9ee21 100644
--- a/doc/man/gnome-session.1
+++ b/doc/man/gnome-session.1
@@ -45,6 +45,9 @@ Run in fail-safe mode. User-specified applications will not be started.
.TP
.I "--debug"
Enable debugging code.
+.TP
+.I "--whale"
+Show the fail whale in a dialog for debugging it.
.SH SESSION DEFINITION
Sessions are defined in \fB.session\fP files, that are using a .desktop-like
format, with the following keys in the \fBGNOME Session\fP group:
diff --git a/gnome-session/main.c b/gnome-session/main.c
index a7fa4bb..d091f7d 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -46,12 +46,14 @@
#include "gsm-session-fill.h"
#include "gsm-store.h"
#include "gsm-xsmp-server.h"
+#include "gsm-fail-whale-dialog.h"
#define GSM_DBUS_NAME "org.gnome.SessionManager"
static gboolean failsafe = FALSE;
static gboolean show_version = FALSE;
static gboolean debug = FALSE;
+static gboolean please_fail = FALSE;
static void
on_bus_name_lost (DBusGProxy *bus_proxy,
@@ -278,6 +280,7 @@ main (int argc, char **argv)
{ "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL },
{ "failsafe", 'f', 0, G_OPTION_ARG_NONE, &failsafe, N_("Do not load user-specified applications"), NULL },
{ "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL },
+ { "whale", 0, 0, G_OPTION_ARG_NONE, &please_fail, N_("Show the fail whale dialog for testing"), NULL },
{ NULL, 0, 0, 0, NULL, NULL, NULL }
};
@@ -310,6 +313,12 @@ main (int argc, char **argv)
exit (1);
}
+ if (please_fail) {
+ gsm_fail_whale_dialog_we_failed ();
+ gtk_main ();
+ exit (1);
+ }
+
gdm_log_init ();
gdm_log_set_debug (debug);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]