Skip to content

Commit

Permalink
Reinstall from the menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
tarao committed Sep 19, 2010
1 parent 2cd8dda commit 0d3d5a7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 8 additions & 3 deletions mmwnd/mmwnd/mmwnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,24 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM param1, LPARAM param2) {
profile() >> PROFILE_ENTRY_RESTRICTMOVEMENT >> restrict_movement;
restrict_movement = !restrict_movement;
profile() << PROFILE_ENTRY_RESTRICTMOVEMENT << restrict_movement;
mmwnd::get().reinstall();
log() << _T("toggle restrict movement: ")
<< restrict_movement << std::endl;
mmwnd::get().reinstall();
log(_T("hook reinstalled"));
break;
}
case ID_POPUP_SHOWTRAYICON:
log("hide tray icon");
log(_T("hide tray icon"));
if (the_notify_icon().uninstall()) {
profile() << PROFILE_ENTRY_NOTIFYICON << false;
}
break;
case ID_POPUP_RESET:
mmwnd::get().reinstall();
log(_T("hook reinstalled"));
break;
case ID_POPUP_EXIT:
log("exit from menu");
log(_T("exit from menu"));
::PostQuitMessage(0);
break;
}
Expand Down
1 change: 1 addition & 0 deletions mmwnd/mmwnd/mmwnd.rc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ BEGIN
BEGIN
MENUITEM "restrict &movement", ID_POPUP_RESTRICTMOVEMENT, CHECKED
MENUITEM "show &tray icon", ID_POPUP_SHOWTRAYICON, CHECKED
MENUITEM "&reset", ID_POPUP_RESET
MENUITEM "e&xit", ID_POPUP_EXIT
END
END
Expand Down
3 changes: 2 additions & 1 deletion mmwnd/mmwnd/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
#define ID_POPUP_EXIT 40001
#define ID_POPUP_SHOWTRAYICON 40002
#define ID_POPUP_RESTRICTMOVEMENT 40003
#define ID_POPUP_RESET 40004

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 103
#define _APS_NEXT_COMMAND_VALUE 40004
#define _APS_NEXT_COMMAND_VALUE 40005
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
Expand Down

0 comments on commit 0d3d5a7

Please sign in to comment.