diff options
author | George Hazan <george.hazan@gmail.com> | 2012-10-08 11:17:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-10-08 11:17:06 +0000 |
commit | 39b98d62430ee2a762db94822c2da05b2065d021 (patch) | |
tree | 9a9e551d19fe9beae45ec1edadd6d8fec023efe9 /plugins/FileAsMessage/src | |
parent | 607e8d87185d4388f3bc8a9797075eb99e472ee1 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@1812 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FileAsMessage/src')
-rw-r--r-- | plugins/FileAsMessage/src/main.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index 61dfdb512b..681cd4f02a 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -95,12 +95,6 @@ int OnSettingChanged(WPARAM wParam,LPARAM lParam) return 0;
}
-int OnContactAdded(WPARAM wParam,LPARAM lParam)
-{
- CallService(MS_PROTO_ADDTOCONTACT, wParam, (LPARAM)SERVICE_NAME);
- return 0;
-}
-
INT_PTR OnRecvFile(WPARAM wParam, LPARAM lParam)
{
CLISTEVENT *clev = (CLISTEVENT*)lParam;
@@ -243,25 +237,16 @@ int OnModulesLoaded(WPARAM wparam,LPARAM lparam) hIcons[indx] = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szIconId[indx]);
hHookSkinIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, OnSkinIconsChanged);
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
- while(hContact)
- {
- if(!CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)SERVICE_NAME))
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)SERVICE_NAME);
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
- }
- CLISTMENUITEM mi;
- ZeroMemory(&mi, sizeof(mi));
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.cbSize = sizeof(CLISTMENUITEM);
mi.position = 200011;
mi.hIcon = hIcons[ICON_MAIN];
- mi.pszName = Translate("File As Message...");
+ mi.pszName = LPGEN("File As Message...");
mi.pszService = SERVICE_NAME "/FESendFile";
mi.pszContactOwner = NULL;
mi.flags = CMIF_NOTOFFLINE;
Menu_AddContactMenuItem(&mi);
-
return 0;
}
@@ -294,7 +279,6 @@ extern "C" __declspec(dllexport) int Load(void) HookEvent(ME_OPT_INITIALISE, OnOptInitialise);
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
hHookDbSettingChange = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnSettingChanged);
- hHookContactAdded = HookEvent(ME_DB_CONTACT_ADDED, OnContactAdded);
hHookSkinIconsChanged = NULL;
return 0;
|