[Xfce4-commits] r26626 - xfce4-panel/trunk/plugins/tasklist

Nick Schermer nick at xfce.org
Mon Feb 18 13:42:14 CET 2008


Author: nick
Date: 2008-02-18 12:42:14 +0000 (Mon, 18 Feb 2008)
New Revision: 26626

Modified:
   xfce4-panel/trunk/plugins/tasklist/tasklist.c
Log:
* Use the first size hint from the tasklist. This behaviour
  looks more like the old behaviour of the panel and avoids
  unnecessarily grouping of buttons.


Modified: xfce4-panel/trunk/plugins/tasklist/tasklist.c
===================================================================
--- xfce4-panel/trunk/plugins/tasklist/tasklist.c	2008-02-18 07:59:29 UTC (rev 26625)
+++ xfce4-panel/trunk/plugins/tasklist/tasklist.c	2008-02-18 12:42:14 UTC (rev 26626)
@@ -271,24 +271,18 @@
                               GtkRequisition *requisition)
 {
     const gint     *size_hints;
-    gint            length, i;
-    gint            size = 0;
+    gint            length;
+    gint            size;
     GtkOrientation  orientation;
 
     /* get the size hints */
     size_hints = wnck_tasklist_get_size_hint_list (WNCK_TASKLIST (tasklist->list), &length);
 
     /* check for pairs of 2 */
-    if (G_LIKELY (length % 2 == 0))
+    if (G_LIKELY (length > 0))
     {
-        /* get the smallest possible size */
-        for (i = 0; i < length; i += 2)
-        {
-            if (i == 0)
-               size = size_hints[i];
-            else
-               size = MIN (size_hints[i], size);
-        }
+        /* get the first size */
+        size = size_hints[0];
 
         /* add the handle size */
         if (tasklist->show_handles)



More information about the Xfce4-commits mailing list