From 520fca8c13037c9077e7d372c0d20a2364964ffb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 13 Jul 2018 17:32:08 +0300 Subject: Contacts lists: - duplicate IDR_CLISTMENU resources removed, the only copy remains in mir_app.dll; - local variable g_hMenuMain removed from Clist_Modern and replaced with g_clistApi.hMenuMain; - duplicate code removed from Clist_Modern (CLUI::CreateCluiFrames()) - fixes #1465 (StdClist: "Status" menu cannot change language on the fly); - fixes #1467 (Clist_blind: menu cannot change language on the fly); - fixes menu-related part in #1471 --- plugins/Clist_blind/res/resource.rc | 27 --------------------------- plugins/Clist_blind/src/cluiopts.cpp | 2 ++ plugins/Clist_blind/src/resource.h | 1 - 3 files changed, 2 insertions(+), 28 deletions(-) (limited to 'plugins/Clist_blind') diff --git a/plugins/Clist_blind/res/resource.rc b/plugins/Clist_blind/res/resource.rc index 41b18e0705..5e139eeb32 100644 --- a/plugins/Clist_blind/res/resource.rc +++ b/plugins/Clist_blind/res/resource.rc @@ -311,33 +311,6 @@ IDC_HYPERLINKHAND CURSOR "..\\..\\..\\src\\mir_app\\res\\ IDC_DROP CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_drag_copy.cur" IDC_DROPUSER CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_drop_user.cur" -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_CLISTMENU MENU -BEGIN - POPUP "&Main menu" - BEGIN - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_ICQ_EXIT - END - POPUP "&Status" - BEGIN - MENUITEM "&Offline\tCtrl+0", ID_STATUS_OFFLINE, CHECKED - MENUITEM "On&line\tCtrl+1", ID_STATUS_ONLINE - MENUITEM "&Away\tCtrl+2", ID_STATUS_AWAY - MENUITEM "&Not available\tCtrl+3", ID_STATUS_NA - MENUITEM "Occ&upied\tCtrl+4", ID_STATUS_OCCUPIED - MENUITEM "&Do not disturb\tCtrl+5", ID_STATUS_DND - MENUITEM "&Free for chat\tCtrl+6", ID_STATUS_FREECHAT - MENUITEM "&Invisible\tCtrl+7", ID_STATUS_INVISIBLE - MENUITEM "On the &phone\tCtrl+8", ID_STATUS_ONTHEPHONE - MENUITEM "Out to &lunch\tCtrl+9", ID_STATUS_OUTTOLUNCH - END -END - #endif // Русский (Россия) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/plugins/Clist_blind/src/cluiopts.cpp b/plugins/Clist_blind/src/cluiopts.cpp index 1acb1998b0..a7ede404d9 100644 --- a/plugins/Clist_blind/src/cluiopts.cpp +++ b/plugins/Clist_blind/src/cluiopts.cpp @@ -201,10 +201,12 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L else SetWindowLongPtr(g_clistApi.hwndContactList, GWL_STYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX)); + if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU)) SetMenu(g_clistApi.hwndContactList, nullptr); else SetMenu(g_clistApi.hwndContactList, g_clistApi.hMenuMain); + SetWindowPos(g_clistApi.hwndContactList, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); RedrawWindow(g_clistApi.hwndContactList, nullptr, nullptr, RDW_FRAME | RDW_INVALIDATE); if (IsIconic(g_clistApi.hwndContactList) && BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_TOOLWND)) diff --git a/plugins/Clist_blind/src/resource.h b/plugins/Clist_blind/src/resource.h index 5f07d6caf0..c5f4824b5d 100644 --- a/plugins/Clist_blind/src/resource.h +++ b/plugins/Clist_blind/src/resource.h @@ -5,7 +5,6 @@ #define IDD_OPT_CLIST 126 #define IDC_DROP 183 #define IDD_OPT_HOTKEY 184 -#define IDR_CLISTMENU 199 #define IDC_HYPERLINKHAND 214 #define IDC_DROPUSER 215 #define IDD_OPT_CLUI 218 -- cgit v1.2.3