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
8daf5ad2
Commit
8daf5ad2
authored
Jun 28, 2006
by
Juan Lang
Committed by
Alexandre Julliard
Jun 29, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Update status bar after editing key name.
parent
4fbe97e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
7 deletions
+29
-7
childwnd.c
programs/regedit/childwnd.c
+29
-7
No files found.
programs/regedit/childwnd.c
View file @
8daf5ad2
...
...
@@ -108,16 +108,14 @@ static LPTSTR CombinePaths(LPCTSTR pPaths[], int nPaths) {
return
combined
;
}
LPTSTR
GetItemFullPath
(
HWND
hwndTV
,
HTREEITEM
hItem
,
BOOL
bFull
)
{
LPCTSTR
parts
[
3
]
=
{
_T
(
""
),
_T
(
""
),
_T
(
""
)};
static
LPTSTR
GetPathRoot
(
HWND
hwndTV
,
HTREEITEM
hItem
,
BOOL
bFull
)
{
LPCTSTR
parts
[
2
]
=
{
_T
(
""
),
_T
(
""
)};
TCHAR
text
[
260
];
HKEY
hRootKey
=
NULL
;
if
(
!
hItem
)
hItem
=
TreeView_GetSelection
(
hwndTV
);
parts
[
2
]
=
GetItemPath
(
hwndTV
,
hItem
,
&
hRootKey
);
if
(
!
parts
[
2
])
parts
[
2
]
=
_T
(
""
);
if
(
!
bFull
&&
!
hRootKey
&&
!*
parts
[
2
])
GetItemPath
(
hwndTV
,
hItem
,
&
hRootKey
);
if
(
!
bFull
&&
!
hRootKey
)
return
NULL
;
if
(
hRootKey
)
parts
[
1
]
=
GetRootKeyName
(
hRootKey
);
...
...
@@ -126,7 +124,27 @@ LPTSTR GetItemFullPath(HWND hwndTV, HTREEITEM hItem, BOOL bFull) {
GetComputerName
(
text
,
&
dwSize
);
parts
[
0
]
=
text
;
}
return
CombinePaths
(
parts
,
3
);
return
CombinePaths
(
parts
,
2
);
}
LPTSTR
GetItemFullPath
(
HWND
hwndTV
,
HTREEITEM
hItem
,
BOOL
bFull
)
{
LPTSTR
parts
[
2
]
=
{
_T
(
""
),
_T
(
""
)};
HKEY
hRootKey
=
NULL
;
LPTSTR
ret
;
parts
[
0
]
=
GetPathRoot
(
hwndTV
,
hItem
,
bFull
);
parts
[
1
]
=
GetItemPath
(
hwndTV
,
hItem
,
&
hRootKey
);
ret
=
CombinePaths
((
LPCTSTR
*
)
parts
,
2
);
HeapFree
(
GetProcessHeap
(),
0
,
parts
[
0
]);
return
ret
;
}
LPTSTR
GetPathFullPath
(
HWND
hwndTV
,
LPTSTR
path
)
{
LPTSTR
parts
[
2
]
=
{
_T
(
""
),
_T
(
""
)},
ret
;
parts
[
0
]
=
GetPathRoot
(
hwndTV
,
0
,
TRUE
);
parts
[
1
]
=
path
;
ret
=
CombinePaths
((
LPCTSTR
*
)
parts
,
2
);
HeapFree
(
GetProcessHeap
(),
0
,
parts
[
0
]);
return
ret
;
}
static
void
OnTreeSelectionChanged
(
HWND
hwndTV
,
HWND
hwndLV
,
HTREEITEM
hItem
,
BOOL
bRefreshLV
)
...
...
@@ -317,10 +335,14 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
BOOL
res
=
RenameKey
(
hWnd
,
hRootKey
,
path
,
dispInfo
->
item
.
pszText
);
if
(
res
)
{
TVITEMEX
item
;
LPTSTR
fullPath
=
GetPathFullPath
(
pChildWnd
->
hTreeWnd
,
dispInfo
->
item
.
pszText
);
item
.
mask
=
TVIF_HANDLE
|
TVIF_TEXT
;
item
.
hItem
=
TreeView_GetSelection
(
pChildWnd
->
hTreeWnd
);
item
.
pszText
=
dispInfo
->
item
.
pszText
;
SendMessage
(
pChildWnd
->
hTreeWnd
,
TVM_SETITEMW
,
0
,
(
LPARAM
)
&
item
);
SendMessage
(
hStatusBar
,
SB_SETTEXT
,
0
,
(
LPARAM
)
fullPath
);
HeapFree
(
GetProcessHeap
(),
0
,
fullPath
);
}
return
res
;
}
...
...
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