6 modified files
reactos/subsys/system/regedit
diff -u -r1.9 -r1.10
--- En.rc 21 Jun 2004 08:47:38 -0000 1.9
+++ En.rc 21 Jun 2004 10:24:51 -0000 1.10
@@ -263,6 +263,8 @@
IDS_QUERY_DELETE_CONFIRM "Confirm Value Delete"
IDS_ERR_DELVAL_CAPTION "Error Deleting Values"
IDS_ERR_DELETEVALUE "Unable to delete all specified values!"
+ IDS_ERR_RENVAL_CAPTION "Error Renaming Value"
+ IDS_ERR_RENVAL_TOEMPTY "Cannot rename %s. The specified value name is empty. Try another name and try again."
END
STRINGTABLE DISCARDABLE
reactos/subsys/system/regedit
diff -u -r1.8 -r1.9
--- childwnd.c 21 Jun 2004 07:48:11 -0000 1.8
+++ childwnd.c 21 Jun 2004 10:24:51 -0000 1.9
@@ -101,6 +101,7 @@
static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
+ ChildWnd* pChildWnd = g_pChildWnd;
switch (LOWORD(wParam)) {
/* Parse the menu selections: */
case ID_REGISTRY_EXIT:
@@ -109,6 +110,10 @@
case ID_VIEW_REFRESH:
/* TODO */
break;
+ case ID_SWITCH_PANELS:
+ pChildWnd->nFocusPanel = !pChildWnd->nFocusPanel;
+ SetFocus(pChildWnd->nFocusPanel? pChildWnd->hListWnd: pChildWnd->hTreeWnd);
+ break;
default:
return FALSE;
}
@@ -275,10 +280,6 @@
HKEY hRootKey;
keyPath = GetItemPath(pChildWnd->hTreeWnd, ((NMTREEVIEW*)lParam)->itemNew.hItem, &hRootKey);
- if(!hRootKey)
- {
- RefreshListView(pChildWnd->hListWnd, 0, NULL);
- }
if (keyPath) {
RefreshListView(pChildWnd->hListWnd, hRootKey, keyPath);
rootName = get_root_key_name(hRootKey);
@@ -292,10 +293,10 @@
}
break;
case NM_SETFOCUS:
- pChildWnd->nFocusPanel = 1;
+ pChildWnd->nFocusPanel = 0;
break;
default:
- goto def;
+ return 0;
}
} else
{
@@ -303,12 +304,12 @@
{
switch (((LPNMHDR)lParam)->code) {
case NM_SETFOCUS:
- pChildWnd->nFocusPanel = 0;
+ pChildWnd->nFocusPanel = 1;
break;
default:
- if(ListWndNotifyProc(pChildWnd->hListWnd, wParam, lParam, &Result))
+ if(!ListWndNotifyProc(pChildWnd->hListWnd, wParam, lParam, &Result))
{
- return Result;
+ goto def;
}
break;
}
reactos/subsys/system/regedit
diff -u -r1.8 -r1.9
--- framewnd.c 21 Jun 2004 08:47:38 -0000 1.8
+++ framewnd.c 21 Jun 2004 10:24:51 -0000 1.9
@@ -658,6 +658,10 @@
case WM_MENUSELECT:
OnMenuSelect(hWnd, LOWORD(wParam), HIWORD(wParam), (HMENU)lParam);
break;
+ case WM_ACTIVATE:
+ if (LOWORD(hWnd))
+ SetFocus(g_pChildWnd->hWnd);
+ break;
case WM_DESTROY:
WinHelp(hWnd, _T("regedit"), HELP_QUIT, 0);
PostQuitMessage(0);
reactos/subsys/system/regedit
diff -u -r1.13 -r1.14
--- listview.c 21 Jun 2004 08:47:38 -0000 1.13
+++ listview.c 21 Jun 2004 10:24:51 -0000 1.14
@@ -408,7 +408,9 @@
SendMessage(hFrameWnd, WM_COMMAND, MAKEWPARAM(ID_EDIT_MODIFY, 0), 0);
}
return TRUE;
-
+ case NM_SETFOCUS:
+ g_pChildWnd->nFocusPanel = 0;
+ break;
case LVN_BEGINLABELEDIT:
{
PLINE_INFO lineinfo;
@@ -429,6 +431,40 @@
*Result = TRUE;
return TRUE;
}
+ case LVN_ENDLABELEDIT:
+ {
+ PLINE_INFO lineinfo;
+ Info = (NMLVDISPINFO*)lParam;
+ if(Info && Info->item.pszText)
+ {
+ lineinfo = (PLINE_INFO)Info->item.lParam;
+ if(!lineinfo->name || !_tcscmp(lineinfo->name, _T("")))
+ {
+ *Result = FALSE;
+ }
+ else
+ {
+ LONG ret;
+ //if((ret = RenameValue(lineinfo->name, Info->item.pszText)) != ERROR_SUCCESS)
+ {
+ TCHAR msg[128], caption[128];
+
+ LoadString(hInst, IDS_ERR_RENVAL_CAPTION, caption, sizeof(caption)/sizeof(TCHAR));
+ if(_tcslen(Info->item.pszText) == 0)
+ {
+ LoadString(hInst, IDS_ERR_RENVAL_TOEMPTY, msg, sizeof(msg)/sizeof(TCHAR));
+ }
+ else
+ _stprintf(msg, _T("rename from %s to %s"), lineinfo->name, Info->item.pszText);
+ MessageBox(0, msg, NULL, 0);
+ *Result = TRUE;
+ }
+ }
+ }
+ else
+ *Result = TRUE;
+ return TRUE;
+ }
}
return FALSE;
}
reactos/subsys/system/regedit
diff -u -r1.6 -r1.7
--- main.c 20 Jun 2004 12:21:47 -0000 1.6
+++ main.c 21 Jun 2004 10:24:51 -0000 1.7
@@ -147,6 +147,15 @@
DestroyMenu(hMenuFrame);
}
+BOOL TranslateChildTabMessage(MSG *msg)
+{
+ if (msg->message != WM_KEYDOWN) return FALSE;
+ if (msg->wParam != VK_TAB) return FALSE;
+ if (GetParent(msg->hwnd) != g_pChildWnd->hWnd) return FALSE;
+ PostMessage(g_pChildWnd->hWnd, WM_COMMAND, ID_SWITCH_PANELS, 0);
+ return TRUE;
+}
+
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
@@ -189,8 +198,8 @@
/* Main message loop */
while (GetMessage(&msg, (HWND)NULL, 0, 0)) {
- if (!TranslateAccelerator(msg.hwnd, hAccel, &msg) &&
- !IsDialogMessage(hFrameWnd, &msg)) {
+ if (!TranslateAccelerator(msg.hwnd, hAccel, &msg)
+ && !TranslateChildTabMessage(&msg)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
reactos/subsys/system/regedit
diff -u -r1.8 -r1.9
--- resource.h 21 Jun 2004 08:47:38 -0000 1.8
+++ resource.h 21 Jun 2004 10:24:52 -0000 1.9
@@ -124,6 +124,9 @@
#define IDS_QUERY_DELETE_CONFIRM 32853
#define IDS_ERR_DELVAL_CAPTION 32854
#define IDS_ERR_DELETEVALUE 32855
+#define IDS_ERR_RENVAL_CAPTION 32856
+#define IDS_ERR_RENVAL_TOEMPTY 32857
+#define ID_SWITCH_PANELS 32871
#define IDS_FLT_REGFILES 31001
#define IDS_FLT_REGFILES_FLT 31002
CVSspam 0.2.8