Change the client list menus back to separating iconified windows with a line instead...
authorMikael Magnusson <mikachu@comhem.se>
Mon, 23 Jul 2007 23:38:43 +0000 (01:38 +0200)
committerMikael Magnusson <mikachu@comhem.se>
Wed, 16 Jan 2008 06:19:58 +0000 (07:19 +0100)
openbox/client_list_combined_menu.c
openbox/client_list_menu.c

index bb4921909fea315665d051937cc5c51e4a08c846..a7aa4158baaee280dfdfbe61522dd73f37556bd1 100644 (file)
@@ -48,6 +48,7 @@ static gboolean self_update(ObMenuFrame *frame, gpointer data)
     for (desktop = 0; desktop < screen_num_desktops; desktop++) {
         gboolean empty = TRUE;
         gboolean onlyiconic = TRUE;
+        gboolean noicons = TRUE;
 
         menu_add_separator(menu, SEPARATOR, screen_desktop_names[desktop]);
         for (it = focus_order; it; it = g_list_next(it)) {
@@ -60,9 +61,11 @@ static gboolean self_update(ObMenuFrame *frame, gpointer data)
                 empty = FALSE;
 
                 if (c->iconic) {
-                    gchar *title = g_strdup_printf("(%s)", c->icon_title);
-                    e = menu_add_normal(menu, desktop, title, NULL, FALSE);
-                    g_free(title);
+                    if (noicons) {
+                        menu_add_separator(menu, -1, NULL);
+                        noicons = FALSE;
+                    }
+                    e = menu_add_normal(menu, desktop, c->icon_title, NULL, FALSE);
                 } else {
                     onlyiconic = FALSE;
                     e = menu_add_normal(menu, desktop, c->title, NULL, FALSE);
index 5f6a832d0952208c93da24df4f06aaa00d14b0bf..3dbc605910256a7f01016d64f52d6e5345ee4947 100644 (file)
@@ -48,6 +48,7 @@ static gboolean desk_menu_update(ObMenuFrame *frame, gpointer data)
     GList *it;
     gboolean empty = TRUE;
     gboolean onlyiconic = TRUE;
+    gboolean noicons = TRUE;
 
     menu_clear_entries(menu);
 
@@ -62,9 +63,11 @@ static gboolean desk_menu_update(ObMenuFrame *frame, gpointer data)
             empty = FALSE;
 
             if (c->iconic) {
-                gchar *title = g_strdup_printf("(%s)", c->icon_title);
-                e = menu_add_normal(menu, d->desktop, title, NULL, FALSE);
-                g_free(title);
+                if (noicons) {
+                    menu_add_separator(menu, -1, NULL);
+                    noicons = FALSE;
+                }
+                e = menu_add_normal(menu, d->desktop, c->icon_title, NULL, FALSE);
             } else {
                 onlyiconic = FALSE;
                 e = menu_add_normal(menu, d->desktop, c->title, NULL, FALSE);