2010-01-10 16:54 UTC-0300 Vailton Renato (vailtom gmail.com)
* contrib/hbide/ideactions.prg
+ Added new action "CloseOther" referenced in the menu, but missing in
IdeActions:loadActions()
* contrib/hbide/idesources.prg
! Reimplemented the method closeAllOthers() because the old code did not
work properly. Please test and report.
This commit is contained in:
@@ -17,6 +17,15 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-01-10 16:54 UTC-0300 Vailton Renato (vailtom gmail.com)
|
||||
* contrib/hbide/ideactions.prg
|
||||
+ Added new action "CloseOther" referenced in the menu, but missing in
|
||||
IdeActions:loadActions()
|
||||
|
||||
* contrib/hbide/idesources.prg
|
||||
! Rewritten the method closeAllOthers() because the old code did not work
|
||||
properly. Please test and report.
|
||||
|
||||
2010-01-10 07:34 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbide/idedocks.prg
|
||||
* contrib/hbide/ideobject.prg
|
||||
|
||||
@@ -247,6 +247,7 @@ METHOD IdeActions:loadActions()
|
||||
aadd( aAct, { "SaveAs" , "Save ~As" , "saveas" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "SaveAll" , "Save A~ll" , "saveall" , "Sh+^s", "No", "Yes" } )
|
||||
aadd( aAct, { "CloseAll" , "Clos~e All" , "closeall" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "CloseOther" , "Close Ot~hers" , "closeexcept" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "Revert" , "~Revert to Saved" , "" , "Sh+^R", "No", "Yes" } )
|
||||
aadd( aAct, { "ExportHTML" , "~Export to HTML" , "exporthtml" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "InsertDateTime" , "~Date && Time" , "insert-datetime", "Sh+F7", "No", "Yes" } )
|
||||
|
||||
@@ -305,19 +305,40 @@ METHOD IdeSourcesManager:closeAllSources()
|
||||
/*----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Close all opened files except current.
|
||||
* 02/01/2010 - 15:47:19
|
||||
* 02/01/2010 - 15:47:19 - vailtom
|
||||
*/
|
||||
METHOD IdeSourcesManager:closeAllOthers( nTab )
|
||||
LOCAL lCanceled, a_
|
||||
LOCAL lCanceled
|
||||
LOCAL oEdit
|
||||
LOCAL nID
|
||||
|
||||
FOR EACH a_ IN ::aTabs
|
||||
IF a_:__enumIndex() != nTab
|
||||
::closeSource( a_:__enumIndex(), .T., @lCanceled )
|
||||
IF lCanceled
|
||||
RETURN .f.
|
||||
ENDIF
|
||||
ENDIF
|
||||
NEXT
|
||||
DEFAULT nTab TO ::oIde:getCurrentTab()
|
||||
|
||||
IF empty( oEdit := ::oEM:getEditorByTabPosition( nTab ) )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
nID := oEdit:nID
|
||||
nTab:= 0
|
||||
|
||||
* Finally now we will close all tabs.
|
||||
DO WHILE ( ++nTab <= Len( ::aTabs ) )
|
||||
|
||||
oEdit := ::oEM:getEditorByTabPosition( nTab )
|
||||
|
||||
IF empty(oEdit) .OR. oEdit:nID == nID
|
||||
LOOP
|
||||
ENDIF
|
||||
|
||||
IF ::closeSource( nTab, .T., @lCanceled )
|
||||
nTab --
|
||||
LOOP
|
||||
ENDIF
|
||||
|
||||
IF lCanceled
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
ENDDO
|
||||
|
||||
RETURN .T.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user