diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-03 20:16:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-03 20:16:42 +0000 |
commit | f12d8b56f2894e94491bd7424d69f595d285f01f (patch) | |
tree | 3f54d66c8c248bb456da1cb0c5cc31661f144e5f /protocols/MRA/src | |
parent | 1b1a54dc156bec90be3ddc337c17b4e67179d4ea (diff) |
no more MS_CLIST_EXTRA_ADD_ICON in the application code
git-svn-id: http://svn.miranda-ng.org/main/trunk@2175 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src')
-rw-r--r-- | protocols/MRA/src/Mra.h | 2 | ||||
-rw-r--r-- | protocols/MRA/src/MraProto.cpp | 13 | ||||
-rw-r--r-- | protocols/MRA/src/MraProto.h | 1 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 12 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_svcs.cpp | 15 |
5 files changed, 7 insertions, 36 deletions
diff --git a/protocols/MRA/src/Mra.h b/protocols/MRA/src/Mra.h index 67a5aadcec..a4773a74e0 100644 --- a/protocols/MRA/src/Mra.h +++ b/protocols/MRA/src/Mra.h @@ -242,7 +242,7 @@ BOOL IsEMailMR (LPSTR lpszEMail, size_t dwEMailSize); BOOL GetEMailFromString (LPSTR lpszBuff, size_t dwBuffSize, LPSTR *plpszEMail, size_t *pdwEMailSize);
DWORD CreateBlobFromContact (HANDLE hContact, LPWSTR lpwszRequestReason, size_t dwRequestReasonSize, LPBYTE lpbBuff, size_t dwBuffSize, size_t *pdwBuffSizeRet);
-int ExtraSetIcon (HANDLE hExtraIcon, HANDLE hContact, HANDLE hImage, int iColumnType);
+int ExtraSetIcon (HANDLE hExtraIcon, HANDLE hContact, HANDLE hImage);
size_t CopyNumber (LPCVOID lpcOutBuff, LPCVOID lpcBuff, size_t dwLen);
BOOL IsPhone (LPSTR lpszString, size_t dwStringSize);
BOOL IsContactPhone (HANDLE hContact, LPSTR lpszPhone, size_t dwPhoneSize);
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index f1b826767c..5eb10e6832 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -7,13 +7,6 @@ static int MraExtraIconsApplyAll(WPARAM, LPARAM) return 0;
}
-static int MraExtraIconsRebuildAll(WPARAM, LPARAM)
-{
- for (int i=0; i < g_Instances.getCount(); i++)
- g_Instances[i]->MraExtraIconsRebuild(0, 0);
- return 0;
-}
-
CMraProto::CMraProto(const char* _module, const TCHAR* _displayName) :
m_bLoggedIn(false)
{
@@ -58,7 +51,6 @@ CMraProto::CMraProto(const char* _module, const TCHAR* _displayName) : hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
HookEvent(ME_SYSTEM_PRESHUTDOWN, &CMraProto::OnPreShutdown);
- HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, &CMraProto::MraExtraIconsRebuild);
InitContactMenu();
@@ -75,10 +67,9 @@ CMraProto::CMraProto(const char* _module, const TCHAR* _displayName) : HookEvent(ME_CLIST_PREBUILDSTATUSMENU, &CMraProto::MraRebuildStatusMenu);
MraRebuildStatusMenu(0, 0);
- MraExtraIconsRebuild(0, 0);
- hExtraXstatusIcon = ExtraIcon_Register("MRAXstatus", "Mail.ru Xstatus", "MRA_xstatus25", MraExtraIconsRebuildAll, MraExtraIconsApplyAll, NULL, NULL);
- hExtraInfo = ExtraIcon_Register("MRAStatus", "Mail.ru extra info", "MRA_xstatus49", MraExtraIconsRebuildAll, MraExtraIconsApplyAll, NULL, NULL);
+ hExtraXstatusIcon = ExtraIcon_Register("MRAXstatus", "Mail.ru Xstatus", "MRA_xstatus25");
+ hExtraInfo = ExtraIcon_Register("MRAStatus", "Mail.ru extra info", "MRA_xstatus49");
bHideXStatusUI = FALSE;
m_iXStatus = mraGetByte(NULL, DBSETTING_XSTATUSID, MRA_MIR_XSTATUS_NONE);
diff --git a/protocols/MRA/src/MraProto.h b/protocols/MRA/src/MraProto.h index 7c3302119c..ea2c8da7ff 100644 --- a/protocols/MRA/src/MraProto.h +++ b/protocols/MRA/src/MraProto.h @@ -193,7 +193,6 @@ struct CMraProto : public PROTO_INTERFACE, public MZeroedObject int __cdecl MraChatGcEventHook(WPARAM, LPARAM);
int __cdecl MraExtraIconsApply(WPARAM, LPARAM);
- int __cdecl MraExtraIconsRebuild(WPARAM, LPARAM);
int __cdecl MraContactDeleted(WPARAM, LPARAM);
int __cdecl MraDbSettingChanged(WPARAM, LPARAM);
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 7083da1b8d..7ea81b6369 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1153,19 +1153,11 @@ void CMraProto::CListShowMenuItem(HANDLE hMenuItem, BOOL bShow) CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItem, (LPARAM)&mi);
}
-int ExtraSetIcon(HANDLE hExtraIcon, HANDLE hContact, HANDLE hImage, int iColumnType)
+int ExtraSetIcon(HANDLE hExtraIcon, HANDLE hContact, HANDLE hImage)
{
if (hImage == NULL)
hImage = INVALID_HANDLE_VALUE;
-
- if (hExtraIcon)
- return ExtraIcon_SetIcon(hExtraIcon, hContact, hImage);
-
- IconExtraColumn iec;
- iec.cbSize = sizeof(iec);
- iec.ColumnType = iColumnType;
- iec.hImage = hImage;
- return CallService(MS_CLIST_EXTRA_SET_ICON, (WPARAM)hContact, (LPARAM)&iec);
+ return ExtraIcon_SetIcon(hExtraIcon, hContact, hImage);
}
size_t CopyNumber(LPCVOID lpcOutBuff, LPCVOID lpcBuff, size_t dwLen)
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 897f76f1a9..78dc74c032 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -157,8 +157,8 @@ void CMraProto::SetExtraIcons(HANDLE hContact) if (dwBlogStatusMsgSize) dwIconID = ADV_ICON_BLOGSTATUS;
}
- ExtraSetIcon(hExtraXstatusIcon, hContact, (( IsXStatusValid(dwXStatus) || dwXStatus == MRA_MIR_XSTATUS_UNKNOWN)? hXStatusAdvancedStatusItems[dwXStatus]:NULL), EXTRA_ICON_ADV1);
- ExtraSetIcon(hExtraInfo, hContact, ((dwIconID != -1) ? hAdvancedStatusItems[dwIconID]:NULL), EXTRA_ICON_ADV2);
+ ExtraSetIcon(hExtraXstatusIcon, hContact, (( IsXStatusValid(dwXStatus) || dwXStatus == MRA_MIR_XSTATUS_UNKNOWN)? hXStatusAdvancedStatusItems[dwXStatus]:NULL));
+ ExtraSetIcon(hExtraInfo, hContact, ((dwIconID != -1) ? hAdvancedStatusItems[dwIconID]:NULL));
}
INT_PTR CMraProto::MraXStatusMenu(WPARAM wParam, LPARAM lParam, LPARAM param)
@@ -649,17 +649,6 @@ int CMraProto::MraExtraIconsApply(WPARAM wParam, LPARAM lParam) return 0;
}
-int CMraProto::MraExtraIconsRebuild(WPARAM wParam, LPARAM lParam)
-{
- for (size_t i = 0; i < ADV_ICON_MAX; i++)
- hAdvancedStatusItems[i] = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)IconLibGetIcon(gdiExtraStatusIconsItems[i].hIconHandle), 0);
-
- for (size_t i = 0; i < MRA_XSTATUS_COUNT+1; i++)
- hXStatusAdvancedStatusItems[i] = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)IconLibGetIcon(hXStatusAdvancedStatusIcons[i]), 0);
-
- return 0;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
int CMraProto::MraRebuildStatusMenu(WPARAM wParam, LPARAM lParam)
|