FileApplicationNoteBook.st
changeset 15594 ebb982d3e6c3
parent 15489 b7255ae67cff
child 15596 c11cc9c2974d
child 15668 aaaddffbefe0
equal deleted inserted replaced
15593:a0954ebf864c 15594:ebb982d3e6c3
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 2002 by eXept Software AG
     4  COPYRIGHT (c) 2002 by eXept Software AG
     3               All Rights Reserved
     5               All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
   691         self doSelect:anApplication.
   693         self doSelect:anApplication.
   692     ].
   694     ].
   693     anApplication postOpenWith:anApplication builder.
   695     anApplication postOpenWith:anApplication builder.
   694 !
   696 !
   695 
   697 
   696 tabStringAdd:aString for:aAppl
   698 tabStringAdd:aString for:anAppl
   697 
       
   698     | index text stream|
   699     | index text stream|
   699 
   700 
   700     index := self getIndexFor:aAppl.
   701     index := self getIndexFor:anAppl.
   701     index isNil ifTrue:[ ^ self].
   702     index isNil ifTrue:[ ^ self].
   702     text := self privateTabList at:index.
   703     text := self privateTabList at:index.
   703     stream := WriteStream on:''.
   704     stream := CharacterWriteStream new.
   704     stream nextPutAll:text.
   705     stream nextPutAll:text.
   705     stream space.
   706     stream space.
   706     stream nextPutAll:aString.
   707     stream nextPutAll:aString.
   707     self privateTabList at:index put:(Text string:(stream contents)).
   708     self privateTabList at:index put:(Text string:(stream contents)).
   708     stream close.
       
   709 !
   709 !
   710 
   710 
   711 tabStringChangeTo:aString for:anAppl
   711 tabStringChangeTo:aString for:anAppl
   712 
   712 
   713     | index text tabItem |
   713     | index text tabItem |
  1960     |sel list stream|
  1960     |sel list stream|
  1961 
  1961 
  1962     sel := self selectionHolder value.
  1962     sel := self selectionHolder value.
  1963     list := self archiveFileList.
  1963     list := self archiveFileList.
  1964     (sel notEmptyOrNil) ifTrue:[
  1964     (sel notEmptyOrNil) ifTrue:[
  1965         stream := WriteStream on:''.
  1965         stream := CharacterWriteStream new.
  1966         sel do:[: key |
  1966         sel do:[: key |
  1967             stream nextPutAll:(key fileName asString).
  1967             stream nextPutAll:(key fileName asString).
  1968             stream cr.
  1968             stream cr.
  1969         ].
  1969         ].
  1970         self window setClipboardText:stream contents.
  1970         self window setClipboardText:stream contents.
  1971         stream close.
       
  1972     ].
  1971     ].
  1973 
  1972 
  1974     "Modified (format): / 29-11-2011 / 18:57:40 / cg"
  1973     "Modified (format): / 29-11-2011 / 18:57:40 / cg"
  1975 !
  1974 !
  1976 
  1975 
  2576 
  2575 
  2577     sel := self selectionHolder value.
  2576     sel := self selectionHolder value.
  2578     size := sel size.
  2577     size := sel size.
  2579     size == 0  ifTrue:[^ ''].
  2578     size == 0  ifTrue:[^ ''].
  2580 
  2579 
  2581     stream := WriteStream on:''.
  2580     stream := CharacterWriteStream new.
  2582     stream nextPutAll:(sel first fileName asFilename baseName asString).
  2581     stream nextPutAll:(sel first fileName asFilename baseName asString).
  2583     size == 1 ifTrue:[
  2582     size == 1 ifTrue:[
  2584         fnName := 'ui_menuitem.xpm'.
  2583         fnName := 'ui_menuitem.xpm'.
  2585     ] ifFalse:[
  2584     ] ifFalse:[
  2586         fnName := 'ui_submenu_open.xpm'.
  2585         fnName := 'ui_submenu_open.xpm'.
  6001 
  6000 
  6002     "Created: / 23-06-2011 / 16:38:07 / cg"
  6001     "Created: / 23-06-2011 / 16:38:07 / cg"
  6003 !
  6002 !
  6004 
  6003 
  6005 updateSameFilesFor:aFilename
  6004 updateSameFilesFor:aFilename
  6006 
       
  6007     | master modifiedApplications stream filename action|
  6005     | master modifiedApplications stream filename action|
  6008 
  6006 
  6009     master := self masterApplication.
  6007     master := self masterApplication.
  6010     master notNil ifTrue:[
  6008     master notNil ifTrue:[
  6011         modifiedApplications := master getSameFilesModifiedFor:self.
  6009         modifiedApplications := master getSameFilesModifiedFor:self.
  6012         (modifiedApplications isEmptyOrNil) ifTrue:[^ true ].
  6010         (modifiedApplications isEmptyOrNil) ifTrue:[^ true ].
  6013         filename := aFilename asString.
  6011         filename := aFilename asString.
  6014         stream := WriteStream on:''.
  6012         stream := CharacterWriteStream with:filename.
  6015         stream nextPutAll:filename.
       
  6016         stream nextPutAll:' is modified in tab'.
  6013         stream nextPutAll:' is modified in tab'.
  6017         modifiedApplications size > 1 ifTrue:[
  6014         modifiedApplications size > 1 ifTrue:[
  6018             stream nextPutAll:'s'.
  6015             stream nextPutAll:'s'.
  6019         ].
  6016         ].
  6020         stream cr.
  6017         stream cr.
  7171 ! !
  7168 ! !
  7172 
  7169 
  7173 !FileApplicationNoteBook::XViewApplication methodsFor:'actions'!
  7170 !FileApplicationNoteBook::XViewApplication methodsFor:'actions'!
  7174 
  7171 
  7175 changeInformation 
  7172 changeInformation 
  7176 
  7173     |stream|
  7177     | stream|
  7174 
  7178 
  7175     stream := CharacterWriteStream with:'XView on: '.
  7179     stream := WriteStream on:''.
       
  7180     stream nextPutAll:'XView on: '.
       
  7181     stream nextPutAll:self fileName baseName.
  7176     stream nextPutAll:self fileName baseName.
  7182     masterApplication isNil ifTrue:[
  7177     masterApplication isNil ifTrue:[
  7183         self window label:stream contents.
  7178         self window label:stream contents.
  7184 
       
  7185     ] ifFalse:[
  7179     ] ifFalse:[
  7186         masterApplication tabStringChangeTo:stream contents for:self.
  7180         masterApplication tabStringChangeTo:stream contents for:self.
  7187     ].
  7181     ].
  7188     stream close.
       
  7189 !
  7182 !
  7190 
  7183 
  7191 setupXView
  7184 setupXView
  7192 
  7185 
  7193     |xExt yExt mainView|
  7186     |xExt yExt mainView|
  7496 ! !
  7489 ! !
  7497 
  7490 
  7498 !FileApplicationNoteBook class methodsFor:'documentation'!
  7491 !FileApplicationNoteBook class methodsFor:'documentation'!
  7499 
  7492 
  7500 version
  7493 version
  7501     ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.318 2015-03-01 16:55:06 cg Exp $'
  7494     ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.319 2015-04-22 18:05:37 stefan Exp $'
  7502 !
  7495 !
  7503 
  7496 
  7504 version_CVS
  7497 version_CVS
  7505     ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.318 2015-03-01 16:55:06 cg Exp $'
  7498     ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.319 2015-04-22 18:05:37 stefan Exp $'
  7506 ! !
  7499 ! !
  7507 
  7500