From: Mikael Magnusson Date: Mon, 23 Jul 2007 23:38:43 +0000 (+0200) Subject: Change the client list menus back to separating iconified windows with a line instead... X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=d719ff2c2b8dccf9432427de0f8a72e014415b08;p=mikachu%2Fopenbox.git Change the client list menus back to separating iconified windows with a line instead of bracketing them. --- diff --git a/openbox/client_list_combined_menu.c b/openbox/client_list_combined_menu.c index c26b6fa0..ee57270c 100644 --- a/openbox/client_list_combined_menu.c +++ b/openbox/client_list_combined_menu.c @@ -54,6 +54,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)) { @@ -65,9 +66,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); diff --git a/openbox/client_list_menu.c b/openbox/client_list_menu.c index f3df2a5a..fc44603e 100644 --- a/openbox/client_list_menu.c +++ b/openbox/client_list_menu.c @@ -49,6 +49,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); @@ -61,9 +62,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);