[Xfce4-commits] <xfdesktop:eric/middle-click-menu> Make inactive workspace headers insensitive in color

Eric Koegel noreply at xfce.org
Sun Aug 25 07:24:02 CEST 2013


Updating branch refs/heads/eric/middle-click-menu
         to 5407011db19c870d701978f49af8549144a4281f (commit)
       from b5d1ce1c99780579a4cc6b3c1be42d75eafd4c8c (commit)

commit 5407011db19c870d701978f49af8549144a4281f
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Sun Aug 25 08:12:06 2013 +0300

    Make inactive workspace headers insensitive in color

 src/windowlist.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/windowlist.c b/src/windowlist.c
index 177f2f8..a539fd4 100644
--- a/src/windowlist.c
+++ b/src/windowlist.c
@@ -275,7 +275,15 @@ windowlist_populate(XfceDesktop *desktop,
             g_free(ws_label);
             label = gtk_bin_get_child(GTK_BIN(mi));
             gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
+            /* center the workspace header */
             gtk_misc_set_alignment(GTK_MISC(label), 0.4f, 0);
+            /* If it's not the active workspace, make the color insensitive */
+            if(wnck_workspace != active_workspace)
+            {
+                GtkWidget *lbl = gtk_bin_get_child(GTK_BIN(mi));
+                gtk_widget_modify_fg(lbl, GTK_STATE_NORMAL,
+                                     &(style->fg[GTK_STATE_INSENSITIVE]));
+            }
             gtk_widget_show(mi);
             gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
             if(!wl_submenus) {
@@ -342,11 +350,6 @@ windowlist_populate(XfceDesktop *desktop,
     
     pango_font_description_free(italic_font_desc);
     
-
-    mi = gtk_separator_menu_item_new();
-    gtk_widget_show(mi);
-    gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
-    
     /* 'add workspace' item */
     if(wl_show_icons) {
         img = gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_MENU);


More information about the Xfce4-commits mailing list