Author: hbelusca
Date: Sat Jun 29 20:22:36 2013
New Revision: 59373
URL: http://svn.reactos.org/svn/reactos?rev=59373&view=rev
Log:
[FREELDR]
Fix extended and control characters handling in text-boxes. We don't show anymore strange characters when pressing on, e.g. up or down arrows anymore.
Also, fix uppercase 'o' character (which has the same scan code but is not an extended key, as the End key).
The culprit revision which introduced this bug is r58658.
CORE-7323 #resolve #comment The uppercase 'o' problem is fixed in revision r59373. Thanks for your report :)
Modified:
trunk/reactos/boot/freeldr/freeldr/ui/tui.c
Modified: trunk/reactos/boot/freeldr/freeldr/ui/tui.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/tu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/ui/tui.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/ui/tui.c [iso-8859-1] Sat Jun 29 20:22:36 2013
@@ -952,29 +952,29 @@
MachBeep();
}
}
- else if (key == KEY_HOME) // Go to the start of the buffer
+ else if (Extended && key == KEY_HOME) // Go to the start of the buffer
{
EditBoxTextPosition = 0;
}
- else if (key == KEY_END) // Go to the end of the buffer
+ else if (Extended && key == KEY_END) // Go to the end of the buffer
{
EditBoxTextPosition = EditBoxTextLength;
}
- else if (key == KEY_RIGHT) // Go right
+ else if (Extended && key == KEY_RIGHT) // Go right
{
if (EditBoxTextPosition < EditBoxTextLength)
EditBoxTextPosition++;
else
MachBeep();
}
- else if (key == KEY_LEFT) // Go left
+ else if (Extended && key == KEY_LEFT) // Go left
{
if (EditBoxTextPosition > 0)
EditBoxTextPosition--;
else
MachBeep();
}
- else // Add this key to the buffer
+ else if (!Extended) // Add this key to the buffer
{
if ( (EditBoxTextLength < Length - 1) &&
(EditBoxTextPosition < Length - 1) )
@@ -991,6 +991,10 @@
{
MachBeep();
}
+ }
+ else
+ {
+ MachBeep();
}
}
Author: hbelusca
Date: Sat Jun 29 19:22:00 2013
New Revision: 59371
URL: http://svn.reactos.org/svn/reactos?rev=59371&view=rev
Log:
[REGEDIT]
Fix tree-view's image-list handle leakage when application quits.
Loosely based on a patch by Edijs Kolesnicovičs and Grégory Macário Harbs
NOTE: Always cleanup / destroy (or, try to) things in the reverse way they are created / initialized (i.e. in a symmetrical way). Therefore, destry the associated tree-view's image-list in the DestroyTreeView function, which is the opposite of CreateTreeView (which calls InitTreeViewImageLists). The same mechanism is already used by the list-view. For completeness, add a parameter to the DestroyTreeView function (a handle to a tree-view) so that we can pass to it the global tree-view's handle (see what's done in WM_DESTROY message handling in ChildWndProc).
CORE-6856 #resolve #comment Should be fixed in revision r59371. See the commit log for more details. Thanks :)
Modified:
trunk/reactos/base/applications/regedit/childwnd.c
trunk/reactos/base/applications/regedit/main.h
trunk/reactos/base/applications/regedit/treeview.c
Modified: trunk/reactos/base/applications/regedit/childwnd.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
==============================================================================
--- trunk/reactos/base/applications/regedit/childwnd.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/childwnd.c [iso-8859-1] Sat Jun 29 19:22:00 2013
@@ -439,8 +439,8 @@
}
goto def;
case WM_DESTROY:
- DestroyTreeView();
DestroyListView(g_pChildWnd->hListWnd);
+ DestroyTreeView(g_pChildWnd->hTreeWnd);
DestroyMainMenu();
HeapFree(GetProcessHeap(), 0, g_pChildWnd);
g_pChildWnd = NULL;
Modified: trunk/reactos/base/applications/regedit/main.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
==============================================================================
--- trunk/reactos/base/applications/regedit/main.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/main.h [iso-8859-1] Sat Jun 29 19:22:00 2013
@@ -129,9 +129,9 @@
extern HWND StartKeyRename(HWND hwndTV);
extern BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem);
extern BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath);
-extern void DestroyTreeView( void );
-extern void DestroyListView( HWND hwndLV );
-extern void DestroyMainMenu( void );
+extern void DestroyTreeView(HWND hwndTV);
+extern void DestroyListView(HWND hwndLV);
+extern void DestroyMainMenu(void);
/* edit.c */
extern BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin);
Modified: trunk/reactos/base/applications/regedit/treeview.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
==============================================================================
--- trunk/reactos/base/applications/regedit/treeview.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/treeview.c [iso-8859-1] Sat Jun 29 19:22:00 2013
@@ -651,10 +651,15 @@
return hwndTV;
}
-void DestroyTreeView()
-{
- if (pathBuffer)
- HeapFree(GetProcessHeap(), 0, pathBuffer);
+void DestroyTreeView(HWND hwndTV)
+{
+ HIMAGELIST himl;
+
+ if (pathBuffer) HeapFree(GetProcessHeap(), 0, pathBuffer);
+
+ /* Destroy the image list associated with the tree view control */
+ himl = TreeView_GetImageList(hwndTV, TVSIL_NORMAL);
+ if (himl) ImageList_Destroy(himl);
}
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)