- menu_add_separator(menu, -1);
- menu_add_separator(menu, -1);
- icons = FALSE;
+
+ if (empty || onlyiconic) {
+ /* no entries or only iconified windows, so add a
+ * way to go to this desktop without uniconifying a window */
+ if (!empty)
+ menu_add_separator(menu, -1, NULL);
+
+ GSList *acts = NULL;
+ ObAction* act;
+ ObMenuEntry *e;
+
+ act = action_from_string("Desktop", OB_USER_ACTION_MENU_SELECTION);
+ act->data.desktop.desk = desktop;
+ acts = g_slist_append(acts, act);
+ e = menu_add_normal(menu, 0, _("Go there..."), acts, TRUE);
+ if (desktop == screen_desktop)
+ e->data.normal.enabled = FALSE;
+ }