diff options
Diffstat (limited to 'protocols/AimOscar')
-rw-r--r-- | protocols/AimOscar/src/proto.cpp | 50 | ||||
-rw-r--r-- | protocols/AimOscar/src/theme.cpp | 11 |
2 files changed, 25 insertions, 36 deletions
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index 4b770d1fdf..45ca9a9694 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -869,45 +869,39 @@ int __cdecl CAimProto::UserIsTyping(HANDLE hContact, int type) int __cdecl CAimProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam)
{
- switch (eventType)
- {
- case EV_PROTO_ONLOAD:
- return OnModulesLoaded(0, 0);
-
-// case EV_PROTO_ONEXIT:
-// return OnPreShutdown(0, 0);
+ switch (eventType) {
+ case EV_PROTO_ONLOAD:
+ return OnModulesLoaded(0, 0);
- case EV_PROTO_ONMENU:
- InitMainMenus();
- break;
+ case EV_PROTO_ONMENU:
+ InitMainMenus();
+ break;
- case EV_PROTO_ONOPTIONS:
- return OnOptionsInit(wParam, lParam);
+ case EV_PROTO_ONOPTIONS:
+ return OnOptionsInit(wParam, lParam);
- case EV_PROTO_ONERASE:
+ case EV_PROTO_ONERASE:
{
char szDbsettings[64];
mir_snprintf(szDbsettings, sizeof(szDbsettings), "%sP2P", m_szModuleName);
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbsettings);
- break;
}
+ break;
- case EV_PROTO_ONRENAME:
- if (hMenuRoot)
- {
- CLISTMENUITEM clmi = { 0 };
- clmi.cbSize = sizeof(CLISTMENUITEM);
- clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- clmi.ptszName = m_tszUserName;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuRoot, (LPARAM)&clmi);
- }
- break;
+ case EV_PROTO_ONRENAME:
+ if (hMenuRoot) {
+ CLISTMENUITEM clmi = { sizeof(clmi) };
+ clmi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ clmi.ptszName = m_tszUserName;
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuRoot, (LPARAM)&clmi);
+ }
+ break;
- case EV_PROTO_ONCONTACTDELETED:
- return OnContactDeleted(wParam, lParam);
+ case EV_PROTO_ONCONTACTDELETED:
+ return OnContactDeleted(wParam, lParam);
- case EV_PROTO_DBSETTINGSCHANGED:
- return OnDbSettingChanged(wParam, lParam);
+ case EV_PROTO_DBSETTINGSCHANGED:
+ return OnDbSettingChanged(wParam, lParam);
}
return 1;
}
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index e31cc5d664..c496c2482e 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -259,11 +259,8 @@ int CAimProto::OnPreBuildContactMenu(WPARAM wParam,LPARAM /*lParam*/) HANDLE hContact = (HANDLE)wParam;
bool isChatRoom = getByte(hContact, "ChatRoom", 0) != 0;
- CLISTMENUITEM mi;
- ZeroMemory(&mi,sizeof(mi));
- mi.cbSize = sizeof(mi);
-
//see if we should add the html away message context menu items
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE;
if (getWord(hContact, AIM_KEY_ST, ID_STATUS_OFFLINE) != ID_STATUS_AWAY || isChatRoom)
mi.flags |= CMIF_HIDDEN;
@@ -315,8 +312,7 @@ void CAimProto::InitMainMenus(void) //Do not put any services below HTML get away message!!!
char service_name[200];
- CLISTMENUITEM mi = {0};
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
if (hRoot == NULL) {
@@ -364,8 +360,7 @@ void CAimProto::InitContactMenus(void) //Do not put any services below HTML get away message!!!
char service_name[200];
- CLISTMENUITEM mi = {0};
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.pszService = service_name;
mi.pszContactOwner = m_szModuleName;
|