Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7d0f2dec
Commit
7d0f2dec
authored
Jul 12, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
Jul 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Update the listview path when renaming a treeview node.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
182b6fb5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
childwnd.c
programs/regedit/childwnd.c
+1
-0
listview.c
programs/regedit/listview.c
+13
-6
main.h
programs/regedit/main.h
+1
-0
No files found.
programs/regedit/childwnd.c
View file @
7d0f2dec
...
...
@@ -466,6 +466,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
fullPath
=
GetPathFullPath
(
g_pChildWnd
->
hTreeWnd
,
path
);
SendMessageW
(
hStatusBar
,
SB_SETTEXTW
,
0
,
(
LPARAM
)
fullPath
);
HeapFree
(
GetProcessHeap
(),
0
,
fullPath
);
update_listview_path
(
path
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
}
SetWindowLongPtrW
(
g_pChildWnd
->
hTreeWnd
,
GWLP_USERDATA
,
0
);
...
...
programs/regedit/listview.c
View file @
7d0f2dec
...
...
@@ -91,6 +91,17 @@ LPCWSTR GetValueName(HWND hwndLV)
return
g_valueName
;
}
BOOL
update_listview_path
(
const
WCHAR
*
path
)
{
HeapFree
(
GetProcessHeap
(),
0
,
g_currentPath
);
g_currentPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
g_currentPath
)
return
FALSE
;
lstrcpyW
(
g_currentPath
,
path
);
return
TRUE
;
}
/* convert '\0' separated string list into ',' separated string list */
static
void
MakeMULTISZDisplayable
(
LPWSTR
multi
)
{
...
...
@@ -557,12 +568,8 @@ BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR highli
SendMessageW
(
hwndLV
,
LVM_SORTITEMS
,
(
WPARAM
)
hwndLV
,
(
LPARAM
)
CompareFunc
);
g_currentRootKey
=
hKeyRoot
;
if
(
keyPath
!=
g_currentPath
)
{
HeapFree
(
GetProcessHeap
(),
0
,
g_currentPath
);
g_currentPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
keyPath
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
g_currentPath
)
goto
done
;
lstrcpyW
(
g_currentPath
,
keyPath
);
}
if
(
keyPath
!=
g_currentPath
&&
!
update_listview_path
(
keyPath
))
goto
done
;
result
=
TRUE
;
...
...
programs/regedit/main.h
View file @
7d0f2dec
...
...
@@ -117,6 +117,7 @@ extern void SetupStatusBar(HWND hWnd, BOOL bResize);
extern
void
UpdateStatusBar
(
void
);
/* listview.c */
extern
BOOL
update_listview_path
(
const
WCHAR
*
path
);
extern
void
format_value_data
(
HWND
hwndLV
,
int
index
,
DWORD
type
,
void
*
data
,
DWORD
size
);
extern
int
AddEntryToList
(
HWND
hwndLV
,
WCHAR
*
Name
,
DWORD
dwValType
,
void
*
ValBuf
,
DWORD
dwCount
,
int
pos
);
extern
HWND
CreateListView
(
HWND
hwndParent
,
UINT
id
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment