[Xfce4-commits] <xfce4-panel:master> Make previous commit easier on the eyes.
Nick Schermer
noreply at xfce.org
Tue Jan 11 15:42:02 CET 2011
Updating branch refs/heads/master
to 21420bc27a72f1d41ed8105cd94d1858abd5a352 (commit)
from 90d3a522e74dc039e5952ea911a06495a32f5b7e (commit)
commit 21420bc27a72f1d41ed8105cd94d1858abd5a352
Author: Nick Schermer <nick at xfce.org>
Date: Tue Jan 11 15:41:04 2011 +0100
Make previous commit easier on the eyes.
plugins/tasklist/tasklist-widget.c | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 27b5dd2..beebd65 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -2206,13 +2206,19 @@ xfce_tasklist_button_compare (gconstpointer child_a,
name_b = wnck_class_group_get_name (class_group_b);
/* if there is no class group name, use the window name */
- if (G_UNLIKELY (exo_str_is_empty (name_a)))
- name_a = a->window != NULL ? wnck_window_get_name (a->window) : NULL;
- if (G_UNLIKELY (exo_str_is_empty (name_b)))
- name_b = b->window != NULL ? wnck_window_get_name (b->window) : NULL;
-
- retval = strcasecmp (name_a != NULL ? name_a : "",
- name_b != NULL ? name_b : "");
+ if (exo_str_is_empty (name_a)
+ && a->window != NULL)
+ name_a = wnck_window_get_name (a->window);
+ if (exo_str_is_empty (name_b)
+ && b->window != NULL)
+ name_b = wnck_window_get_name (b->window) ;
+
+ if (name_a == NULL)
+ name_a = "";
+ if (name_b == NULL)
+ name_b = "";
+
+ retval = strcasecmp (name_a, name_b);
if (retval != 0)
return retval;
}
@@ -2245,8 +2251,12 @@ xfce_tasklist_button_compare (gconstpointer child_a,
else
name_b = NULL;
- return strcasecmp (name_a != NULL ? name_a : "",
- name_b != NULL ? name_b : "");
+ if (name_a == NULL)
+ name_a = "";
+ if (name_b == NULL)
+ name_b = "";
+
+ return strcasecmp (name_a, name_b);
}
}
More information about the Xfce4-commits
mailing list