From 3d3a8bb209b190732f8530f3dc5b2baa46d3078e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 19 Mar 2014 18:42:19 +0000 Subject: fix against recursions in clists git-svn-id: http://svn.miranda-ng.org/main/trunk@8664 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_mw/src/clistopts.cpp | 2 +- plugins/Clist_mw/src/clistsettings.cpp | 2 +- plugins/Clist_mw/src/clui.cpp | 21 +++++++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) (limited to 'plugins/Clist_mw') diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp index 256536acc6..490e184230 100644 --- a/plugins/Clist_mw/src/clistopts.cpp +++ b/plugins/Clist_mw/src/clistopts.cpp @@ -226,7 +226,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP } pcli->pfnTrayIconIconsChanged(); LoadContactTree(); /* this won't do job properly since it only really works when changes happen */ - SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD,0,0); /* force reshuffle */ + pcli->pfnInitAutoRebuild(pcli->hwndContactTree); /* force reshuffle */ return TRUE; } break; diff --git a/plugins/Clist_mw/src/clistsettings.cpp b/plugins/Clist_mw/src/clistsettings.cpp index 0bf9e3711a..0fab2e10bd 100644 --- a/plugins/Clist_mw/src/clistsettings.cpp +++ b/plugins/Clist_mw/src/clistsettings.cpp @@ -295,7 +295,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) } } else if ( !strcmp(cws->szModule,"MetaContacts")) { - PostMessage(pcli->hwndContactTree,CLM_AUTOREBUILD,0,0); + pcli->pfnInitAutoRebuild(pcli->hwndContactTree); return 0; } else return 0; diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp index ca39b38253..139ebc1d49 100644 --- a/plugins/Clist_mw/src/clui.cpp +++ b/plugins/Clist_mw/src/clui.cpp @@ -555,20 +555,21 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l break; case WM_DRAWITEM: - { - LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam; - if ( dis->hwndItem == pcli->hwndStatus ) { - DrawDataForStatusBar(dis); - return 0; + { + LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam; + if (dis->hwndItem == pcli->hwndStatus) { + DrawDataForStatusBar(dis); + return 0; + } + if (dis->CtlType != ODT_MENU) + return 0; } - if ( dis->CtlType != ODT_MENU ) - return 0; break; - } + case WM_KEYDOWN: - CallService(MS_CLIST_MENUPROCESSHOTKEY,wParam,MPCF_MAINMENU|MPCF_CONTACTMENU); + CallService(MS_CLIST_MENUPROCESSHOTKEY, wParam, MPCF_MAINMENU | MPCF_CONTACTMENU); if (wParam == VK_F5) - SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD,0,0); + pcli->pfnInitAutoRebuild(pcli->hwndContactTree); return TRUE; case WM_GETMINMAXINFO: -- cgit v1.2.3