[Xfce4-commits] [xfce/libxfce4ui] 03/05: Improve formatting of translators list

noreply at xfce.org noreply at xfce.org
Fri Mar 6 12:44:32 CET 2015


This is an automated email from the git hooks/post-receive script.

hjudt pushed a commit to branch master
in repository xfce/libxfce4ui.

commit 5b6a49fb9fe7e1b2b54693adefeae9ec29a1708c
Author: Harald Judt <h.judt at gmx.at>
Date:   Fri Mar 6 12:14:49 2015 +0100

    Improve formatting of translators list
---
 xfce4-about/main.c |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/xfce4-about/main.c b/xfce4-about/main.c
index ce3368a..005607a 100644
--- a/xfce4-about/main.c
+++ b/xfce4-about/main.c
@@ -160,17 +160,22 @@ xfce_about_about (GtkTextBuffer *buffer)
 static void
 xfce_about_credits_translators (GtkTextBuffer *buffer,
                                 GtkTextIter   *end,
-                                GtkTextTag    *indent,
                                 GtkTextTag    *email)
 {
   guint                 i;
   GtkTextTag           *italic;
+  GtkTextTag           *language;
   const TranslatorInfo *member;
   const TranslatorTeam *team;
   gchar                *str;
   gboolean              has_member;
   GtkTextTag           *coordinator;
 
+  language = gtk_text_buffer_create_tag (buffer, "language",
+                                         "weight", PANGO_WEIGHT_BOLD,
+                                         "left-margin", MARGIN,
+                                         "indent", -MARGIN, NULL);
+
   coordinator = gtk_text_buffer_create_tag (buffer, "italic",
                                             "style", PANGO_STYLE_ITALIC, NULL);
 
@@ -178,23 +183,21 @@ xfce_about_credits_translators (GtkTextBuffer *buffer,
     {
       team = xfce_translators + i;
 
-      str = g_strdup_printf ("%s [%s]: ", team->name, team->code);
-      gtk_text_buffer_insert_with_tags (buffer, end, str, -1, indent, NULL);
+      str = g_strdup_printf ("%s [%s]:\n", team->name, team->code);
+      gtk_text_buffer_insert_with_tags (buffer, end, str, -1, language, NULL);
       g_free (str);
 
       has_member = FALSE;
 
       for (member = team->members; member->name != NULL; member++)
         {
-          if (has_member)
-            gtk_text_buffer_insert (buffer, end, ", ", -1);
-
           italic = member->is_coordinator ? coordinator : NULL;
 
+          gtk_text_buffer_insert_with_tags (buffer, end, "\t", -1, italic, NULL);
           gtk_text_buffer_insert_with_tags (buffer, end, member->name, -1, italic, NULL);
           gtk_text_buffer_insert_with_tags (buffer, end, " <", -1, italic, NULL);
           gtk_text_buffer_insert_with_tags (buffer, end, member->email, -1, email, italic, NULL);
-          gtk_text_buffer_insert_with_tags (buffer, end, ">", -1, italic, NULL);
+          gtk_text_buffer_insert_with_tags (buffer, end, ">\n", -1, italic, NULL);
 
           has_member = TRUE;
         }
@@ -252,7 +255,7 @@ xfce_about_credits (GtkTextBuffer *buffer)
       else
         {
           /* add the translators */
-          xfce_about_credits_translators (buffer, &end, indent, email);
+          xfce_about_credits_translators (buffer, &end, email);
         }
 
       gtk_text_buffer_insert (buffer, &end, "\n", -1);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list