mirror of
https://github.com/reactos/reactos.git
synced 2025-01-11 16:51:06 +00:00
* Unicode fixes to regedit
* Fixed bug 2494 Patch by Carlo Bramix [carlo (dot) bramix (at) libero (dot) it]. See issue #2494 for more details. svn path=/trunk/; revision=29308
This commit is contained in:
parent
b067e31df6
commit
67dadefc81
4 changed files with 24 additions and 12 deletions
|
@ -202,7 +202,7 @@ static void SuggestKeys(HKEY hRootKey, LPCTSTR pszKeyPath, LPTSTR pszSuggestions
|
|||
iSuggestionsLength--;
|
||||
|
||||
/* Are we a root key in HKEY_CLASSES_ROOT? */
|
||||
if ((hRootKey == HKEY_CLASSES_ROOT) && pszKeyPath[0] && !_tcschr(pszKeyPath, '\\'))
|
||||
if ((hRootKey == HKEY_CLASSES_ROOT) && pszKeyPath[0] && !_tcschr(pszKeyPath, TEXT('\\')))
|
||||
{
|
||||
do
|
||||
{
|
||||
|
|
|
@ -150,7 +150,7 @@ static void OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu)
|
|||
/* load appropriate string*/
|
||||
LPTSTR lpsz = str;
|
||||
/* first newline terminates actual string*/
|
||||
lpsz = _tcschr(lpsz, '\n');
|
||||
lpsz = _tcschr(lpsz, _T('\n'));
|
||||
if (lpsz != NULL)
|
||||
*lpsz = '\0';
|
||||
}
|
||||
|
@ -887,6 +887,8 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
RefreshListView(g_pChildWnd->hListWnd, hKeyRoot, keyPath);
|
||||
break;
|
||||
case ID_EDIT_RENAME:
|
||||
if (GetFocus() == g_pChildWnd->hListWnd)
|
||||
{
|
||||
if(ListView_GetSelectedCount(g_pChildWnd->hListWnd) == 1)
|
||||
{
|
||||
item = ListView_GetNextItem(g_pChildWnd->hListWnd, -1, LVNI_SELECTED);
|
||||
|
@ -895,6 +897,14 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
(void)ListView_EditLabel(g_pChildWnd->hListWnd, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (GetFocus() == g_pChildWnd->hTreeWnd)
|
||||
{
|
||||
/* Get focused entry of treeview (if any) */
|
||||
HTREEITEM hItem = TreeView_GetSelection(g_pChildWnd->hTreeWnd);
|
||||
if (hItem != NULL)
|
||||
(void)TreeView_EditLabel(g_pChildWnd->hTreeWnd, hItem);
|
||||
}
|
||||
break;
|
||||
case ID_EDIT_DELETE:
|
||||
{
|
||||
|
|
|
@ -1735,7 +1735,7 @@ static LONG RegNextKey(HKEY hKey, LPTSTR lpSubKey, size_t iSubKeyLength)
|
|||
/* Go up and find the next sibling key */
|
||||
do
|
||||
{
|
||||
s = _tcsrchr(lpSubKey, '\\');
|
||||
s = _tcsrchr(lpSubKey, TEXT('\\'));
|
||||
if (s)
|
||||
{
|
||||
*s = '\0';
|
||||
|
@ -1832,7 +1832,7 @@ LONG RegSearch(HKEY hKey, LPTSTR lpSubKey, size_t iSubKeyLength,
|
|||
if (lResult != ERROR_SUCCESS)
|
||||
return lResult;
|
||||
|
||||
s = _tcsrchr(lpSubKey, '\\');
|
||||
s = _tcsrchr(lpSubKey, TEXT('\\'));
|
||||
s = s ? s + 1 : lpSubKey;
|
||||
}
|
||||
while(!(dwSearchFlags & RSF_LOOKATKEYS) || !RegSearchCompare(s, pszSearchString, dwSearchFlags));
|
||||
|
@ -1871,3 +1871,4 @@ BOOL RegKeyGetName(LPTSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCTSTR lp
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -602,7 +602,7 @@ BOOL SelectNode(HWND hwndTV, LPCTSTR keyPath)
|
|||
|
||||
while(keyPath[0])
|
||||
{
|
||||
s = _tcschr(keyPath, '\\');
|
||||
s = _tcschr(keyPath, TEXT('\\'));
|
||||
lstrcpyn(szPathPart, keyPath, s ? s - keyPath + 1 : _tcslen(keyPath) + 1);
|
||||
|
||||
/* Special case for root to expand root key abbreviations */
|
||||
|
@ -656,3 +656,4 @@ BOOL SelectNode(HWND hwndTV, LPCTSTR keyPath)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue