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

ninetls pushed a 
commit to branch 
master
in repository panel-plugins/xfce4-statusnotifier-plugin.

commit e257ea3f49c078685990f2e99b788d9f34f0a667
Author: Viktor Odintsev <nine...@xfce.org>
Date:   Fri Aug 4 13:36:12 2017 +0300

    Avoid tooltip title == subtitle cases
---
 panel-plugin/sn-item.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/panel-plugin/sn-item.c b/panel-plugin/sn-item.c
index 7f9d163..69413ab 100644
--- a/panel-plugin/sn-item.c
+++ b/panel-plugin/sn-item.c
@@ -910,10 +910,12 @@ sn_item_get_tooltip (SnItem       *item,
   if (subtitle == NULL)
     subtitle = (gpointer)&stub;
 
+  #define sn_subtitle(subtitle) (g_strcmp0 (subtitle, *title) ? subtitle : 
NULL)
+
   if (item->tooltip_title != NULL && item->tooltip_subtitle != NULL)
     {
       *title = item->tooltip_title;
-      *subtitle = item->tooltip_subtitle;
+      *subtitle = sn_subtitle (item->tooltip_subtitle);
     }
   else if (item->attention_desc != NULL)
     {
@@ -921,12 +923,12 @@ sn_item_get_tooltip (SnItem       *item,
       if (item->tooltip_title != NULL)
         {
           *title = item->tooltip_title;
-          *subtitle = item->attention_desc;
+          *subtitle = sn_subtitle (item->attention_desc);
         }
       else if (item->title != NULL)
         {
           *title = item->title;
-          *subtitle = item->attention_desc;
+          *subtitle = sn_subtitle (item->attention_desc);
         }
       else
         {
@@ -940,12 +942,12 @@ sn_item_get_tooltip (SnItem       *item,
       if (item->tooltip_title != NULL)
         {
           *title = item->tooltip_title;
-          *subtitle = item->icon_desc;
+          *subtitle = sn_subtitle (item->icon_desc);
         }
       else if (item->title != NULL)
         {
           *title = item->title;
-          *subtitle = item->icon_desc;
+          *subtitle = sn_subtitle (item->icon_desc);
         }
       else
         {
@@ -969,7 +971,7 @@ sn_item_get_tooltip (SnItem       *item,
       *subtitle = NULL;
     }
 
-  #undef sn_non_empty
+  #undef sn_subtitle
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to