summaryrefslogtreecommitdiff
path: root/widgetfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'widgetfactory.cpp')
-rw-r--r--widgetfactory.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/widgetfactory.cpp b/widgetfactory.cpp
index ab362f1..cc3ede9 100644
--- a/widgetfactory.cpp
+++ b/widgetfactory.cpp
@@ -39,6 +39,7 @@ enum {
IDM_BACKGROUND_GRADIENT,
IDM_BACKGROUND_GREEN,
IDM_BACKGROUND_BLUE,
+ IDM_CENTER_ON_MONITOR,
IDM_PANES,
IDM_PANES__MAX = IDM_PANES + PANE__MAX,
IDM_MODALDIALOG_PANES,
@@ -893,6 +894,10 @@ handleCommand(void *closure, HWND window, WORD notificationcode, WORD sourceid,
wfModelessDialogStart(paneId);
}
+ if (sourceid == IDM_CENTER_ON_MONITOR) {
+ ALF_Toplevel_CenterOnCurrentMonitor(window);
+ }
+
return 0;
}
@@ -1083,6 +1088,8 @@ WinMain
AppendMenu(filemenu, MF_SEPARATOR, 0, 0);
AppendMenu(filemenu, MF_STRING, IDM_FILE_CLOSE, TEXT("&Close\tAlt+F4"));
+ AppendMenu(helpmenu, MF_STRING, IDM_CENTER_ON_MONITOR, TEXT("Center Window"));
+ AppendMenu(helpmenu, MF_SEPARATOR, 0, 0);
AppendMenu(helpmenu, MF_STRING, IDM_HELP_ABOUT, TEXT("&About"));
AppendMenu(bgmenu, MF_STRING, IDM_BACKGROUND_INHERIT, TEXT("(Default)"));