aboutsummaryrefslogtreecommitdiff
path: root/src/dialog.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-03 16:38:44 -0600
committerTed Gould <ted@gould.cx>2010-03-03 16:38:44 -0600
commita76563f00527498fd4121d2b824ef622bc062985 (patch)
tree91a9719afa3221e3429fbe8ec434d19043fe3e67 /src/dialog.c
parent2ae450d4f50ed3da4383ad5e4fcd470986deee3b (diff)
downloadayatana-indicator-session-a76563f00527498fd4121d2b824ef622bc062985.tar.gz
ayatana-indicator-session-a76563f00527498fd4121d2b824ef622bc062985.tar.bz2
ayatana-indicator-session-a76563f00527498fd4121d2b824ef622bc062985.zip
Adding in different button strings if we need authentication.
Diffstat (limited to 'src/dialog.c')
-rw-r--r--src/dialog.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/dialog.c b/src/dialog.c
index 6dd7a90..dd681b3 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -27,6 +27,14 @@ static const gchar * button_strings[LOGOUT_DIALOG_TYPE_CNT] = {
/* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button", "Switch Off")
};
+/* TRANSLATORS: These strings have an ellipsis so that the user knows
+ they are also going to get a password dialog to do the action. */
+static const gchar * button_auth_strings[LOGOUT_DIALOG_TYPE_CNT] = {
+ /* LOGOUT_DIALOG_LOGOUT, */ NC_("button auth", "Log Out"),
+ /* LOGOUT_DIALOG_RESTART, */ NC_("button auth", "Restart..."),
+ /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button auth", "Switch Off...")
+};
+
/*
static const gchar * restart_updates = N_("Restart Instead");
static const gchar * restart_auth = N_("Restart...");
@@ -165,9 +173,16 @@ logout_dialog_new (LogoutDialogType type)
restart_required = check_restart_required();
}
+ const gchar * button_text;
+ if (allowed) {
+ button_text = _(button_strings[type]);
+ } else {
+ button_text = _(button_auth_strings[type]);
+ }
+
gtk_dialog_add_buttons(GTK_DIALOG(dialog),
_("Cancel"), GTK_RESPONSE_CANCEL,
- _(button_strings[type]), GTK_RESPONSE_OK,
+ button_text, GTK_RESPONSE_OK,
NULL);
return dialog;