summaryrefslogtreecommitdiff
path: root/src/modules/sremail/email.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
commite58823d961a630eb62e60d2ccb443761ba5f1704 (patch)
tree62d071be480d57af2a53f154a1468abe0b9449ff /src/modules/sremail/email.cpp
parent721aea0764451e985d575236205808bbef298244 (diff)
- all MS_CLIST_ADD*ITEM services replaced with Menu_Add*Item stubs.
- massive cleanup of the menu-related code git-svn-id: http://svn.miranda-ng.org/main/trunk@410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/sremail/email.cpp')
-rw-r--r--src/modules/sremail/email.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/modules/sremail/email.cpp b/src/modules/sremail/email.cpp
index 38a1e0eb11..db8893b570 100644
--- a/src/modules/sremail/email.cpp
+++ b/src/modules/sremail/email.cpp
@@ -2,7 +2,7 @@
Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-2009 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -26,29 +26,29 @@ static HANDLE hEMailMenuItem;
void SendEmailThread(void *szUrl)
{
- ShellExecuteA(NULL,"open",( char* )szUrl,"","",SW_SHOW);
+ ShellExecuteA(NULL, "open", ( char* )szUrl, "", "", SW_SHOW);
mir_free(szUrl);
return;
}
-static INT_PTR SendEMailCommand(WPARAM wParam,LPARAM lParam)
+static INT_PTR SendEMailCommand(WPARAM wParam, LPARAM lParam)
{
DBVARIANT dbv;
char *szUrl;
char *szProto;
- szProto=(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,wParam,0);
- if (szProto == NULL || DBGetContactSettingString((HANDLE)wParam,szProto,"e-mail",&dbv)) {
- if (DBGetContactSettingString((HANDLE)wParam,"UserInfo","Mye-mail0",&dbv)) {
- MessageBox((HWND)lParam,TranslateT("User has not registered an e-mail address"),TranslateT("Send e-mail"),MB_OK);
+ szProto=(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
+ if (szProto == NULL || DBGetContactSettingString((HANDLE)wParam, szProto, "e-mail", &dbv)) {
+ if (DBGetContactSettingString((HANDLE)wParam, "UserInfo", "Mye-mail0", &dbv)) {
+ MessageBox((HWND)lParam, TranslateT("User has not registered an e-mail address"), TranslateT("Send e-mail"), MB_OK);
return 1;
}
}
szUrl=(char*)mir_alloc(lstrlenA(dbv.pszVal)+8);
- lstrcpyA(szUrl,"mailto:");
- lstrcatA(szUrl,dbv.pszVal);
+ lstrcpyA(szUrl, "mailto:");
+ lstrcatA(szUrl, dbv.pszVal);
mir_free(dbv.pszVal);
- forkthread(SendEmailThread,0,szUrl);
+ forkthread(SendEmailThread, 0, szUrl);
return 0;
}
@@ -58,12 +58,12 @@ static int EMailPreBuildMenu(WPARAM wParam, LPARAM)
DBVARIANT dbv = { 0 };
char *szProto;
- ZeroMemory(&mi,sizeof(mi));
+ ZeroMemory(&mi, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.flags = CMIM_FLAGS;
szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
- if (szProto == NULL || DBGetContactSettingString((HANDLE)wParam, szProto, "e-mail",& dbv))
+ if (szProto == NULL || DBGetContactSettingString((HANDLE)wParam, szProto, "e-mail", & dbv))
if (DBGetContactSettingString((HANDLE)wParam, "UserInfo", "Mye-mail0", &dbv))
mi.flags = CMIM_FLAGS | CMIF_HIDDEN;
@@ -81,7 +81,7 @@ int LoadSendRecvEMailModule(void)
mi.icolibItem = GetSkinIconHandle( SKINICON_OTHER_SENDEMAIL );
mi.pszName = LPGEN("&E-mail");
mi.pszService = MS_EMAIL_SENDEMAIL;
- hEMailMenuItem = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi);
+ hEMailMenuItem = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(MS_EMAIL_SENDEMAIL, SendEMailCommand);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, EMailPreBuildMenu);