mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 05:48:01 +01:00
Show shortcuts for workspace switching menu entries.
When showing a Workspaces menu entry for switching to a particular workspace, also show the shortcut if one is bound for switching to that workspace.
This commit is contained in:
committed by
Carlos R. Mafra
parent
9b27217b53
commit
d25fde4173
@@ -61,6 +61,7 @@ extern int ignore_wks_change;
|
||||
extern WPreferences wPreferences;
|
||||
extern XContext wVEdgeContext;
|
||||
extern void ProcessPendingEvents();
|
||||
extern WShortKey wKeyBindings[WKBD_LAST];
|
||||
|
||||
static WMPropList *dWorkspaces = NULL;
|
||||
static WMPropList *dClip, *dName;
|
||||
@@ -744,12 +745,18 @@ void wWorkspaceMenuUpdate(WScreen * scr, WMenu * menu)
|
||||
wMenuRemoveItem(menu, i);
|
||||
}
|
||||
}
|
||||
wMenuRealize(menu);
|
||||
|
||||
for (i = 0; i < scr->workspace_count; i++) {
|
||||
/* workspace shortcut labels */
|
||||
if (i / 10 == scr->current_workspace / 10)
|
||||
menu->entries[i + MC_WORKSPACE1]->rtext = GetShortcutKey(wKeyBindings[WKBD_WORKSPACE1 + (i % 10)]);
|
||||
else
|
||||
menu->entries[i + MC_WORKSPACE1]->rtext = NULL;
|
||||
|
||||
menu->entries[i + MC_WORKSPACE1]->flags.indicator_on = 0;
|
||||
}
|
||||
menu->entries[scr->current_workspace + MC_WORKSPACE1]->flags.indicator_on = 1;
|
||||
wMenuRealize(menu);
|
||||
|
||||
/* don't let user destroy current workspace */
|
||||
if (scr->current_workspace == scr->workspace_count - 1) {
|
||||
|
||||
Reference in New Issue
Block a user