summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
commit30707c980d1560b358dbf2671a4d2a26a1e8173c (patch)
tree74aee5adaaac976e1398274ca64c5461a60f1feb /protocols/AimOscar/src/proto.cpp
parent335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (diff)
various menu initialization quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar/src/proto.cpp')
-rw-r--r--protocols/AimOscar/src/proto.cpp50
1 files changed, 22 insertions, 28 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;
}