Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
8daf5ad2
Commit
8daf5ad2
authored
18 years ago
by
Juan Lang
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
regedit: Update status bar after editing key name.
parent
4fbe97e5
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
programs/regedit/childwnd.c
+29
-7
29 additions, 7 deletions
programs/regedit/childwnd.c
with
29 additions
and
7 deletions
programs/regedit/childwnd.c
+
29
−
7
View file @
8daf5ad2
...
...
@@ -108,16 +108,14 @@ static LPTSTR CombinePaths(LPCTSTR pPaths[], int nPaths) {
return
combined
;
}
LPTSTR
Get
ItemFull
Path
(
HWND
hwndTV
,
HTREEITEM
hItem
,
BOOL
bFull
)
{
LPCTSTR
parts
[
3
]
=
{
_T
(
""
),
_T
(
""
),
_T
(
""
)};
static
LPTSTR
GetPath
Root
(
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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment