← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~dbarth/indicator-session/updated-messages into lp:indicator-session

 

David Barth has proposed merging lp:~dbarth/indicator-session/updated-messages into lp:indicator-session.

    Requested reviews:
    Indicator Applet Developers (indicator-applet-developers)


Reading https://bugs.edge.launchpad.net/hundredpapercuts/+bug/495127 i went on to update messages to reflect the specification at https://wiki.ubuntu.com/SessionTerminationConfirmation. I couldn't find in the history if this was something that was at the origin and was later removed for layout issues.

The patch in its current state as layout issues. It would need some love from Cody to get that fixed.
-- 
https://code.launchpad.net/~dbarth/indicator-session/updated-messages/+merge/19162
Your team ayatana-commits is subscribed to branch lp:indicator-session.
=== modified file 'src/gtk-dialog/logout-dialog.c'
--- src/gtk-dialog/logout-dialog.c	2009-10-05 21:11:25 +0000
+++ src/gtk-dialog/logout-dialog.c	2010-02-12 08:52:14 +0000
@@ -73,7 +73,13 @@
 
 static const gchar * restart_auth = N_("Restart...");
 
-static const gchar * body_logout_update = N_("You recently installed updates which will only take effect after a restart.  Restart to apply software updates.");
+static const gchar * message_strings[LOGOUT_DIALOG_ACTION_CNT] = {
+	/* LOGOUT_DIALOG_LOGOUT, */ 	N_("Are you sure you want to close all programs and log out?"),
+	/* LOGOUT_DIALOG_RESTART, */	N_("Are you sure you want to close all programms and shut down the computer?"),
+	/* LOGOUT_DIALOG_SHUTDOWN, */	N_("Are you sure you want to close all programs and restart the computer?")
+};
+
+static const gchar * body_logout_update = N_("The computer needs to restart to install software updates. Are you sure you want to close all programs and log out?");
 
 static const gchar * icon_strings[LOGOUT_DIALOG_ACTION_CNT] = {
 	/* LOGOUT_DIALOG_LOGOUT, */ 	"system-log-out",
@@ -116,18 +122,18 @@
   switch (dialog->action)
     {
     case LOGOUT_DIALOG_LOGOUT:
-      plural_string = ngettext("You will be logged out in %d second.",
-			       "You will be logged out in %d seconds.", 
+      plural_string = ngettext("Unless you cancel, you will be logged out in %d second.",
+			       "Unless you cancel, you will be logged out in %d seconds.", 
 			       dialog->timeout);
       break;
     case LOGOUT_DIALOG_RESTART:
-      plural_string = ngettext("The computer will restart in %d second.",
-			       "The computer will restart in %d seconds.", 
+      plural_string = ngettext("Unless you cancel, the computer will restart in %d second.",
+			       "Unless you cancel, the computer will restart in %d seconds.", 
 			       dialog->timeout);
       break;
     case LOGOUT_DIALOG_SHUTDOWN:
-      plural_string = ngettext("The computer will be shut down in %d second.",
-			       "The computer will be shut down in %d seconds.",
+      plural_string = ngettext("Unless you cancel, the computer will be shut down in %d second.",
+			       "Unless you cancel, the computer will be shut down in %d seconds.",
 			       dialog->timeout);
       break;
 	default:
@@ -164,7 +170,8 @@
 	gtk_image_set_from_icon_name(GTK_IMAGE(dialog->image), icon_strings[dialog->action], GTK_ICON_SIZE_DIALOG);
 	gtk_window_set_title (GTK_WINDOW(dialog), _(title_strings[dialog->action]));
 	gtk_window_set_icon_name (GTK_WINDOW(dialog), icon_strings[dialog->action]);
-	gtk_widget_hide(dialog->message);
+	gtk_label_set_text(GTK_LABEL(dialog->message), _(message_strings[dialog->action]));
+	gtk_widget_show(dialog->message);
 	gtk_button_set_label(GTK_BUTTON(dialog->ok_button), _(button_strings[dialog->action]));
 
 	gchar * timeouttxt = g_strdup_printf(get_plural_string(dialog), dialog->timeout);


Follow ups