From 3d01e5c8797a2a59a60e71e9d50a6abccaf14e62 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Fri, 30 Mar 2012 17:36:07 +0100 Subject: [PATCH] Also allow relaunching from the window menu. Allow relaunching an application from its window menu. --- src/winmenu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/winmenu.c b/src/winmenu.c index 8e657e60..ef971264 100644 --- a/src/winmenu.c +++ b/src/winmenu.c @@ -55,9 +55,10 @@ #define MC_PROPERTIES 7 #define MC_OPTIONS 8 #define MC_SHORTCUT 8 +#define MC_RELAUNCH 9 -#define MC_CLOSE 9 -#define MC_KILL 10 +#define MC_CLOSE 10 +#define MC_KILL 11 #define WO_KEEP_ON_TOP 0 #define WO_KEEP_AT_BOTTOM 1 @@ -167,6 +168,10 @@ static void execMenuCommand(WMenu * menu, WMenuEntry * entry) wShowInspectorForWindow(wwin); break; + case MC_RELAUNCH: + (void) RelaunchWindow(wwin); + break; + case MC_HIDE: wapp = wApplicationOf(wwin->main_window); wHideApplication(wapp); @@ -454,6 +459,9 @@ static WMenu *createWindowMenu(WScreen * scr) wMenuEntrySetCascade(menu, entry, makeMakeShortcutMenu(scr)); */ + entry = wMenuAddCallback(menu, _("Launch"), execMenuCommand, NULL); + entry->rtext = getShortcutString(wKeyBindings[WKBD_RELAUNCH]); + entry = wMenuAddCallback(menu, _("Close"), execMenuCommand, NULL); entry->rtext = getShortcutString(wKeyBindings[WKBD_CLOSE]); -- 2.11.4.GIT