[gnome-control-center] user-accounts: Prepend user real name to "Account Activity" dialog title



commit f029fc094707c89ad66d7d205ef93bed36269c32
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Jun 21 13:48:05 2016 +0200

    user-accounts: Prepend user real name to "Account Activity" dialog title
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767065

 panels/user-accounts/um-history-dialog.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/panels/user-accounts/um-history-dialog.c b/panels/user-accounts/um-history-dialog.c
index 9f7461e..67fd90e 100644
--- a/panels/user-accounts/um-history-dialog.c
+++ b/panels/user-accounts/um-history-dialog.c
@@ -289,6 +289,21 @@ show_next (GtkButton       *button,
         show_week (um);
 }
 
+static void
+update_dialog_title (UmHistoryDialog *um)
+{
+        gchar *title;
+
+        /* Translators: This is the title of the "Account Activity" dialog.
+           The %s is the user real name. */
+        title = g_strdup_printf (_("%s - Account Activity"),
+                                 act_user_get_real_name (um->user));
+
+        gtk_window_set_title (GTK_WINDOW (um->dialog), title);
+
+        g_free (title);
+}
+
 void
 um_history_dialog_set_user (UmHistoryDialog *um,
                             ActUser         *user)
@@ -300,6 +315,8 @@ um_history_dialog_set_user (UmHistoryDialog *um,
         if (user) {
                 um->user = g_object_ref (user);
         }
+
+        update_dialog_title (um);
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]