[Xfce4-commits] r27004 - xfwm4/trunk/src

Olivier Fourdan olivier at xfce.org
Sun Jun 1 12:25:24 CEST 2008


Author: olivier
Date: 2008-06-01 10:25:24 +0000 (Sun, 01 Jun 2008)
New Revision: 27004

Modified:
   xfwm4/trunk/src/tabwin.c
Log:
Capitalize class name, use brackets to show hidden windows, decrease saturation for icons of hidden windows.

Modified: xfwm4/trunk/src/tabwin.c
===================================================================
--- xfwm4/trunk/src/tabwin.c	2008-06-01 09:24:30 UTC (rev 27003)
+++ xfwm4/trunk/src/tabwin.c	2008-06-01 10:25:24 UTC (rev 27004)
@@ -86,10 +86,9 @@
 
     if (s)
     {
-        canonical = g_strdup (s);
-        g_strcanon (canonical, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ' ');
+        canonical = g_ascii_strup (s, -1);
+        g_strcanon (canonical, "[]()0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", ' ');
         g_strstrip (canonical);
-        *canonical = g_ascii_toupper (*canonical);
     }
     else
     {
@@ -129,6 +128,7 @@
 tabwinSetSelected (Tabwin * t, GtkWidget * w)
 {
     Client *c;
+    gchar *classname;
 
     if (t->selected_callback)
     {
@@ -137,7 +137,16 @@
     t->selected_callback = g_signal_connect (G_OBJECT (w), "expose-event", G_CALLBACK (paint_selected), NULL);
     c = g_object_get_data (G_OBJECT (w), "client-ptr-val");
 
-    tabwinSetLabel (t, c->class.res_class, c->name, c->win_workspace);
+    if (FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED))
+    {
+        classname = g_strdup_printf ("[ %s ]", c->class.res_class);
+    }
+    else
+    {
+        classname = g_strdup(c->class.res_class);
+    }
+    tabwinSetLabel (t, classname, c->name, c->win_workspace);
+    g_free (classname);
 }
 
 static GtkWidget *
@@ -157,7 +166,7 @@
         if (FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED))
         {
             icon_pixbuf_stated = gdk_pixbuf_copy (icon_pixbuf);
-            gdk_pixbuf_saturate_and_pixelate (icon_pixbuf, icon_pixbuf_stated, 0.5, TRUE);
+            gdk_pixbuf_saturate_and_pixelate (icon_pixbuf, icon_pixbuf_stated, 0.25, TRUE);
             gtk_image_set_from_pixbuf (GTK_IMAGE (icon), icon_pixbuf_stated);
             g_object_unref(icon_pixbuf_stated);
         }



More information about the Xfce4-commits mailing list