summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM/src/ftpfile.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-12-05 10:33:01 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-12-05 10:33:01 +0000
commita24b86d275a37bde42ae74ec12c235e4fe6b0d60 (patch)
treedc195697c83eee24a29ce24806786faeba872b6d /plugins/FTPFileYM/src/ftpfile.cpp
parente5483a07e282dbc6be8ee498ff6ce676ee0ce2ed (diff)
- removed useless array for icons handle;
- removed unused stubs for the database functions git-svn-id: http://svn.miranda-ng.org/main/trunk@2651 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FTPFileYM/src/ftpfile.cpp')
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index d6f5dfe11b..2642fb49d5 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -85,8 +85,6 @@ static IconItem iconList[] =
{ "Delete from FTP", "delete", IDI_DELETE }
};
-static HANDLE hIconlibItem[ServerList::FTP_COUNT + SIZEOF(iconList)];
-
static void InitIcolib()
{
Icon_Register(hInst, MODULE, iconList, SIZEOF(iconList), MODULE);
@@ -98,12 +96,13 @@ void InitMenuItems()
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR;
- mi.icolibItem = hIconlibItem[ServerList::FTP_COUNT];
+ mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
mi.ptszName = LPGENT("FTP File");
hMainMenu = Menu_AddMainMenuItem(&mi);
- if (opt.bUseSubmenu) hMenu = Menu_AddContactMenuItem(&mi);
+ if (opt.bUseSubmenu)
+ hMenu = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -126,7 +125,7 @@ void InitMenuItems()
mi.hParentMenu = hMenu;
}
- mi.icolibItem = hIconlibItem[i];
+ mi.icolibItem = iconList[i].hIcolib;
mi.popupPosition = i + 1000;
hSubMenu[i] = Menu_AddContactMenuItem(&mi);
@@ -168,7 +167,7 @@ void InitMenuItems()
memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.flags = CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR;
- mi.icolibItem = hIconlibItem[ServerList::FTP_COUNT];
+ mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
mi.ptszName = LPGENT("FTP File manager");
mi.pszService = MS_FTPFILE_SHOWMANAGER;
@@ -200,7 +199,7 @@ void InitTabsrmmButton()
btn.dwButtonID = 1;
btn.pszModuleName = MODULE;
btn.dwDefPos = 105;
- btn.hIcon = hIconlibItem[ServerList::FTP_COUNT];
+ btn.hIcon = iconList[ServerList::FTP_COUNT].hIcolib;
btn.bbbFlags = BBBF_ISARROWBUTTON | BBBF_ISIMBUTTON | BBBF_ISLSIDEBUTTON | BBBF_CANBEHIDDEN;
btn.ptszTooltip = TranslateT("FTP File");
CallService(MS_BB_ADDBUTTON, 0, (LPARAM)&btn);
@@ -214,7 +213,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
bool bIsContact = false;
- char *szProto = DB::getProto((HANDLE)wParam);
+ char *szProto = GetContactProto((HANDLE)wParam);
if (szProto) bIsContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) ? true : false;
bool bHideRoot = opt.bHideInactive;