Levente Uzonyi uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ul.191.mcz==================== Summary ====================
Name: Tools-ul.191
Author: ul
Time: 22 February 2010, 10:35:36.97 pm
UUID: 36b59ff5-1109-1c42-bc1d-ad4b73d204a8
Ancestors: Tools-ul.190
- fix the last selected directory issue
=============== Diff against Tools-ul.190 ===============
Item was changed:
----- Method: FileList2 class>>morphicViewFileSelectorForSuffixes: (in category 'morphic ui') -----
morphicViewFileSelectorForSuffixes: aList
"Answer a morphic file-selector tool for the given suffix list."
+
+ ^self morphicViewFileSelectorForSuffixes: aList directory: self lastSelDir!
- ^ self morphicViewFileSelectorForSuffixes: aList directory: self modalFolderSelector!
Item was changed:
----- Method: FileList2>>okHit (in category 'private') -----
okHit
+
ok := true.
currentDirectorySelected
+ ifNil: [ Beeper beep ]
+ ifNotNil: [
+ self class lastSelDir: directory.
+ modalView delete ]!
- ifNil: [Beeper beep]
- ifNotNil: [modalView delete]!
Item was changed:
----- Method: FileList2 class>>lastSelDir (in category 'accessing') -----
lastSelDir
+ "Return the last selected directory or the default directory if no directory was selected so far."
+
+ ^lastSelDir ifNil: [ lastSelDir := FileDirectory default ]!
- ^ lastSelDir!
Item was changed:
----- Method: FileList2 class>>modalFolderSelector (in category 'modal dialogs') -----
modalFolderSelector
+
+ ^self modalFolderSelector: self lastSelDir
- self lastSelDir ifNil: [^self modalFolderSelector: FileDirectory default]
- ifNotNil:[^self modalFolderSelector: self lastSelDir ]
!
Item was changed:
----- Method: FileList2 class>>modalFolderSelector: (in category 'modal dialogs') -----
modalFolderSelector: aDir
| window fileModel |
window _ self morphicViewFolderSelector: aDir.
fileModel _ window model.
window openInWorld: self currentWorld extent: 300@400.
self modalLoopOn: window.
+ ^fileModel getSelectedDirectory withoutListWrapper!
- ^self lastSelDir: fileModel getSelectedDirectory withoutListWrapper!
Item was changed:
----- Method: FileList2 class>>lastSelDir: (in category 'accessing') -----
+ lastSelDir: aFileDirectory
+ "Store the last selected directory. This will be selected as default in newly opened file or folder selectors"
+
+ ^lastSelDir := aFileDirectory!
- lastSelDir: aDir
- ^ lastSelDir := aDir!