diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-04 15:08:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-04 15:08:55 +0000 |
commit | 1705dfe26353057e4fa274280ff9552840ea9aab (patch) | |
tree | 6951b185f50c09ea8c6400cd96ded4866cde45fd /plugins/Non-IM Contact/src/main.cpp | |
parent | 814f6082b4fa4b4c7c31edba2e1a63bfeaf71828 (diff) |
Non-IM contacts:
- 64-bit adaptation;
- icons migrated to icolib;
- various cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@4301 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Non-IM Contact/src/main.cpp')
-rw-r--r-- | plugins/Non-IM Contact/src/main.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index a41aa8500b..ebefd3ce12 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -114,10 +114,17 @@ int ModulesLoaded(WPARAM wParam,LPARAM lParam) // Description : Called when plugin is loaded into Miranda
//=====================================================
+IconItem icoList[] =
+{
+ { LPGEN("Main Icon"), MODNAME, IDI_MAIN },
+};
+
extern "C" __declspec(dllexport) int Load()
{
mir_getLP(&pluginInfoEx);
+ Icon_Register(hInst, LPGEN("Non-IM Contact"), icoList, SIZEOF(icoList));
+
HookEvent(ME_CLIST_DOUBLECLICKED, (MIRANDAHOOK)doubleClick);
HookEvent(ME_OPT_INITIALISE,NimcOptInit);
HookEvent(ME_CLIST_STATUSMODECHANGE, SetLCStatus);
@@ -140,18 +147,18 @@ extern "C" __declspec(dllexport) int Load() CreateServiceFunction("NIM_Contact/DoubleClick", doubleClick);
CLISTMENUITEM mi = { sizeof(mi) };
+ mi.flags = CMIF_ICONFROMICOLIB;
mi.position = 600090000;
mi.pszPopupName = LPGEN("&Non-IM Contact");
mi.popupPosition = 600090000;
mi.pszName = LPGEN("&Add Non-IM Contact");
mi.pszService = "AddLCcontact";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_MAIN));
+ mi.icolibItem = icoList[0].hIcolib;
Menu_AddMainMenuItem(&mi);
mi.position = 600090001;
mi.pszName = LPGEN("&View/Edit Files");
mi.pszService = "LoadFilesDlg";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_MAIN));
Menu_AddMainMenuItem(&mi);
if (db_get_b(NULL, MODNAME, "Beta",0)) {
@@ -176,11 +183,9 @@ extern "C" __declspec(dllexport) int Load() mi.pszContactOwner = MODNAME;
mi.pszName = LPGEN("E&dit Contact Settings");
mi.pszService = "EditLCcontact";
- mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_MAIN));
Menu_AddMainMenuItem(&mi);
- hWindowList = (HWND)CallService(MS_UTILS_ALLOCWINDOWLIST,0,0);
- HookEvent(ME_SYSTEM_MODULESLOADED,ModulesLoaded);
+ HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
// known modules list
db_set_s(NULL, "KnownModules","Non-IM Contact", MODNAME);
|