2013-07-08 17:09 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* src/debug/dbgtmenu.prg
    ! allow to chose current menu item by its hotkey

  * src/debug/dbgtmitm.prg
    % eliminated dummy hb_DispOutAtBox() for not marked options

  * src/debug/debugger.prg
    ! keep RunAtStartup flag synced with menu
    ! fixed options decoding from init.cld file.
      Thanks to Franček Prijatelj for locating the problem though fix
      should be a little bit different.

  * src/debug/tbrwtext.prg
    ! respect LineNumbers on/off setting

  * src/rtl/console.c
    ! call hb_gtFlush() at the end of hb_DispOutAtBox() - it fixes
      different side effects in code using hb_DispOutAtBox().
This commit is contained in:
Przemysław Czerpak
2013-07-08 17:09:36 +02:00
parent fa0cdfcd5d
commit b2dd9d5923
6 changed files with 49 additions and 13 deletions

View File

@@ -10,6 +10,26 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2013-07-08 17:09 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/debug/dbgtmenu.prg
! allow to chose current menu item by its hotkey
* src/debug/dbgtmitm.prg
% eliminated dummy hb_DispOutAtBox() for not marked options
* src/debug/debugger.prg
! keep RunAtStartup flag synced with menu
! fixed options decoding from init.cld file.
Thanks to Franček Prijatelj for locating the problem though fix
should be a little bit different.
* src/debug/tbrwtext.prg
! respect LineNumbers on/off setting
* src/rtl/console.c
! call hb_gtFlush() at the end of hb_DispOutAtBox() - it fixes
different side effects in code using hb_DispOutAtBox().
2013-07-08 12:54 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbct/ctwfunc.c
! extract box frame string passed to WBOX() using BOX CP

View File

@@ -480,9 +480,11 @@ METHOD ProcessKey( nKey ) CLASS HBDbMenu
IF IsAlpha( hb_keyChar( nKey ) )
oPopup := ::aItems[ ::nOpenPopup ]:bAction
nPopup := oPopup:GetHotKeyPos( Upper( hb_keyChar( nKey ) ) )
IF nPopup > 0 .AND. oPopup:nOpenPopup != nPopup
oPopup:DeHilite()
oPopup:ShowPopup( nPopup )
IF nPopup > 0
IF oPopup:nOpenPopup != nPopup
oPopup:DeHilite()
oPopup:ShowPopup( nPopup )
ENDIF
::EvalAction()
ENDIF
ENDIF

View File

@@ -94,6 +94,8 @@ METHOD Display( cClrText, cClrHotKey ) CLASS HBDbMenuItem
( nAt := At( "~", ::cPrompt ) ) - 1, ;
SubStr( ::cPrompt, nAt + 1, 1 ), cClrHotKey )
hb_DispOutAtBox( ::nRow, ::nCol, iif( ::lChecked, hb_UTF8ToStrBox( "√" ), "" ), cClrText )
IF ::lChecked
hb_DispOutAtBox( ::nRow, ::nCol, hb_UTF8ToStrBox( "√" ), cClrText )
ENDIF
RETURN Self

View File

@@ -297,7 +297,7 @@ CREATE CLASS HBDebugger
METHOD RestoreAppScreen()
METHOD RestoreAppState()
METHOD RestoreSettings( cFileName )
METHOD RunAtStartup() INLINE ::lRunAtStartup := ::oPullDown:GetItemByIdent( "ALTD" ):checked := ! ::lRunAtStartup
METHOD RunAtStartup( lRunAtStartup )
METHOD SaveAppScreen()
METHOD SaveAppState()
METHOD SaveSettings( cFileName )
@@ -1056,9 +1056,9 @@ METHOD DoCommand( cCommand ) CLASS HBDebugger
CASE starts( "PATHFORFILES", cParam )
::PathForFiles( AllTrim( cParam1 ) )
CASE starts( "RUNATSTARTUP", cParam )
::RunAtStartup()
::RunAtStartup( .T. )
CASE starts( "NORUNATSTARTUP", cParam )
::lRunAtStartup := .F.
::RunAtStartup( .F. )
CASE starts( "SAVESETTINGS", cParam )
::SaveSettings( AllTrim( cParam1 ) )
CASE starts( "RESTORESETTINGS", cParam )
@@ -1234,10 +1234,10 @@ METHOD DoScript( cFileName ) CLASS HBDebugger
IF hb_FileExists( cFileName )
cInfo := MemoRead( cFileName )
nLen := MLCount( cInfo, NIL, NIL, .F. )
nLen := MLCount( cInfo, 16384, NIL, .F., .T. )
FOR n := 1 TO nLen
cLine := MemoLine( cInfo, 16384, n, NIL, .F., .T. )
IF ::lActive .OR. ( ( nPos := At( ' ', cLine ) ) > 0 .AND. starts( "OPTIONS", Upper( Left( cLine, nPos ) ) ) )
cLine := AllTrim( MemoLine( cInfo, 16384, n, NIL, .F., .T. ) )
IF ::lActive .OR. ( ( nPos := At( ' ', cLine ) ) > 0 .AND. starts( "OPTIONS", Upper( Left( cLine, nPos - 1 ) ) ) )
// In inactive debugger, only "OPTIONS" commands can be executed safely
::DoCommand( cLine )
ENDIF
@@ -1782,6 +1782,16 @@ METHOD IsValidStopLine( cName, nLine ) CLASS HBDebugger
RETURN __dbgIsValidStopLine( ::pInfo, cName, nLine )
METHOD RunAtStartup( lRunAtStartup ) CLASS HBDebugger
hb_default( @lRunAtStartup, ! ::lRunAtStartup )
::lRunAtStartup := lRunAtStartup
::oPulldown:GetItemByIdent( "ALTD" ):checked := ::lRunAtStartup
RETURN Self
METHOD LineNumbers( lLineNumbers ) CLASS HBDebugger
hb_default( @lLineNumbers, ! ::lLineNumbers )

View File

@@ -105,9 +105,9 @@ CREATE CLASS HBBrwText
METHOD GoBottom() INLINE ::oBrw:GoBottom():ForceStable(), Self
METHOD Home() INLINE iif( ::nLineOffset > 1, ( ::nLineOffset := 1, ::oBrw:RefreshAll():ForceStable() ), ), Self
METHOD End() INLINE ::nLineOffset := Max( 1, ::nMaxLineLen - ( ::nWidth - ::nLineNoLen ) + 1 ), ::oBrw:RefreshAll():ForceStable(), Self
METHOD End() INLINE ::nLineOffset := Max( 1, ::nMaxLineLen - ( ::nWidth - iif( ::lLineNumbers, ::nLineNoLen, 0 ) ) + 1 ), ::oBrw:RefreshAll():ForceStable(), Self
METHOD Right() INLINE iif( ::nLineOffset < ::nMaxLineLen, ( ::nLineOffset++, ::oBrw:RefreshAll():ForceStable() ), ), Self
METHOD Right() INLINE iif( ::nLineOffset < ::nMaxLineLen + iif( ::lLineNumbers, ::nLineNoLen, 0 ), ( ::nLineOffset++, ::oBrw:RefreshAll():ForceStable() ), ), Self
METHOD Left() INLINE iif( ::nLineOffset > 1, ( ::nLineOffset--, ::oBrw:RefreshAll():ForceStable() ), ), Self
METHOD RowPos() INLINE ::nRow
@@ -168,7 +168,7 @@ METHOD SetActiveLine( n ) CLASS HBBrwText
METHOD GetLine() CLASS HBBrwText
RETURN padr( hb_ntos( ::nRow ) + ":", ::nLineNoLen ) + ;
RETURN iif( ::lLineNumbers, padr( hb_ntos( ::nRow ) + ":", ::nLineNoLen ), "" ) + ;
MemoLine( ::aRows[ ::nRow ], ::nMaxLineLen, 1, ::nTabWidth, .F. )
METHOD GetLineText() CLASS HBBrwText

View File

@@ -668,6 +668,8 @@ HB_FUNC( HB_DISPOUTATBOX )
while( HB_CDPCHAR_GET( cdp, pszString, nLen, &nIndex, &wc ) )
hb_gtPutChar( iRow, iCol++, iColor, HB_GT_ATTR_BOX, wc );
hb_gtFlush();
}
}