[Xfce4-commits] [panel-plugins/xfce4-statusnotifier-plugin] 03/04: Avoid tooltip title == subtitle cases
noreply at xfce.org
noreply at xfce.org
Sat Aug 5 21:17:12 CEST 2017
This is an automated email from the git hooks/post-receive script.
n i n e t l s 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 panel-plugins/xfce4-statusnotifier-plugin.
commit e257ea3f49c078685990f2e99b788d9f34f0a667
Author: Viktor Odintsev <ninetls at 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.
More information about the Xfce4-commits
mailing list