1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-25 16:02:33 +01:00

Added "Hide Others" to the window menu

This commit is contained in:
dan
2002-01-04 05:44:20 +00:00
parent a8c7375623
commit 96f8ab167f
8 changed files with 56 additions and 29 deletions

View File

@@ -50,15 +50,16 @@
#define MC_MINIATURIZE 1
#define MC_SHADE 2
#define MC_HIDE 3
#define MC_MOVERESIZE 4
#define MC_SELECT 5
#define MC_DUMMY_MOVETO 6
#define MC_PROPERTIES 7
#define MC_OPTIONS 8
#define MC_SHORTCUT 8
#define MC_HIDE_OTHERS 4
#define MC_MOVERESIZE 5
#define MC_SELECT 6
#define MC_DUMMY_MOVETO 7
#define MC_PROPERTIES 8
#define MC_OPTIONS 9
#define MC_SHORTCUT 9
#define MC_CLOSE 9
#define MC_KILL 10
#define MC_CLOSE 10
#define MC_KILL 11
#define WO_KEEP_ON_TOP 0
@@ -177,6 +178,10 @@ execMenuCommand(WMenu *menu, WMenuEntry *entry)
wHideApplication(wapp);
break;
case MC_HIDE_OTHERS:
wHideOtherApplications(wwin);
break;
}
}
@@ -442,7 +447,6 @@ createWindowMenu(WScreen *scr)
}
entry = wMenuAddCallback(menu, _("Miniaturize"), execMenuCommand, NULL);
if (wKeyBindings[WKBD_MINIATURIZE].keycode!=0) {
kcode = wKeyBindings[WKBD_MINIATURIZE].keycode;
@@ -466,6 +470,14 @@ createWindowMenu(WScreen *scr)
entry->rtext = wstrdup(tmp);
}
entry = wMenuAddCallback(menu, _("Hide Others"), execMenuCommand, NULL);
if (wKeyBindings[WKBD_HIDE_OTHERS].keycode!=0) {
kcode = wKeyBindings[WKBD_HIDE_OTHERS].keycode;
if (kcode && (tmp = XKeysymToString(XKeycodeToKeysym(dpy, kcode, 0))))
entry->rtext = wstrdup(tmp);
}
entry = wMenuAddCallback(menu, _("Resize/Move"), execMenuCommand, NULL);
if (wKeyBindings[WKBD_MOVERESIZE].keycode!=0) {
kcode = wKeyBindings[WKBD_MOVERESIZE].keycode;