From ce74c253c44fb62011ffcfac120389f42e0b33f2 Mon Sep 17 00:00:00 2001 From: Ignacio Ortiz de Zuniga Date: Wed, 7 Feb 2001 09:30:48 +0000 Subject: [PATCH] *** empty log message *** --- harbour/ChangeLog | 7 +++++++ harbour/source/debug/dbgtmenu.prg | 26 ++++++++++++++++++++++++-- harbour/source/debug/tbrwtext.prg | 2 +- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ac4287ee51..fbee2c1999 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,10 @@ +2001-02-07 10:30 GMT+1 Ignacio Ortiz + * harbour/source/debug/dbgtmenu.prg + + Accelerator keys on popup menus fixed. + + * harbour/source/debug/tbrwtext.prg + + Wrong comment on search method. + 2001-02-06 23:57 GMT+1 Maurilio Longo * source/rtl/tbrowse.prg + added ::MGotoYX(nRow, nCol) method which hilights cell under screen coordinates nRow, nCol diff --git a/harbour/source/debug/dbgtmenu.prg b/harbour/source/debug/dbgtmenu.prg index 5dd1df66c6..c228b78650 100644 --- a/harbour/source/debug/dbgtmenu.prg +++ b/harbour/source/debug/dbgtmenu.prg @@ -382,22 +382,44 @@ METHOD ProcessKey( nKey ) CLASS TDbMenu ::GoBottom() otherwise - if ( nPopup := ::GetHotKeyPos( __dbgAltToKey( nKey ) ) ) != 0 + + if ::nOpenPopup > 0 + if IsAlpha( Chr( nKey ) ) + oPopup := ::aItems[ ::nOpenPopup ]:bAction + nPopup := oPopup:GetHotKeyPos( Upper( Chr( nKey ) ) ) + if nPopup > 0 .and. oPopup:nOpenPopup != nPopup + oPopup:DeHilite() + oPopup:ShowPopup( nPopup ) + //oPopup:aItems[ nPopup]:EvalAction() + endif + endif + else + nPopup := ::GetHotKeyPos( __dbgAltToKey( nKey ) ) if nPopup != ::nOpenPopup ::Close() ::ShowPopup( nPopup ) endif endif + endcase return nil function __dbgAltToKey( nKey ) - local nIndex := AScan( { K_ALT_A, K_ALT_B, K_ALT_C, K_ALT_D, K_ALT_E, K_ALT_F,; + local nIndex + local cChar + + cChar := Chr( nKey ) + + if IsAlpha( cChar ) + return Upper( cChar ) + else + nIndex := AScan( { K_ALT_A, K_ALT_B, K_ALT_C, K_ALT_D, K_ALT_E, K_ALT_F,; K_ALT_G, K_ALT_H, K_ALT_I, K_ALT_J, K_ALT_K, K_ALT_L,; K_ALT_M, K_ALT_N, K_ALT_O, K_ALT_P, K_ALT_Q, K_ALT_R,; K_ALT_S, K_ALT_T, K_ALT_U, K_ALT_V, K_ALT_W, K_ALT_X,; K_ALT_Y, K_ALT_Z }, nKey ) + endif return iif( nIndex > 0, SubStr( "ABCDEFGHIJKLMNOPQRSTUVWXYZ", nIndex, 1 ), "" ) \ No newline at end of file diff --git a/harbour/source/debug/tbrwtext.prg b/harbour/source/debug/tbrwtext.prg index cc187d8f40..3c20bca931 100644 --- a/harbour/source/debug/tbrwtext.prg +++ b/harbour/source/debug/tbrwtext.prg @@ -244,7 +244,7 @@ METHOD Search( cString, lCaseSensitive, nMode ) CLASS TBrwText nFrom := Min( ::nRow + 1, ::naTextLen ) nTo := ::naTextLen nStep := 1 - case nMode == 2 // Forward + case nMode == 2 // Backward nFrom := Max( ::nRow - 1, 1 ) nTo := 1 nStep := -1