diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/AimOscar/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/avatars.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.h | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/theme.cpp | 6 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/commandmonitor.cpp | 12 | ||||
-rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/options.cpp | 2 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_xstatus.cpp | 4 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/init.cpp | 12 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber.h | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_iqid.cpp | 4 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_svc.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_thread.cpp | 4 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen.cpp | 4 | ||||
-rw-r--r-- | protocols/Yahoo/src/proto.cpp | 2 |
18 files changed, 28 insertions, 42 deletions
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index 629bd50c3a..2d5758a93b 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -861,7 +861,7 @@ int __cdecl CAimProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l CLISTMENUITEM clmi = { sizeof(clmi) };
clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
clmi.ptszName = m_tszUserName;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuRoot, (LPARAM)&clmi);
+ Menu_ModifyItem(hMenuRoot, &clmi);
}
break;
diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp index e73c034968..ae0f2f40b3 100644 --- a/protocols/FacebookRM/src/avatars.cpp +++ b/protocols/FacebookRM/src/avatars.cpp @@ -57,7 +57,7 @@ void FacebookProto::CheckAvatarChange(HANDLE hContact, std::string image_url) if (image_url.empty())
return;
- bool big_avatars = (bool)db_get_b(NULL, m_szModuleName, FACEBOOK_KEY_BIG_AVATARS, DEFAULT_BIG_AVATARS);
+ bool big_avatars = db_get_b(NULL, m_szModuleName, FACEBOOK_KEY_BIG_AVATARS, DEFAULT_BIG_AVATARS) != 0;
// We've got url to avatar of default size 32x32px, let's change it to slightly bigger (50x50px) - looks like maximum size for square format
std::tstring::size_type pos = image_url.rfind( "/s32x32/" );
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h index 41bf2e513e..0637b90f5e 100644 --- a/protocols/FacebookRM/src/proto.h +++ b/protocols/FacebookRM/src/proto.h @@ -186,9 +186,7 @@ public: void parseSmileys(std::string message, HANDLE hContact);
// Handles, Locks
- HGENMENU m_hMenuRoot;
- HGENMENU m_hMenuServicesRoot;
- HANDLE m_hStatusMind;
+ HGENMENU m_hMenuRoot, m_hMenuServicesRoot, m_hStatusMind;
HANDLE signon_lock_;
HANDLE avatar_lock_;
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index f2b14ce3bf..e7dff88aba 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -247,7 +247,7 @@ void FacebookProto::ToggleStatusMenuItems( BOOL bEnable ) CLISTMENUITEM clmi = {sizeof(clmi)};
clmi.flags = CMIM_FLAGS | (( bEnable ) ? 0 : CMIF_GRAYED);
- CallService( MS_CLIST_MODIFYMENUITEM, (WPARAM)m_hMenuRoot, ( LPARAM )&clmi );
- CallService( MS_CLIST_MODIFYMENUITEM, (WPARAM)m_hStatusMind, ( LPARAM )&clmi );
- CallService( MS_CLIST_MODIFYMENUITEM, (WPARAM)m_hMenuServicesRoot, ( LPARAM )&clmi );
+ Menu_ModifyItem(m_hMenuRoot, &clmi );
+ Menu_ModifyItem(m_hStatusMind, &clmi );
+ Menu_ModifyItem(m_hMenuServicesRoot, &clmi );
}
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 133c38469f..f52f97b76c 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -838,7 +838,7 @@ int GGPROTO::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.ptszName = m_tszUserName;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuRoot, (LPARAM)&mi);
+ Menu_ModifyItem(hMenuRoot, &mi);
}
break;
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 752e764ccf..a38c11fe2a 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -2332,9 +2332,9 @@ void CIrcProto::OnIrcDisconnected() CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | CMIF_GRAYED;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuJoin, (LPARAM)&mi);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuList, (LPARAM)&mi);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuNick, (LPARAM)&mi);
+ Menu_ModifyItem(hMenuJoin, &mi);
+ Menu_ModifyItem(hMenuList, &mi);
+ Menu_ModifyItem(hMenuNick, &mi);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -2362,9 +2362,9 @@ bool CIrcProto::DoOnConnect( const CIrcMessage* ) CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuJoin, (LPARAM)&mi);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuList, (LPARAM)&mi);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuNick, (LPARAM)&mi);
+ Menu_ModifyItem(hMenuJoin, &mi);
+ Menu_ModifyItem(hMenuList, &mi);
+ Menu_ModifyItem(hMenuNick, &mi);
int Temp = m_iStatus;
m_iStatus = ID_STATUS_ONLINE;
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 55566a75c0..7c25fbc036 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -1035,7 +1035,7 @@ int __cdecl CIrcProto::OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.ptszName = m_tszUserName;
- CallService( MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuRoot, ( LPARAM )&mi );
+ Menu_ModifyItem(hMenuRoot, &mi);
}
break;
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index a0103154d7..8a0b478598 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -765,7 +765,7 @@ void CConnectPrefsDlg::OnApply() mi.flags = CMIM_FLAGS;
if ( !m_proto->m_useServer )
mi.flags |= CMIF_GRAYED;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)m_proto->hMenuServer, (LPARAM)&mi);
+ Menu_ModifyItem(m_proto->hMenuServer, &mi);
m_proto->m_joinOnInvite = m_autoJoin.GetState();
m_proto->m_hideServerWindow = !m_showServer.GetState();
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index dc1efbdacf..b8b7a2d056 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -781,11 +781,11 @@ void CIcqProto::setXStatusEx(BYTE bXStatus, BYTE bQuiet) CLISTMENUITEM mi = { sizeof(mi) };
if (bOldXStatus <= XSTATUS_COUNT) {
mi.flags = CMIM_FLAGS;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hXStatusItems[bOldXStatus], (LPARAM)&mi);
+ Menu_ModifyItem(hXStatusItems[bOldXStatus], &mi);
}
mi.flags = CMIM_FLAGS | CMIF_CHECKED;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hXStatusItems[bXStatus], (LPARAM)&mi);
+ Menu_ModifyItem(hXStatusItems[bXStatus], &mi);
}
if (bXStatus) {
diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp index 0cf65d5eb7..b7ca1ce204 100644 --- a/protocols/IcqOscarJ/src/init.cpp +++ b/protocols/IcqOscarJ/src/init.cpp @@ -144,18 +144,6 @@ extern "C" int __declspec(dllexport) Unload(void) return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// OnPrebuildContactMenu event
-
-static void CListSetMenuItemIcon(HANDLE hMenuItem, HICON hIcon)
-{
- CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIM_FLAGS | CMIM_ICON;
- mi.hIcon = hIcon;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItem, (LPARAM)&mi);
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// UpdateGlobalSettings event
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 5d07eab6cc..9cdc9a4758 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1294,7 +1294,7 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = (CMIM_NAME|CMIF_UNICODE);
mi.ptszName = szBuff;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)dat->ppro->hXStatusMenuItems[dat->dwXStatus], (LPARAM)&mi);
+ Menu_ModifyItem(dat->ppro->hXStatusMenuItems[dat->dwXStatus], &mi);
dat->ppro->MraSetXStatusInternal(dat->dwXStatus);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 04a079bfd3..bdf55a975f 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -1189,7 +1189,7 @@ int __cdecl CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l CLISTMENUITEM clmi = { sizeof(clmi) };
clmi.flags = CMIM_NAME | CMIF_TCHAR;
clmi.ptszName = m_tszUserName;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)mainMenuRoot, (LPARAM)&clmi);
+ Menu_ModifyItem(mainMenuRoot, &clmi);
}
break;
diff --git a/protocols/Tlen/src/jabber.h b/protocols/Tlen/src/jabber.h index 2b3899cc3a..28459d781a 100644 --- a/protocols/Tlen/src/jabber.h +++ b/protocols/Tlen/src/jabber.h @@ -314,7 +314,7 @@ struct TlenProtocol : public PROTO_INTERFACE CRITICAL_SECTION modeMsgMutex;
- HANDLE hMenuRoot;
+ HGENMENU hMenuRoot;
char *searchJID;
int searchID;
diff --git a/protocols/Tlen/src/jabber_iqid.cpp b/protocols/Tlen/src/jabber_iqid.cpp index ef5a6844dc..a94630b628 100644 --- a/protocols/Tlen/src/jabber_iqid.cpp +++ b/protocols/Tlen/src/jabber_iqid.cpp @@ -243,9 +243,9 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) proto->hMenuMUC, (LPARAM) &mi);
+ Menu_ModifyItem(proto->hMenuMUC, &mi);
if (proto->hMenuChats != NULL)
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) proto->hMenuChats, (LPARAM)&mi);
+ Menu_ModifyItem(proto->hMenuChats, &mi);
}
proto->isOnline = TRUE;
diff --git a/protocols/Tlen/src/jabber_svc.cpp b/protocols/Tlen/src/jabber_svc.cpp index db39892f83..8a505ac471 100644 --- a/protocols/Tlen/src/jabber_svc.cpp +++ b/protocols/Tlen/src/jabber_svc.cpp @@ -1191,7 +1191,7 @@ int __cdecl TlenProtocol::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPAR CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_NAME | CMIF_TCHAR;
mi.ptszName = m_tszUserName;
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )hMenuRoot, ( LPARAM )&mi );
+ Menu_ModifyItem(hMenuRoot, &mi);
/* FIXME: Rename network user as well */
}
}
diff --git a/protocols/Tlen/src/jabber_thread.cpp b/protocols/Tlen/src/jabber_thread.cpp index 31fb47a10f..ce4a95f539 100644 --- a/protocols/Tlen/src/jabber_thread.cpp +++ b/protocols/Tlen/src/jabber_thread.cpp @@ -353,9 +353,9 @@ void __cdecl JabberServerThread(ThreadData *info) CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | CMIF_GRAYED;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) info->proto->hMenuMUC, (LPARAM) &mi);
+ Menu_ModifyItem(info->proto->hMenuMUC, &mi);
if (info->proto->hMenuChats != NULL)
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) info->proto->hMenuChats, (LPARAM) &mi);
+ Menu_ModifyItem(info->proto->hMenuChats, &mi);
// Set status to offline
oldStatus = info->proto->m_iStatus;
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index 495a89a0ee..de5c844120 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -321,7 +321,7 @@ static void initMenuItems(TlenProtocol *proto) mi.icolibItem = GetIconHandle(IDI_CHATS);
mi.pszService = text;
proto->hMenuChats = Menu_AddMainMenuItem(&mi);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) proto->hMenuChats, (LPARAM) &clmi);
+ Menu_ModifyItem(proto->hMenuChats, &clmi);
}
// "Multi-User Conference"
@@ -332,7 +332,7 @@ static void initMenuItems(TlenProtocol *proto) mi.icolibItem = GetIconHandle(IDI_MUC);
mi.pszService = text;
proto->hMenuMUC = Menu_AddMainMenuItem(&mi);
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) proto->hMenuMUC, (LPARAM) &clmi);
+ Menu_ModifyItem(proto->hMenuMUC, &clmi);
sprintf(text, "%s/MainMenuInbox", proto->m_szModuleName);
CreateServiceFunction_Ex(text, proto, TlenMenuHandleInbox);
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index e24666ef02..fcd5827ffd 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -728,7 +728,7 @@ int __cdecl CYahooProto::OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARA CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.ptszName = m_tszUserName;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)mainMenuRoot, (LPARAM)&mi );
+ Menu_ModifyItem(mainMenuRoot, &mi);
}
break;
|