[ros-diffs] [cwittich] 28052: don't allow renaming of root keys See issue #2508 for more details.

cwittich at svn.reactos.org cwittich at svn.reactos.org
Tue Jul 31 01:27:52 CEST 2007


Author: cwittich
Date: Tue Jul 31 03:27:52 2007
New Revision: 28052

URL: http://svn.reactos.org/svn/reactos?rev=28052&view=rev
Log:
don't allow renaming of root keys
See issue #2508 for more details.

Modified:
    trunk/reactos/base/applications/regedit/childwnd.c

Modified: trunk/reactos/base/applications/regedit/childwnd.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/childwnd.c?rev=28052&r1=28051&r2=28052&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedit/childwnd.c (original)
+++ trunk/reactos/base/applications/regedit/childwnd.c Tue Jul 31 03:27:52 2007
@@ -506,6 +506,16 @@
 	    case NM_SETFOCUS:
 		pChildWnd->nFocusPanel = 0;
 		break;
+            case TVN_BEGINLABELEDIT:
+            {
+				LPNMTVDISPINFO ptvdi;
+				/* cancel label edit for rootkeys  */
+				ptvdi = (LPNMTVDISPINFO) lParam;
+                if (!TreeView_GetParent(pChildWnd->hTreeWnd, ptvdi->item.hItem) ||
+					!TreeView_GetParent(pChildWnd->hTreeWnd, TreeView_GetParent(pChildWnd->hTreeWnd, ptvdi->item.hItem)))
+                  return TRUE;
+				break;
+			}
             case TVN_ENDLABELEDIT:
                 {
                   LPCTSTR keyPath;




More information about the Ros-diffs mailing list