[devhelp/wip/swilmet/misc-improvements: 12/14] app: simplify building the about dialog



commit c5f3ba802804095a1e75c567b8ce8e67a22abace
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon May 25 21:31:00 2015 +0200

    app: simplify building the about dialog
    
    For translator-credits, GTK+ already does the comparison to see if the
    string is translated.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=749797

 src/dh-app.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/dh-app.c b/src/dh-app.c
index 1f7e1af..b52e304 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -191,7 +191,9 @@ about_cb (GSimpleAction *action,
           gpointer       user_data)
 {
         DhApp *app = DH_APP (user_data);
-        const gchar  *authors[] = {
+        GtkWindow *parent;
+
+        const gchar *authors[] = {
                 "Mikael Hallendal <micke imendio com>",
                 "Richard Hult <richard imendio com>",
                 "Johan Dahlin <johan gnome org>",
@@ -200,9 +202,6 @@ about_cb (GSimpleAction *action,
                 "Thomas Bechtold <toabctl gnome org>",
                 NULL
         };
-        const gchar **documenters = NULL;
-        const gchar  *translator_credits = _("translator-credits");
-        GtkWindow *parent;
 
         parent = dh_app_peek_first_window (app);
 
@@ -213,11 +212,7 @@ about_cb (GSimpleAction *action,
                                "version", PACKAGE_VERSION,
                                "comments", _("A developers' help browser for GNOME"),
                                "authors", authors,
-                               "documenters", documenters,
-                               "translator-credits",
-                               (strcmp (translator_credits, "translator-credits") != 0 ?
-                                translator_credits :
-                                NULL),
+                               "translator-credits", _("translator-credits"),
                                "website", PACKAGE_URL,
                                "website-label", _("DevHelp Website"),
                                "logo-icon-name", PACKAGE_TARNAME,


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