diff options
author | George Hazan <george.hazan@gmail.com> | 2012-10-30 21:38:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-10-30 21:38:58 +0000 |
commit | a051d0d66f3d5d0dec2040d42cdd70be4b610f7d (patch) | |
tree | 05a64f3fd36d4f8f3ea91fd0786e0c571c78e394 | |
parent | 2f609504cf3cdbbdfee8946001252f46995edbea (diff) |
fix for the clist's database hook
git-svn-id: http://svn.miranda-ng.org/main/trunk@2122 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | src/modules/clist/clc.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp index 71461f83e9..e3bb5c01ef 100644 --- a/src/modules/clist/clc.cpp +++ b/src/modules/clist/clc.cpp @@ -54,13 +54,13 @@ void fnClcOptionsChanged(void) HMENU fnBuildGroupPopupMenu(ClcGroup* group)
{
- HMENU hMenu = LoadMenu(cli.hInst, MAKEINTRESOURCE(IDR_CONTEXT));
- HMENU hGroupMenu = GetSubMenu(hMenu, 2);
- RemoveMenu(hMenu, 2, MF_BYPOSITION);
- DestroyMenu(hMenu);
- TranslateMenu(hGroupMenu);
+ HMENU hMenu = LoadMenu(cli.hInst, MAKEINTRESOURCE(IDR_CONTEXT));
+ HMENU hGroupMenu = GetSubMenu(hMenu, 2);
+ RemoveMenu(hMenu, 2, MF_BYPOSITION);
+ DestroyMenu(hMenu);
+ TranslateMenu(hGroupMenu);
- CheckMenuItem(hGroupMenu, POPUP_GROUPHIDEOFFLINE, group->hideOffline ? MF_CHECKED : MF_UNCHECKED);
+ CheckMenuItem(hGroupMenu, POPUP_GROUPHIDEOFFLINE, group->hideOffline ? MF_CHECKED : MF_UNCHECKED);
return hGroupMenu;
}
@@ -69,10 +69,13 @@ HMENU fnBuildGroupPopupMenu(ClcGroup* group) static int ClcSettingChanged(WPARAM wParam, LPARAM lParam)
{
- if ((HANDLE)wParam == NULL)
+ DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
+ if ((HANDLE)wParam == NULL) {
+ if ( !strcmp(cws->szModule, "CListGroups"))
+ cli.pfnClcBroadcast(INTM_GROUPSCHANGED, wParam, lParam);
return 0;
+ }
- DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
if ( !strcmp(cws->szModule, "CList")) {
if ( !strcmp(cws->szSetting, "MyHandle")) {
cli.pfnInvalidateDisplayNameCacheEntry((HANDLE) wParam);
@@ -89,9 +92,6 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) else if ( !strcmp(cws->szSetting, "NameOrder"))
cli.pfnClcBroadcast(INTM_NAMEORDERCHANGED, 0, 0);
}
- else if ( !strcmp(cws->szModule, "CListGroups")) {
- cli.pfnClcBroadcast(INTM_GROUPSCHANGED, wParam, lParam);
- }
else {
char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
if (szProto != NULL) {
@@ -1279,10 +1279,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, hMenu = cli.pfnBuildGroupPopupMenu(contact->group);
ClientToScreen(hwnd, &pt);
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, hwnd, NULL);
- DestroyMenu(hMenu);
+ DestroyMenu(hMenu);
return 0;
}
- else if (contact->type == CLCIT_CONTACT)
+ if (contact->type == CLCIT_CONTACT)
hMenu = (HMENU) CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM) contact->hContact, 0);
}
else {
|