[Xfce4-commits] [xfce/thunar] 01/01: Only show additional "real_name" of user in detailed_view if it is different from "name" (bug #13648)

noreply at xfce.org noreply at xfce.org
Fri Dec 15 23:00:53 CET 2017


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

a   l   e   x       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/thunar.

commit d774b40c3f8f2c1559ad8ffde340d318aee330e6
Author: Alexander Schwinn <acs82 at gmx.de>
Date:   Fri Dec 15 23:00:00 2017 +0100

    Only show additional "real_name" of user in detailed_view if it is
    different from "name" (bug #13648)
---
 thunar/thunar-list-model.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/thunar/thunar-list-model.c b/thunar/thunar-list-model.c
index db000f3..4c2b76b 100644
--- a/thunar/thunar-list-model.c
+++ b/thunar/thunar-list-model.c
@@ -722,7 +722,15 @@ thunar_list_model_get_value (GtkTreeModel *model,
           /* determine sane display name for the owner */
           name = thunar_user_get_name (user);
           real_name = thunar_user_get_real_name (user);
-          str = G_LIKELY (real_name != NULL) ? g_strdup_printf ("%s (%s)", real_name, name) : g_strdup (name);
+          if(G_LIKELY (real_name != NULL))
+            {
+              if(strcmp (name, real_name) == 0)
+                str = g_strdup (name);
+              else
+                str = g_strdup_printf ("%s (%s)", real_name, name);
+            }
+          else
+            str = g_strdup (name);
           g_value_take_string (value, str);
           g_object_unref (G_OBJECT (user));
         }

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


More information about the Xfce4-commits mailing list