Hugh McMaster : regedit: Use UpdateStatusBar() instead of updating the text manually.

Alexandre Julliard julliard at winehq.org
Thu Jul 13 14:41:34 CDT 2017


Module: wine
Branch: master
Commit: 5a391e18cbc966999da522ff26058a9cd292b74d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5a391e18cbc966999da522ff26058a9cd292b74d

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Thu Jul 13 13:22:01 2017 +0000

regedit: Use UpdateStatusBar() instead of updating the text manually.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/regedit/childwnd.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c
index 2a9a14b..1797b52 100644
--- a/programs/regedit/childwnd.c
+++ b/programs/regedit/childwnd.c
@@ -158,17 +158,6 @@ LPWSTR GetItemFullPath(HWND hwndTV, HTREEITEM hItem, BOOL bFull) {
     return ret;
 }
 
-static LPWSTR GetPathFullPath(HWND hwndTV, LPWSTR path) {
-    LPWSTR parts[2];
-    LPWSTR ret;
-
-    parts[0] = GetPathRoot(hwndTV, 0, TRUE);
-    parts[1] = path;
-    ret = CombinePaths((LPCWSTR*)parts, 2);
-    HeapFree(GetProcessHeap(), 0, parts[0]);
-    return ret;
-}
-
 static void OnTreeSelectionChanged(HWND hwndTV, HWND hwndLV, HTREEITEM hItem, BOOL bRefreshLV)
 {
     if (bRefreshLV) {
@@ -325,7 +314,6 @@ static int treeview_notify(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam
             if (res)
             {
                 TVITEMW item;
-                WCHAR *fullPath;
 
                 item.mask = TVIF_HANDLE | TVIF_TEXT;
                 item.hItem = dispInfo->item.hItem;
@@ -334,11 +322,9 @@ static int treeview_notify(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam
 
                 path = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hRootKey);
                 update_listview_path(path);
-
-                fullPath = GetPathFullPath(g_pChildWnd->hTreeWnd, path);
-                SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)fullPath);
-                HeapFree(GetProcessHeap(), 0, fullPath);
                 HeapFree(GetProcessHeap(), 0, path);
+
+                UpdateStatusBar();
             }
 
             SetWindowLongPtrW(g_pChildWnd->hTreeWnd, GWLP_USERDATA, 0);




More information about the wine-cvs mailing list