disable the "Go there" menu entry when its the current desktop
This commit is contained in:
parent
7c80db2552
commit
def76092b5
1 changed files with 5 additions and 1 deletions
|
@ -86,10 +86,14 @@ static void desk_menu_update(ObMenuFrame *frame, gpointer data)
|
|||
|
||||
GSList *acts = NULL;
|
||||
ObAction* act;
|
||||
ObMenuEntry *e;
|
||||
|
||||
act = action_from_string("Desktop", OB_USER_ACTION_MENU_SELECTION);
|
||||
act->data.desktop.desk = d->desktop;
|
||||
acts = g_slist_append(acts, act);
|
||||
menu_add_normal(menu, 0, _("Go there..."), acts);
|
||||
e = menu_add_normal(menu, 0, _("Go there..."), acts);
|
||||
if (d->desktop == screen_desktop)
|
||||
e->data.normal.enabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue