mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
[win] add menu item for opening datadir
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
26db88d89b
commit
4c5ec68ff1
|
@ -31,6 +31,7 @@
|
||||||
#define ID_RELOAD 2006
|
#define ID_RELOAD 2006
|
||||||
#define ID_ACCEPT_TRANSIT 2007
|
#define ID_ACCEPT_TRANSIT 2007
|
||||||
#define ID_DECLINE_TRANSIT 2008
|
#define ID_DECLINE_TRANSIT 2008
|
||||||
|
#define ID_DATADIR 2009
|
||||||
|
|
||||||
#define ID_TRAY_ICON 2050
|
#define ID_TRAY_ICON 2050
|
||||||
#define WM_TRAYICON (WM_USER + 1)
|
#define WM_TRAYICON (WM_USER + 1)
|
||||||
|
@ -49,7 +50,8 @@ namespace win32
|
||||||
{
|
{
|
||||||
HMENU hPopup = CreatePopupMenu();
|
HMENU hPopup = CreatePopupMenu();
|
||||||
InsertMenu (hPopup, -1, MF_BYPOSITION | MF_STRING, ID_CONSOLE, "Open &console");
|
InsertMenu (hPopup, -1, MF_BYPOSITION | MF_STRING, ID_CONSOLE, "Open &console");
|
||||||
InsertMenu (hPopup, -1, MF_BYPOSITION | MF_STRING, ID_APP, "Show app");
|
InsertMenu (hPopup, -1, MF_BYPOSITION | MF_STRING, ID_DATADIR, "Open &datadir");
|
||||||
|
InsertMenu (hPopup, -1, MF_BYPOSITION | MF_STRING, ID_APP, "&Show app");
|
||||||
InsertMenu (hPopup, -1, MF_BYPOSITION | MF_STRING, ID_ABOUT, "&About...");
|
InsertMenu (hPopup, -1, MF_BYPOSITION | MF_STRING, ID_ABOUT, "&About...");
|
||||||
InsertMenu (hPopup, -1, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
|
InsertMenu (hPopup, -1, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
|
||||||
if(!i2p::context.AcceptsTunnels())
|
if(!i2p::context.AcceptsTunnels())
|
||||||
|
@ -303,6 +305,12 @@ namespace win32
|
||||||
SetTimer(hWnd, FRAME_UPDATE_TIMER, 3000, NULL);
|
SetTimer(hWnd, FRAME_UPDATE_TIMER, 3000, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
case ID_DATADIR:
|
||||||
|
{
|
||||||
|
std::string datadir(i2p::fs::GetUTF8DataDir());
|
||||||
|
ShellExecute(NULL, "explore", datadir.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue