[gnome-session] gsm: Use "Log out" instead of "Close" for button in fatal error dialog
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] gsm: Use "Log out" instead of "Close" for button in fatal error dialog
- Date: Tue, 22 Mar 2011 20:14:51 +0000 (UTC)
commit aed66bd05f9a5b5ab982082117b8de1ad211d7ac
Author: Vincent Untz <vuntz gnome org>
Date: Tue Mar 22 21:14:08 2011 +0100
gsm: Use "Log out" instead of "Close" for button in fatal error dialog
Clicking the button really logs you out, so it's a bit better.
This is not a new string.
gnome-session/gsm-util.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c
index 3d423e8..faad668 100644
--- a/gnome-session/gsm-util.c
+++ b/gnome-session/gsm-util.c
@@ -331,9 +331,10 @@ void
gsm_util_init_error (gboolean fatal,
const char *format, ...)
{
- GtkWidget *dialog;
- char *msg;
- va_list args;
+ GtkButtonsType buttons;
+ GtkWidget *dialog;
+ char *msg;
+ va_list args;
va_start (args, format);
msg = g_strdup_vprintf (format, args);
@@ -349,8 +350,17 @@ gsm_util_init_error (gboolean fatal,
}
}
+ if (fatal)
+ buttons = GTK_BUTTONS_NONE;
+ else
+ buttons = GTK_BUTTONS_CLOSE;
+
dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE, "%s", msg);
+ buttons, "%s", msg);
+
+ if (fatal)
+ gtk_dialog_add_button (GTK_DIALOG (dialog),
+ _("_Log Out"), GTK_RESPONSE_CLOSE);
g_free (msg);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]