From 6d2b667a94048d33eec8074baeddbebbbeccb222 Mon Sep 17 00:00:00 2001 From: Joachim Henze Date: Sun, 7 Jul 2024 13:09:23 +0200 Subject: [PATCH] [REGEDIT] Strip unneeded WM_TIMER, formatting (#7040) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Strip unneeded WM_TIMER and a tab-character before toggle_child Just clean up and and addendum to 0.4.15-dev-7915-g d383b20b01e3528f829068165a2dd0965f869681 where the WM_TIMER has also been stripped from childwnd.c Co-authored-by: Hermès BÉLUSCA - MAÏTO Co-authored-by: Katayama Hirofumi MZ --- base/applications/regedit/framewnd.c | 43 +++++++++------------------- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/base/applications/regedit/framewnd.c b/base/applications/regedit/framewnd.c index aace7023dc2..38773996c7a 100644 --- a/base/applications/regedit/framewnd.c +++ b/base/applications/regedit/framewnd.c @@ -1146,12 +1146,8 @@ FreeObjectPicker(IN IDsObjectPicker *pDsObjectPicker) pDsObjectPicker->lpVtbl->Release(pDsObjectPicker); } -/******************************************************************************* - * - * FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG) - * - * PURPOSE: Processes WM_COMMAND messages for the main frame window. - * +/** + * PURPOSE: Processes WM_COMMAND messages for the main frame window. */ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { @@ -1368,26 +1364,24 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) RegKeyEditPermissions(hWnd, hKeyRoot, NULL, keyPath); break; case ID_REGISTRY_PRINTERSETUP: - /*PRINTDLG pd;*/ - /*PrintDlg(&pd);*/ - /*PAGESETUPDLG psd;*/ - /*PageSetupDlg(&psd);*/ + //PRINTDLG pd; + //PrintDlg(&pd); + //PAGESETUPDLG psd; + //PageSetupDlg(&psd); break; case ID_REGISTRY_OPENLOCAL: break; - case ID_VIEW_REFRESH: RefreshTreeView(g_pChildWnd->hTreeWnd); keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPath, TRUE); break; - /*case ID_OPTIONS_TOOLBAR:*/ - /* toggle_child(hWnd, LOWORD(wParam), hToolBar);*/ - /* break;*/ + //case ID_OPTIONS_TOOLBAR: + // toggle_child(hWnd, LOWORD(wParam), hToolBar); + // break; case ID_EDIT_NEW_KEY: CreateNewKey(g_pChildWnd->hTreeWnd, TreeView_GetSelection(g_pChildWnd->hTreeWnd)); break; - case ID_TREE_EXPANDBRANCH: TreeView_Expand(g_pChildWnd->hTreeWnd, TreeView_GetSelection(g_pChildWnd->hTreeWnd), TVE_EXPAND); break; @@ -1401,9 +1395,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) case ID_TREE_DELETE: keyPath = GetItemPath(g_pChildWnd->hTreeWnd, TreeView_GetSelection(g_pChildWnd->hTreeWnd), &hKeyRoot); if (keyPath == 0 || *keyPath == 0) - { MessageBeep(MB_ICONHAND); - } else if (DeleteKey(hWnd, hKeyRoot, keyPath)) DeleteNode(g_pChildWnd->hTreeWnd, 0); break; @@ -1423,12 +1415,10 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) SetFocus(hwndItem); } break; - case ID_ADDRESS_FOCUS: SendMessageW(g_pChildWnd->hAddressBarWnd, EM_SETSEL, 0, -1); SetFocus(g_pChildWnd->hAddressBarWnd); break; - default: if ((LOWORD(wParam) >= ID_FAVORITES_MIN) && (LOWORD(wParam) <= ID_FAVORITES_MAX)) { @@ -1474,17 +1464,12 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) return result; } -/******************************************************************************** - * - * FUNCTION: FrameWndProc(HWND, unsigned, WORD, LONG) - * - * PURPOSE: Processes messages for the main frame window. - * - * WM_COMMAND - process the application menu - * WM_DESTROY - post a quit message and return +/** + * PURPOSE: Processes messages for the main frame window * + * WM_COMMAND - process the application menu + * WM_DESTROY - post a quit message and return */ - LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { RECT rc; @@ -1509,8 +1494,6 @@ LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa case WM_SIZE: resize_frame_client(hWnd); break; - case WM_TIMER: - break; case WM_INITMENU: OnInitMenu(hWnd); break;