diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-05 16:54:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-05 16:54:27 +0000 |
commit | b665a90f50f09435aef5bc3b5b9da710e4558690 (patch) | |
tree | 3053606dcddc1b15f73e7af1fb2507afbf20f052 /protocols/AimOscar/src/theme.cpp | |
parent | 6c01981a8452577f3751298c7cdbe59b3ae81d51 (diff) |
various menu items quirks, simplifications & optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@4319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar/src/theme.cpp')
-rw-r--r-- | protocols/AimOscar/src/theme.cpp | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index 2aeb05fed5..f20de16ff5 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -85,8 +85,8 @@ void ReleaseIconEx(const char* name, bool big) void WindowSetIcon(HWND hWnd, const char* name)
{
- SendMessage(hWnd, WM_SETICON, ICON_BIG, ( LPARAM )LoadIconEx( name, true ));
- SendMessage(hWnd, WM_SETICON, ICON_SMALL, ( LPARAM )LoadIconEx( name ));
+ SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIconEx( name, true ));
+ SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIconEx( name ));
}
void WindowFreeIcon(HWND hWnd)
@@ -224,24 +224,14 @@ int CAimProto::OnPreBuildContactMenu(WPARAM wParam,LPARAM /*lParam*/) bool isChatRoom = getByte(hContact, "ChatRoom", 0) != 0;
//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;
-
- CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)hHTMLAwayContextMenuItem,(LPARAM)&mi);
-
- mi.flags = CMIM_FLAGS | CMIF_NOTONLINE;
- if (getBuddyId(hContact, 1) || state == 0 || isChatRoom)
- mi.flags |= CMIF_HIDDEN;
- CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)hAddToServerListContextMenuItem,(LPARAM)&mi);
+ Menu_ShowItem(hHTMLAwayContextMenuItem, getWord(hContact, AIM_KEY_ST, ID_STATUS_OFFLINE) == ID_STATUS_AWAY && !isChatRoom);
+ Menu_ShowItem(hAddToServerListContextMenuItem, !getBuddyId(hContact, 1) && state != 0 && !isChatRoom);
DBVARIANT dbv;
- if (!getString(hContact, AIM_KEY_SN, &dbv))
- {
+ if (!getString(hContact, AIM_KEY_SN, &dbv)) {
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_NAME | CMIM_FLAGS;
- switch(pd_mode)
- {
+ switch(pd_mode) {
case 1:
mi.pszName = LPGEN("&Block");
break;
@@ -264,7 +254,7 @@ int CAimProto::OnPreBuildContactMenu(WPARAM wParam,LPARAM /*lParam*/) break;
}
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hBlockContextMenuItem, (LPARAM)&mi);
+ Menu_ModifyItem(hBlockContextMenuItem, &mi);
DBFreeVariant(&dbv);
}
|