diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-22 20:38:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-22 20:38:56 +0000 |
commit | 88790eed4ffd9ca555c8f9b73cb014a93b57a34f (patch) | |
tree | b3e5bfe096005a9cac4bc14fdfbe5f6f5acad98a /plugins/HTTPServer/src | |
parent | 9ecc2aa50e2183e2c4a11861ca6dede7d2151139 (diff) |
Menu_ModifyItem unbound from CLISTMENUITEM structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@14334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HTTPServer/src')
-rw-r--r-- | plugins/HTTPServer/src/main.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index 7343d10006..bdca6bfcf0 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -622,10 +622,8 @@ static int nProtoAck(WPARAM /*wParam*/, LPARAM lParam) { // Developer : KN
/////////////////////////////////////////////////////////////////////
-INT_PTR nToggelAcceptConnections(WPARAM wparam, LPARAM /*lparam*/) {
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_NAME | CMIM_ICON;
-
+INT_PTR nToggelAcceptConnections(WPARAM wparam, LPARAM /*lparam*/)
+{
if (!hDirectBoundPort) {
NETLIBUSERSETTINGS nus = { 0 };
nus.cbSize = sizeof(nus);
@@ -644,27 +642,22 @@ INT_PTR nToggelAcceptConnections(WPARAM wparam, LPARAM /*lparam*/) { if (!hDirectBoundPort) {
TCHAR szTemp[200];
mir_snprintf(szTemp, TranslateT("Failed to bind to port %s\r\nThis is most likely because another program or service is using this port") ,
- nlb.wPort == 80 ? "80" : nus.szIncomingPorts);
+ nlb.wPort == 80 ? "80" : nus.szIncomingPorts);
MessageBox(NULL, szTemp, MSG_BOX_TITEL, MB_OK);
return 1001;
}
dwLocalPortUsed = nlb.wPort;
dwLocalIpAddress = nlb.dwInternalIP;
- mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_DISABLE_SERVER));
- mi.ptszName = LPGENT("Disable HTTP server");
+ Menu_ModifyItem(hAcceptConnectionsMenuItem, LPGENT("Disable HTTP server"), LoadIcon(hInstance, MAKEINTRESOURCE(IDI_DISABLE_SERVER)));
}
else if (hDirectBoundPort && wparam == 0) {
Netlib_CloseHandle(hDirectBoundPort);
hDirectBoundPort = 0;
- mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
- mi.ptszName = LPGENT("Enable HTTP server");
+ Menu_ModifyItem(hAcceptConnectionsMenuItem, LPGENT("Enable HTTP server"), LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE)));
}
else return 0; // no changes;
- if (hAcceptConnectionsMenuItem)
- Menu_ModifyItem(hAcceptConnectionsMenuItem, &mi);
-
if (! bShutdownInProgress)
db_set_b(NULL, MODULE, "AcceptConnections", hDirectBoundPort != 0);
|