diff options
-rw-r--r-- | plugins/SecureIM/src/commonheaders.cpp | 34 | ||||
-rw-r--r-- | plugins/SecureIM/src/commonheaders.h | 7 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_lists.cpp | 13 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_popups.cpp | 55 | ||||
-rw-r--r-- | plugins/SecureIM/src/main.cpp | 19 | ||||
-rw-r--r-- | plugins/SecureIM/src/mmi.cpp | 19 | ||||
-rw-r--r-- | plugins/SecureIM/src/options.cpp | 55 | ||||
-rw-r--r-- | plugins/SecureIM/src/popupOptions.cpp | 2 | ||||
-rw-r--r-- | plugins/SecureIM/src/svcs_popup.cpp | 115 |
9 files changed, 75 insertions, 244 deletions
diff --git a/plugins/SecureIM/src/commonheaders.cpp b/plugins/SecureIM/src/commonheaders.cpp index fa384b3492..75749b083f 100644 --- a/plugins/SecureIM/src/commonheaders.cpp +++ b/plugins/SecureIM/src/commonheaders.cpp @@ -17,7 +17,7 @@ HICON g_hICO[ICO_CNT], g_hPOP[POP_CNT], g_hIEC[1+IEC_CNT*MODE_CNT] = {0}; HANDLE g_IEC[1+IEC_CNT*MODE_CNT];
int iBmpDepth;
-BOOL bCoreUnicode = false, bMetaContacts = false, bPopupExists = false, bPopupUnicode = false;
+BOOL bMetaContacts = false, bPopupExists = false;
BOOL bPGPloaded = false, bPGPkeyrings = false, bUseKeyrings = false, bPGPprivkey = false;
BOOL bGPGloaded = false, bGPGkeyrings = false, bSavePass = false;
BOOL bSFT, bSOM, bASI, bMCD, bSCM, bDGP, bAIP, bNOL, bAAK, bMCM;
@@ -122,33 +122,21 @@ LPSTR TranslateU( LPCSTR lpText ) ca2u++;
pa2u = (pA2U) mir_realloc(pa2u,sizeof(A2U)*ca2u);
pa2u[i].a = (LPSTR) lpText;
- if ( bCoreUnicode ) {
- LPWSTR lpwText = mir_a2u(lpText);
- LPWSTR lpwTran = TranslateW(lpwText);
- mir_free(lpwText);
- pa2u[i].u = mir_strdup(exp->utf8encode(lpwTran));
- }
- else {
- LPSTR lpTran = Translate(lpText);
- LPWSTR lpwTran = mir_a2u(lpTran);
- lpTran = exp->utf8encode(lpwTran);
- mir_free(lpwTran);
- pa2u[i].u = mir_strdup(lpTran);
- }
+ LPWSTR lpwText = mir_a2u(lpText);
+ LPWSTR lpwTran = TranslateW(lpwText);
+ mir_free(lpwText);
+ pa2u[i].u = mir_strdup(exp->utf8encode(lpwTran));
return pa2u[i].u;
}
int msgbox( HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType)
{
- if ( bCoreUnicode ) {
- LPWSTR lpwText = mir_a2u(lpText);
- LPWSTR lpwCaption = mir_a2u(lpCaption);
- int r = MessageBoxW(hWnd,TranslateW(lpwText),TranslateW(lpwCaption),uType);
- mir_free(lpwCaption);
- mir_free(lpwText);
- return r;
- }
- return MessageBoxA(hWnd,Translate(lpText),Translate(lpCaption),uType);
+ LPWSTR lpwText = mir_a2u(lpText);
+ LPWSTR lpwCaption = mir_a2u(lpCaption);
+ int r = MessageBoxW(hWnd,TranslateW(lpwText),TranslateW(lpwCaption),uType);
+ mir_free(lpwCaption);
+ mir_free(lpwText);
+ return r;
}
void CopyToClipboard(HWND hwnd,LPSTR msg)
diff --git a/plugins/SecureIM/src/commonheaders.h b/plugins/SecureIM/src/commonheaders.h index 886e0ed9cc..16c5c827c9 100644 --- a/plugins/SecureIM/src/commonheaders.h +++ b/plugins/SecureIM/src/commonheaders.h @@ -142,7 +142,7 @@ extern int iService, iHook; extern HICON g_hICO[ICO_CNT], g_hIEC[1+IEC_CNT*MODE_CNT], g_hPOP[POP_CNT];
extern HANDLE g_IEC[1+IEC_CNT*MODE_CNT];
extern int iBmpDepth;
-extern BOOL bCoreUnicode, bMetaContacts, bPopupExists, bPopupUnicode;
+extern BOOL bMetaContacts, bPopupExists;
extern BOOL bPGPloaded, bPGPkeyrings, bUseKeyrings, bPGPprivkey;
extern BOOL bGPGloaded, bGPGkeyrings, bSavePass;
extern BOOL bSFT, bSOM, bASI, bMCD, bSCM, bDGP, bAIP, bNOL, bAAK, bMCM;
@@ -150,8 +150,9 @@ extern BYTE bPGP, bGPG; extern DWORD iCoreVersion;
extern CRITICAL_SECTION localQueueMutex;
-int onModulesLoaded(WPARAM,LPARAM);
-int onSystemOKToExit(WPARAM,LPARAM);
+int onModulesLoaded(WPARAM, LPARAM);
+int onSystemOKToExit(WPARAM, LPARAM);
+int ModuleLoad(WPARAM wParam, LPARAM lParam);
void AddServiceFunction(LPCSTR,MIRANDASERVICE);
void AddProtoServiceFunction(LPCSTR,MIRANDASERVICE);
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp index 2e616a46b7..fc77021775 100644 --- a/plugins/SecureIM/src/crypt_lists.cpp +++ b/plugins/SecureIM/src/crypt_lists.cpp @@ -218,11 +218,9 @@ void getContactNameA(HANDLE hContact, LPSTR szName) { strcpy(szName,(LPCSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0));
}
-void getContactName(HANDLE hContact, LPSTR szName) {
- if ( bCoreUnicode )
- wcscpy((LPWSTR)szName,(LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GSMDF_UNICODE));
- else
- getContactNameA(hContact, szName);
+void getContactName(HANDLE hContact, LPSTR szName)
+{
+ wcscpy((LPWSTR)szName, (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GSMDF_UNICODE));
}
void getContactUinA(HANDLE hContact, LPSTR szUIN) {
@@ -250,9 +248,10 @@ void getContactUinA(HANDLE hContact, LPSTR szUIN) { DBFreeVariant(&dbv_uniqueid);
}
-void getContactUin(HANDLE hContact, LPSTR szUIN) {
+void getContactUin(HANDLE hContact, LPSTR szUIN)
+{
getContactUinA(hContact, szUIN);
- if ( bCoreUnicode && *szUIN ) {
+ if (*szUIN) {
LPWSTR tmp = mir_a2u(szUIN);
wcscpy((LPWSTR)szUIN, tmp);
mir_free(tmp);
diff --git a/plugins/SecureIM/src/crypt_popups.cpp b/plugins/SecureIM/src/crypt_popups.cpp index 924719bb4b..4d91ab8f8d 100644 --- a/plugins/SecureIM/src/crypt_popups.cpp +++ b/plugins/SecureIM/src/crypt_popups.cpp @@ -71,46 +71,21 @@ void showPopUp(LPCSTR lpzText,HANDLE hContact,HICON hIcon, UINT type) { DBFreeVariant(&dbv_timeout);
}
- if ( bCoreUnicode && bPopupUnicode ) {
- POPUPDATAW ppd = {0};
-
- ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
- ppd.lchIcon = hIcon;
- LPWSTR lpwzContactName = (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GSMDF_UNICODE);
- wcscpy(ppd.lpwzContactName, lpwzContactName);
- LPWSTR lpwzText = mir_a2u(lpzText);
- wcscpy(ppd.lpwzText, TranslateW(lpwzText));
- mir_free(lpwzText);
- ppd.colorBack = colorBack;
- ppd.colorText = colorText;
- ppd.iSeconds = timeout;
-// ppd.PluginWindowProc = (WNDPROC)PopupDlgProc;
-
- //Now that the plugin data has been filled, we add it to the PopUpData.
-// ppd.PluginData = NULL;
-
- //Now that every field has been filled, we want to see the popup.
- PUAddPopUpW(&ppd);
- }
- else {
- POPUPDATAEX ppd = {0};
-
- ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
- ppd.lchIcon = hIcon;
- LPSTR lpzContactName = (LPSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0);
- strcpy(ppd.lpzContactName, lpzContactName);
- strcpy(ppd.lpzText, Translate(lpzText));
- ppd.colorBack = colorBack;
- ppd.colorText = colorText;
- ppd.iSeconds = timeout;
-// ppd.PluginWindowProc = (WNDPROC)PopupDlgProc;
-
- //Now that the plugin data has been filled, we add it to the PopUpData.
-// ppd.PluginData = NULL;
-
- //Now that every field has been filled, we want to see the popup.
- PUAddPopUpEx(&ppd);
- }
+ POPUPDATAW ppd = {0};
+
+ ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
+ ppd.lchIcon = hIcon;
+ LPWSTR lpwzContactName = (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GSMDF_UNICODE);
+ wcscpy(ppd.lpwzContactName, lpwzContactName);
+ LPWSTR lpwzText = mir_a2u(lpzText);
+ wcscpy(ppd.lpwzText, TranslateW(lpwzText));
+ mir_free(lpwzText);
+ ppd.colorBack = colorBack;
+ ppd.colorText = colorText;
+ ppd.iSeconds = timeout;
+
+ //Now that every field has been filled, we want to see the popup.
+ PUAddPopUpW(&ppd);
}
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index a1f8a91f02..33820e04d4 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -98,7 +98,6 @@ extern "C" __declspec(dllexport) int __cdecl Load(void) if (bIsComCtl6) iBmpDepth = ILC_COLOR32 | ILC_MASK; // 32-bit images are supported
else iBmpDepth = ILC_COLOR24 | ILC_MASK;
- bCoreUnicode = true;
iCoreVersion = CallService(MS_SYSTEM_GETVERSION,0,0);
// load crypo++ dll
@@ -118,6 +117,8 @@ extern "C" __declspec(dllexport) int __cdecl Load(void) // hook events
AddHookFunction(ME_SYSTEM_MODULESLOADED, onModulesLoaded);
AddHookFunction(ME_SYSTEM_OKTOEXIT, onSystemOKToExit);
+ AddHookFunction(ME_SYSTEM_MODULELOAD, ModuleLoad);
+ AddHookFunction(ME_SYSTEM_MODULEUNLOAD, ModuleLoad);
g_hEvent[0] = CreateHookableEvent(MODULENAME"/Disabled");
g_hEvent[1] = CreateHookableEvent(MODULENAME"/Established");
@@ -145,18 +146,20 @@ extern "C" __declspec(dllexport) int __cdecl Unload() return 0;
}
+int ModuleLoad(WPARAM wParam, LPARAM lParam)
+{
+ bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPEX) != 0;
+ bMetaContacts = ServiceExists(MS_MC_GETMETACONTACT) != 0;
+ return 0;
+}
-int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam)
+int onModulesLoaded(WPARAM wParam, LPARAM lParam)
{
#if defined(_DEBUG) || defined(NETLIB_LOG)
InitNetlib();
Sent_NetLog("onModuleLoaded begin");
#endif
- bMetaContacts = ServiceExists(MS_MC_GETMETACONTACT)!=0;
- bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPEX)!=0;
- bPopupUnicode = ServiceExists(MS_POPUP_ADDPOPUPW)!=0;
-
if ( ServiceExists(MS_FOLDERS_GET_PATH))
g_hFolders = FoldersRegisterCustomPathT(szModuleName, "Icons", _T(MIRANDA_PATH"\\icons"));
@@ -464,8 +467,8 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) }
-int __cdecl onSystemOKToExit(WPARAM wParam,LPARAM lParam) {
-
+int onSystemOKToExit(WPARAM wParam, LPARAM lParam)
+{
if (bSavePass) {
LPSTR tmp = gpg_get_passphrases();
DBWriteContactSettingString(0,szModuleName,"gpgSave",tmp);
diff --git a/plugins/SecureIM/src/mmi.cpp b/plugins/SecureIM/src/mmi.cpp index 76a6bd065b..09cc5f2db3 100644 --- a/plugins/SecureIM/src/mmi.cpp +++ b/plugins/SecureIM/src/mmi.cpp @@ -112,18 +112,13 @@ LPSTR utf8_to_miranda(LPCSTR szUtfMsg, DWORD& flags) { flags &= ~(PREF_UTF|PREF_UNICODE);
LPWSTR wszMsg = exp->utf8decode(szUtfMsg);
LPSTR szMsg = mir_u2a(wszMsg);
- if ( bCoreUnicode ) {
- flags |= PREF_UNICODE;
- int olen = (int)wcslen((LPWSTR)wszMsg)+1;
- int nlen = olen*(sizeof(WCHAR)+1);
- szNewMsg = (LPSTR) mir_alloc(nlen);
- memcpy(szNewMsg,szMsg,olen);
- memcpy(szNewMsg+olen,wszMsg,olen*sizeof(WCHAR));
- mir_free(szMsg);
- }
- else {
- szNewMsg = szMsg;
- }
+ flags |= PREF_UNICODE;
+ int olen = (int)wcslen((LPWSTR)wszMsg)+1;
+ int nlen = olen*(sizeof(WCHAR)+1);
+ szNewMsg = (LPSTR) mir_alloc(nlen);
+ memcpy(szNewMsg,szMsg,olen);
+ memcpy(szNewMsg+olen,wszMsg,olen*sizeof(WCHAR));
+ mir_free(szMsg);
}
else {
flags &= ~PREF_UNICODE; flags |= PREF_UTF;
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index ad08409c04..f3ac91a328 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -26,42 +26,30 @@ BOOL hasKey(pUinKey ptr) void TC_InsertItem(HWND hwnd, WPARAM wparam, TCITEM *tci)
{
- if ( bCoreUnicode ) {
- LPWSTR tmp = mir_a2u(tci->pszText);
- tci->pszText = (LPSTR)TranslateW(tmp);
- SNDMSG(hwnd, TCM_INSERTITEMW, wparam, (LPARAM)tci);
- mir_free(tmp);
- }
- else {
- tci->pszText = Translate(tci->pszText);
- SNDMSG(hwnd, TCM_INSERTITEMA, wparam, (LPARAM)tci);
- }
+ LPWSTR tmp = mir_a2u(tci->pszText);
+ tci->pszText = (LPSTR)TranslateW(tmp);
+ SNDMSG(hwnd, TCM_INSERTITEMW, wparam, (LPARAM)tci);
+ mir_free(tmp);
}
static void LV_InsertColumn(HWND hwnd, WPARAM wparam, LVCOLUMN *lvc)
{
- if ( bCoreUnicode ) {
- LPWSTR tmp = mir_a2u(lvc->pszText);
- lvc->pszText = (LPSTR)TranslateW(tmp);
- SNDMSG(hwnd, LVM_INSERTCOLUMNW, wparam, (LPARAM)lvc);
- mir_free(tmp);
- }
- else {
- lvc->pszText = Translate(lvc->pszText);
- SNDMSG(hwnd, LVM_INSERTCOLUMNA, wparam, (LPARAM)lvc);
- }
+ LPWSTR tmp = mir_a2u(lvc->pszText);
+ lvc->pszText = (LPSTR)TranslateW(tmp);
+ SNDMSG(hwnd, LVM_INSERTCOLUMNW, wparam, (LPARAM)lvc);
+ mir_free(tmp);
}
int LV_InsertItem(HWND hwnd, LVITEM *lvi)
{
- return SNDMSG(hwnd, bCoreUnicode ? LVM_INSERTITEMW : LVM_INSERTITEMA, 0, (LPARAM)lvi);
+ return SNDMSG(hwnd, LVM_INSERTITEMW, 0, (LPARAM)lvi);
}
int LV_InsertItemA(HWND hwnd, LVITEM *lvi)
{
- if ( bCoreUnicode ) lvi->pszText = (LPSTR) mir_a2u(lvi->pszText);
+ lvi->pszText = (LPSTR) mir_a2u(lvi->pszText);
int ret = LV_InsertItem(hwnd, lvi);
- if ( bCoreUnicode ) mir_free(lvi->pszText);
+ mir_free(lvi->pszText);
return ret;
}
@@ -70,14 +58,14 @@ void LV_SetItemText(HWND hwnd, WPARAM wparam, int subitem, LPSTR text) LV_ITEM lvi; memset(&lvi,0,sizeof(lvi));
lvi.iSubItem = subitem;
lvi.pszText = text;
- SNDMSG(hwnd, bCoreUnicode ? LVM_SETITEMTEXTW : LVM_SETITEMTEXTA, wparam, (LPARAM)&lvi);
+ SNDMSG(hwnd, LVM_SETITEMTEXTW, wparam, (LPARAM)&lvi);
}
void LV_SetItemTextA(HWND hwnd, WPARAM wparam, int subitem, LPSTR text)
{
- if ( bCoreUnicode ) text = (LPSTR) mir_a2u(text);
+ text = (LPSTR) mir_a2u(text);
LV_SetItemText(hwnd, wparam, subitem, text);
- if ( bCoreUnicode ) mir_free(text);
+ mir_free(text);
}
void LV_GetItemTextA(HWND hwnd, WPARAM wparam, int iSubItem, LPSTR text, int cchTextMax)
@@ -86,12 +74,10 @@ void LV_GetItemTextA(HWND hwnd, WPARAM wparam, int iSubItem, LPSTR text, int cch lvi.iSubItem = iSubItem;
lvi.cchTextMax = cchTextMax;
lvi.pszText = text;
- SNDMSG(hwnd, bCoreUnicode ? LVM_GETITEMTEXTW : LVM_GETITEMTEXTA, wparam, (LPARAM)&lvi);
- if ( bCoreUnicode ) {
- lvi.pszText = mir_u2a((LPWSTR)text);
- strcpy(text, lvi.pszText);
- mir_free(lvi.pszText);
- }
+ SNDMSG(hwnd, LVM_GETITEMTEXTW, wparam, (LPARAM)&lvi);
+ lvi.pszText = mir_u2a((LPWSTR)text);
+ strcpy(text, lvi.pszText);
+ mir_free(lvi.pszText);
}
/*
@@ -1007,9 +993,8 @@ INT_PTR CALLBACK DlgProcSetPSK(HWND hDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) switch(uMsg) {
case WM_INITDIALOG: {
TranslateDialogDefault(hDlg);
- SendDlgItemMessage(hDlg,IDC_EDIT1,EM_LIMITTEXT,PSKSIZE-1,0);
- if ( bCoreUnicode ) SetDlgItemTextW(hDlg,IDC_EDIT2,(LPWSTR)lParam);
- else SetDlgItemTextA(hDlg,IDC_EDIT2,(LPCSTR)lParam);
+ SendDlgItemMessage(hDlg, IDC_EDIT1, EM_LIMITTEXT, PSKSIZE-1, 0);
+ SetDlgItemTextW(hDlg, IDC_EDIT2, (LPWSTR)lParam);
buffer = (LPSTR)lParam;
return (TRUE);
}
diff --git a/plugins/SecureIM/src/popupOptions.cpp b/plugins/SecureIM/src/popupOptions.cpp index d0ac6983eb..cba9e744a9 100644 --- a/plugins/SecureIM/src/popupOptions.cpp +++ b/plugins/SecureIM/src/popupOptions.cpp @@ -225,7 +225,7 @@ void RefreshPopupOptionsDlg(HWND hec,HWND hdc,HWND hss,HWND hsr,HWND hks,HWND hk int onRegisterPopOptions(WPARAM wParam, LPARAM)
{
- if (ServiceExists(MS_POPUP_ADDPOPUP)) {
+ if (bPopupExists) {
OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.hInstance = g_hInst;
diff --git a/plugins/SecureIM/src/svcs_popup.cpp b/plugins/SecureIM/src/svcs_popup.cpp deleted file mode 100644 index bb1eb88355..0000000000 --- a/plugins/SecureIM/src/svcs_popup.cpp +++ /dev/null @@ -1,115 +0,0 @@ -#include "commonheaders.h"
-
-/*
-static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
- switch(message) {
- case WM_COMMAND:
- if (wParam == STN_CLICKED) { // It was a click on the Popup.
- PUDeletePopUp(hWnd);
- return TRUE;
- }
- break;
- case UM_FREEPLUGINDATA: {
- return TRUE; //TRUE or FALSE is the same, it gets ignored.
- }
- default:
- break;
- }
- return DefWindowProc(hWnd, message, wParam, lParam);
-}
-*/
-
-void showPopupMsg(HANDLE hContact, LPCSTR lpzText, HICON hIcon, int type) {
-
- // type:
- // 0 - error
- // 1 - key sent
- // 2 - key recv
- // 3 - established
- // 4 - disabled
- // 5 - msg recv
- // 6 - msg sent
- //
-
- if (!bPopupExists) return;
-
- char nback[32]; mir_snprintf(nback,sizeof(nback),"popup%dback", $type);
- char ntext[32]; mir_snprintf(ntext,sizeof(ntext),"popup%dtext", $type);
- char ntime[32]; mir_snprintf(ntime,sizeof(ntime),"popup%dtime", $type);
-
- COLORREF colorBack = (COLORREF)DBGetContactSettingDword(0,szModuleName,nback,(DWORD)RGB(230,230,255));
- COLORREF colorText = (COLORREF)DBGetContactSettingDword(0,szModuleName,ntext,(DWORD)RGB(0,0,0));
- int timeout = (int)DBGetContactSettingWord(0,szModuleName,ntime,0);
-
- if ( bCoreUnicode && bPopupUnicode ) {
- POPUPDATAW ppd;
- memset(&ppd,0,sizeof(POPUPDATAW));
- ppd.lchContact = hContact;
- ppd.lchIcon = hIcon;
- LPWSTR lpwzContactName = (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCMDF_UNICODE);
- wcscpy(ppd.lpwzContactName, lpwzContactName);
- LPWSTR lpwzText = mir_a2u(lpzText);
- wcscpy(ppd.lpwzText, TranslateW(lpwzText));
- mir_free(lpwzText);
- ppd.colorBack = colorBack;
- ppd.colorText = colorText;
- ppd.iSeconds = timeout;
-// ppd.PluginWindowProc = (WNDPROC)PopupDlgProc;
-// ppd.PluginData = NULL;
- CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, 0);
- }
- else {
- POPUPDATAEX ppd;
- memset(&ppd,0,sizeof(POPUPDATAEX));
- ppd.lchContact = hContact;
- ppd.lchIcon = hIcon;
- LPSTR lpzContactName = (LPSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0);
- strcpy(ppd.lpzContactName, lpzContactName);
- strcpy(ppd.lpzText, Translate(lpzText));
- ppd.colorBack = colorBack;
- ppd.colorText = colorText;
- ppd.iSeconds = timeout;
-// ppd.PluginWindowProc = (WNDPROC)PopupDlgProc;
-// ppd.PluginData = NULL;
- CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)&ppd, 0);
- }
-}
-
-
-void showPopUpDCmsg(HANDLE hContact,LPCSTR msg) {
- int indic=DBGetContactSettingByte(0, szModuleName, "dc",1);
- if (indic==1) showPopUp(msg,hContact,g_hPOP[POP_PU_DIS],1);
-}
-void showPopUpDC(HANDLE hContact) {
- int indic=DBGetContactSettingByte(0, szModuleName, "dc",1);
- if (indic==1) showPopUp(sim006,hContact,g_hPOP[POP_PU_DIS],1);
-}
-void showPopUpEC(HANDLE hContact) {
- int indic=DBGetContactSettingByte(0, szModuleName, "ec",1);
- if (indic==1) showPopUp(sim001,hContact,g_hPOP[POP_PU_EST],1);
-}
-void showPopUpKS(HANDLE hContact) {
- int indic=DBGetContactSettingByte(0, szModuleName, "ks",1);
- if (indic==1) showPopUp(sim007,hContact,g_hPOP[POP_PU_PRC],0);
-}
-void showPopUpKRmsg(HANDLE hContact,LPCSTR msg) {
- int indic=DBGetContactSettingByte(0, szModuleName, "kr",1);
- if (indic==1) showPopUp(msg,hContact,g_hPOP[POP_PU_PRC],0);
-}
-void showPopUpKR(HANDLE hContact) {
- int indic=DBGetContactSettingByte(0, szModuleName, "kr",1);
- if (indic==1) showPopUp(sim008,hContact,g_hPOP[POP_PU_PRC],0);
-}
-void showPopUpSM(HANDLE hContact) {
- int indic=DBGetContactSettingByte(0, szModuleName, "ss",0);
- if (indic==1) showPopUp(sim009,hContact,g_hPOP[POP_PU_MSS],2);
- SkinPlaySound("OutgoingSecureMessage");
-}
-void showPopUpRM(HANDLE hContact) {
- int indic=DBGetContactSettingByte(0, szModuleName, "sr",0);
- if (indic==1) showPopUp(sim010,hContact,g_hPOP[POP_PU_MSR],2);
- SkinPlaySound("IncomingSecureMessage");
-}
-
-
-// EOF
|