diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 672e930cbb..8f7c940550 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-30 01:30 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/ideedit.prg + % Changed: context-menu options for "Split..." are now + edit instance's state dependent. + ! Thumbnail window is not closed while split is closed. + 2010-06-30 00:27 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/hbqt_hbqplaintextedit.cpp ! Fixed: the paint behavior in "thumbnail". diff --git a/harbour/contrib/hbide/ideedit.prg b/harbour/contrib/hbide/ideedit.prg index 61dcbc512e..8e08e35705 100644 --- a/harbour/contrib/hbide/ideedit.prg +++ b/harbour/contrib/hbide/ideedit.prg @@ -352,7 +352,9 @@ METHOD IdeEdit:setFont() METHOD IdeEdit:destroy() ::oUpDn:oUI:setParent( ::oDlg:oWidget ) - ::oSourceThumbnailDock:oWidget:hide() + IF Self == ::oEditor:oEdit + ::oSourceThumbnailDock:oWidget:hide() + ENDIF ::disconnect( ::qTimer, "timeout()" ) IF ::qTimer:isActive() @@ -429,6 +431,12 @@ METHOD IdeEdit:execEvent( nMode, oEdit, p, p1 ) CASE customContextMenuRequested QAction():from( ::oEM:aActions[ 17, 2 ] ):setEnabled( !empty( qCursor:selectedText() ) ) + n := ascan( ::oEditor:aEdits, {|o| o == oEdit } ) + + QAction():from( ::oEM:aActions[ 18, 2 ] ):setEnabled( ::oEditor:nSplOrient == -1 .OR. ::oEditor:nSplOrient == 1 ) + QAction():from( ::oEM:aActions[ 19, 2 ] ):setEnabled( ::oEditor:nSplOrient == -1 .OR. ::oEditor:nSplOrient == 2 ) + QAction():from( ::oEM:aActions[ 21, 2 ] ):setEnabled( n > 0 ) + pAct := ::oEM:qContextMenu:exec_1( qEdit:mapToGlobal( p ) ) IF !hbqt_isEmptyQtPointer( pAct ) qAct := QAction():configure( pAct ) @@ -438,11 +446,11 @@ METHOD IdeEdit:execEvent( nMode, oEdit, p, p1 ) CASE qAct:text() == "Split Vertically" ::oEditor:split( 2, oEdit ) CASE qAct:text() == "Close Split Window" - IF ( n := ascan( ::oEditor:aEdits, {|o| o == oEdit } ) ) > 0 /* 1 == Main Edit */ + IF n > 0 /* 1 == Main Edit */ ::oUpDn:oUI:setParent( ::oEditor:oEdit:qEdit ) oo := ::oEditor:aEdits[ n ] hb_adel( ::oEditor:aEdits, n, .t. ) - oo:destroy() + oo:destroy( .f. ) ::oEditor:qCqEdit := ::oEditor:qEdit ::oEditor:qCoEdit := ::oEditor:oEdit ::oIde:manageFocusInEditor()