--- a/AbstractLauncherApplication.st Thu Nov 19 10:10:23 2015 +0000
+++ b/AbstractLauncherApplication.st Fri Nov 20 06:48:55 2015 +0100
@@ -4096,7 +4096,7 @@
box := ListSelectionBox title:(resources at:'LANG_MSG' default:'Select a Language') withCRs.
box label:(resources string:'Language Selection').
box list:languageList.
- box initialText:(Language , '-' , LanguageTerritory).
+ box initialText:(Smalltalk language , '-' , Smalltalk languageTerritory).
box action:[:newLanguage |
WindowGroup activeGroup withWaitCursorDo:[
|fontPref idx language oldLanguage territory enc
--- a/AbstractSettingsApplication.st Thu Nov 19 10:10:23 2015 +0000
+++ b/AbstractSettingsApplication.st Fri Nov 20 06:48:55 2015 +0100
@@ -21,6 +21,14 @@
category:'Interface-Smalltalk'
!
+AbstractSettingsApplication subclass:#AllSettingsAppl
+ instanceVariableNames:'buildDirectory localBuild selectedCompiler usedCompilerForBuild
+ selectedSettingHolder settingsList'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:AbstractSettingsApplication
+!
+
AbstractSettingsApplication subclass:#BuildSettingsAppl
instanceVariableNames:'buildDirectory localBuild selectedCompiler usedCompilerForBuild'
classVariableNames:''
@@ -913,6 +921,303 @@
^ settingsDialog getNameOfApplication:self.
! !
+!AbstractSettingsApplication::AllSettingsAppl class methodsFor:'documentation'!
+
+documentation
+"
+ this little app provides an alternative view on all settings keys.
+ This offers a name-list of settings values, and thus allows for
+ settings to be changed for which no 'real' UI has been programmed.
+ (i.e. a fallback for missing things)
+"
+! !
+
+!AbstractSettingsApplication::AllSettingsAppl class methodsFor:'help specs'!
+
+flyByHelpSpec
+ "This resource specification was automatically generated
+ by the UIHelpTool of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIHelpTool may not be able to read the specification."
+
+ "
+ UIHelpTool openOnClass:AbstractSettingsApplication::ByteCodeCompilerSettingsAppl
+ "
+
+ <resource: #help>
+
+ ^ super flyByHelpSpec addPairsFrom: self helpPairs
+!
+
+helpPairs
+ "This resource specification was automatically generated
+ by the UIHelpTool of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIHelpTool may not be able to read the specification."
+
+ "
+ UIHelpTool openOnClass:AbstractSettingsApplication::ByteCodeCompilerSettingsAppl
+ "
+
+ <resource: #help>
+
+ ^ #(
+
+
+)
+! !
+
+!AbstractSettingsApplication::AllSettingsAppl class methodsFor:'image specs'!
+
+defaultIcon
+ <resource: #programImage>
+
+ ^ super defaultIcon
+! !
+
+!AbstractSettingsApplication::AllSettingsAppl class methodsFor:'interface specs'!
+
+windowSpec
+ "This resource specification was automatically generated
+ by the UIPainter of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIPainter may not be able to read the specification."
+
+ "
+ UIPainter new openOnClass:AbstractSettingsApplication::AllSettingsAppl andSelector:#windowSpec
+ AbstractSettingsApplication::AllSettingsAppl new openInterface:#windowSpec
+ AbstractSettingsApplication::AllSettingsAppl open
+ "
+
+ <resource: #canvas>
+
+ ^
+ #(FullSpec
+ name: windowSpec
+ window:
+ (WindowSpec
+ label: 'All Settings'
+ name: 'All Settings'
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 659 242)
+ )
+ component:
+ (SpecCollection
+ collection: (
+ (DataSetSpec
+ name: 'Table1'
+ layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+ model: selectedSettingHolder
+ hasHorizontalScrollBar: true
+ hasVerticalScrollBar: true
+ dataList: settingsList
+ columns:
+ (OrderedCollection
+
+ (DataSetColumnSpec
+ label: 'Name'
+ labelButtonType: Button
+ height: heightOfFirstRow
+ model: key
+ menuFromApplication: false
+ )
+ (DataSetColumnSpec
+ label: 'Value'
+ labelButtonType: Button
+ height: heightOfFirstRow
+ model: value
+ menuFromApplication: false
+ )
+ )
+ )
+ )
+
+ )
+ )
+! !
+
+!AbstractSettingsApplication::AllSettingsAppl methodsFor:'actions'!
+
+basicReadSettings
+ super basicReadSettings.
+
+ usedCompilerForBuild value isNil ifTrue:[
+ currentUserPrefs usedCompilerForBuild:(Tools::ProjectBuilder defaultUsedCompiler).
+ usedCompilerForBuild value:(Tools::ProjectBuilder defaultUsedCompiler).
+ ].
+
+ "Modified: / 26-07-2012 / 23:16:52 / cg"
+!
+
+basicSaveSettings
+ |buildDir|
+
+ buildDir := buildDirectory value.
+ buildDir notEmptyOrNil ifTrue:[
+ buildDir := buildDir asFilename.
+ buildDir isDirectory ifFalse:[
+ (Dialog confirm:(resources
+ stringWithCRs:'Build directory %1 does not exist.\\Create?'
+ with:buildDir pathName allBold))
+ ifTrue:[
+ buildDir makeDirectory.
+ ]
+ ].
+ ].
+
+ super basicSaveSettings.
+
+ "Modified: / 22-01-2012 / 10:50:09 / cg"
+!
+
+cleanupBuildDirectory
+ |buildDir|
+
+ buildDir := buildDirectory value.
+ buildDir isEmptyOrNil ifTrue:[
+ ^ self.
+ ].
+ buildDir := buildDir asFilename.
+ (buildDir exists and:[Dialog confirm:('Really delete <1p> ?' expandMacrosWith:buildDir physicalPathName)]) ifTrue:[
+ buildDir recursiveRemove.
+ buildDir makeDirectory.
+ ].
+! !
+
+!AbstractSettingsApplication::AllSettingsAppl methodsFor:'aspects'!
+
+aspects
+ ^ #(
+ buildDirectory
+ localBuild
+ usedCompilerForBuild
+ )
+!
+
+buildDirectory
+ buildDirectory isNil ifTrue:[
+ buildDirectory := ValueHolder new.
+ buildDirectory onChangeSend:#updateModifiedChannel to:self
+ ].
+ ^ buildDirectory.
+!
+
+fetchSettingsList
+ |list|
+
+ list := List new.
+ UserPreferences selectorsAndMethodsDo:[:sel :mthd|
+ |setter getter getterMethod|
+
+ sel numArgs == 1 ifTrue:[
+ (sel endsWith:$:) ifTrue:[
+ setter := sel.
+ getter := sel copyButLast asSymbolIfInterned.
+ getter notNil ifTrue:[
+ (UserPreferences implements:getter) ifTrue:[
+ getterMethod := UserPreferences compiledMethodAt:getter.
+ getterMethod isObsolete ifFalse:[
+ list add:(sel -> (UserPreferences current perform:getter)).
+ ].
+ ].
+ ].
+ ].
+ ].
+ ].
+ list sortBySelector:#key.
+ ^ list
+!
+
+hasSourceCodeManager
+ ^ SourceCodeManager notNil
+!
+
+listOfPossibleCompilers
+ ^ Tools::ProjectBuilder listOfPossibleCompilers
+
+ "Created: / 21-01-2012 / 14:05:43 / cg"
+!
+
+localBuild
+ localBuild isNil ifTrue:[
+ localBuild := UserPreferences current localBuild asValue.
+ localBuild onChangeSend:#updateModifiedChannel to:self
+ ].
+ ^ localBuild.
+!
+
+selectedSettingHolder
+ <resource: #uiAspect>
+
+ "automatically generated by UIPainter ..."
+
+ "*** the code below creates a default model when invoked."
+ "*** (which may not be the one you wanted)"
+ "*** Please change as required and accept it in the browser."
+ "*** (and replace this comment by something more useful ;-)"
+
+ selectedSettingHolder isNil ifTrue:[
+ selectedSettingHolder := ValueHolder new.
+"/ if your app needs to be notified of changes, uncomment one of the lines below:
+"/ selectedSettingHolder addDependent:self.
+"/ selectedSettingHolder onChangeSend:#selectedSettingHolderChanged to:self.
+ ].
+ ^ selectedSettingHolder.
+!
+
+settingsList
+ <resource: #uiAspect>
+
+ "automatically generated by UIPainter ..."
+
+ "*** the code below creates a default model when invoked."
+ "*** (which may not be the one you wanted)"
+ "*** Please change as required and accept it in the browser."
+ "*** (and replace this comment by something more useful ;-)"
+
+ settingsList isNil ifTrue:[
+ settingsList := self fetchSettingsList.
+
+ ].
+ ^ settingsList.
+!
+
+usedCompilerForBuild
+ usedCompilerForBuild isNil ifTrue:[
+ usedCompilerForBuild := nil asValue.
+ usedCompilerForBuild onChangeSend:#updateModifiedChannel to:self
+ ].
+ ^ usedCompilerForBuild.
+
+ "Created: / 22-01-2012 / 10:59:30 / cg"
+! !
+
+!AbstractSettingsApplication::AllSettingsAppl methodsFor:'help'!
+
+helpFilename
+ ^ 'Launcher/buildSetup.html'
+! !
+
+!AbstractSettingsApplication::AllSettingsAppl methodsFor:'initialization'!
+
+postBuildDirectoryField:aField
+ aField historyList value:(Array
+ with:(OperatingSystem getHomeDirectory asFilename construct:'stx_build') pathName
+ with:(Filename currentDirectory construct:'stx_build') pathName)
+! !
+
+!AbstractSettingsApplication::AllSettingsAppl methodsFor:'queries'!
+
+hasUnsavedChanges
+ (super hasUnsavedChanges) ifTrue:[^ true].
+ ^ false
+
+ "Modified: / 22-01-2012 / 10:50:15 / cg"
+! !
+
!AbstractSettingsApplication::BuildSettingsAppl class methodsFor:'help specs'!
flyByHelpSpec
@@ -6538,8 +6843,8 @@
readLanguagesFile := rsc notNil and:[(rsc at:#languageFileExists ifAbsent:false) == true].
listOfLanguageKeys do:[:eachLang |
- savedLanguage := Language.
- savedLanguageTerritory := LanguageTerritory.
+ savedLanguage := Smalltalk language.
+ savedLanguageTerritory := Smalltalk languageTerritory.
readLanguagesFile ifFalse:[
ResourcePack flushCachedResourcePacks.
].
@@ -6552,8 +6857,7 @@
terr := lang copyFrom:4.
lang := lang copyTo:2.
].
- Language := lang asSymbol.
- LanguageTerritory := terr asSymbol.
+ Smalltalk setLanguage:lang asSymbol territory:terr asSymbol.
readLanguagesFile ifTrue:[
rsc := ResourcePack forPackage:'stx:libtool' resourceFileName:'languages.rs' cached:false.
] ifFalse:[
@@ -6561,8 +6865,7 @@
].
perLanguageResources at:eachLang asSymbol put:rsc.
] ensure:[
- Language := savedLanguage.
- LanguageTerritory := savedLanguageTerritory.
+ Smalltalk setLanguage:savedLanguage territory:savedLanguageTerritory.
].
].
readLanguagesFile ifFalse:[
@@ -6704,23 +7007,26 @@
!
currentLanguageIndex
- | langIdx |
-
- (Language ~= LanguageTerritory) ifTrue:[
- langIdx := listOfLanguages indexOf:(Language , '-' , LanguageTerritory) ifAbsent:nil.
- ].
- langIdx isNil ifTrue:[
- langIdx := listOfLanguages indexOf:Language ifAbsent:nil.
+ | lang terr langIdx |
+
+ lang := Smalltalk language.
+ terr := Smalltalk languageTerritory.
+
+ (lang ~= terr) ifTrue:[
+ langIdx := listOfLanguages indexOf:(lang , '-' , terr) ifAbsent:nil.
].
langIdx isNil ifTrue:[
- langIdx := listOfLanguages indexOf:'en' ifAbsent:nil.
- langIdx isNil ifTrue:[
- langIdx := listOfLanguages indexOf:'en-us' ifAbsent:nil.
-
- langIdx isNil ifTrue:[
- langIdx := 1.
- ]
- ]
+ langIdx := listOfLanguages indexOf:lang ifAbsent:nil.
+ ].
+ langIdx isNil ifTrue:[
+ langIdx := listOfLanguages indexOf:'en' ifAbsent:nil.
+ langIdx isNil ifTrue:[
+ langIdx := listOfLanguages indexOf:'en-us' ifAbsent:nil.
+
+ langIdx isNil ifTrue:[
+ langIdx := 1.
+ ]
+ ]
].
^ langIdx
!
--- a/FileBrowserV2UISpecifications.st Thu Nov 19 10:10:23 2015 +0000
+++ b/FileBrowserV2UISpecifications.st Fri Nov 20 06:48:55 2015 +0100
@@ -304,7 +304,7 @@
(LabelSpec
label: 'Bar Width:'
name: 'BarWidthLabel'
- layout: (AlignmentOrigin 88 0 13 0 1 0.5)
+ layout: (AlignmentOrigin 100 0 13 0 1 0.5)
activeHelpKey: barWidth
translateLabel: true
resizeForLabel: true
@@ -312,7 +312,7 @@
)
(InputFieldSpec
name: 'BarWidthField'
- layout: (LayoutFrame 90 0 0 0 140 0 22 0)
+ layout: (LayoutFrame 100 0 0 0 140 0 22 0)
activeHelpKey: barWidth
tabable: true
model: barWidth
@@ -340,9 +340,9 @@
acceptOnPointerLeave: false
)
(LabelSpec
- label: 'Show Handles:'
+ label: 'Show:'
name: 'ShowHandlesLabel'
- layout: (LayoutFrame 0 0 28 0 105 0 47 0)
+ layout: (LayoutFrame 0 0 28 0 100 0 47 0)
activeHelpKey: showHandle
translateLabel: true
resizeForLabel: true
@@ -351,7 +351,7 @@
(PopUpListSpec
label: 'Default'
name: 'ShowHandlesPopUpList'
- layout: (LayoutFrame 107 0 28 0 225 0 47 0)
+ layout: (LayoutFrame 100 0 28 0 225 0 47 0)
activeHelpKey: showHandle
translateLabel: true
resizeForLabel: true
@@ -361,26 +361,6 @@
useIndex: true
)
(LabelSpec
- label: 'Snap Mode:'
- name: 'SnapLabel'
- layout: (LayoutFrame 0 0 54 0 105 0 76 0)
- activeHelpKey: snapMode
- translateLabel: true
- adjust: right
- )
- (PopUpListSpec
- label: 'none'
- name: 'SnapModePopUpList'
- layout: (LayoutFrame 107 0 54 0 225 0 75 0)
- activeHelpKey: snapMode
- translateLabel: true
- adjust: center
- tabable: true
- model: snapModeIdx
- menu: snapModeList
- useIndex: true
- )
- (LabelSpec
label: 'Position:'
name: 'HandlePositionLabel'
layout: (AlignmentOrigin 293 0 38 0 1 0.5)
@@ -401,6 +381,26 @@
menu: handlePositionList
useIndex: true
)
+ (LabelSpec
+ label: 'Snap Mode:'
+ name: 'SnapLabel'
+ layout: (LayoutFrame 0 0 54 0 100 0 76 0)
+ activeHelpKey: snapMode
+ translateLabel: true
+ adjust: right
+ )
+ (PopUpListSpec
+ label: 'none'
+ name: 'SnapModePopUpList'
+ layout: (LayoutFrame 100 0 54 0 225 0 75 0)
+ activeHelpKey: snapMode
+ translateLabel: true
+ adjust: center
+ tabable: true
+ model: snapModeIdx
+ menu: snapModeList
+ useIndex: true
+ )
)
)
@@ -408,16 +408,16 @@
(FramedBoxSpec
label: 'Visibility'
name: 'FramedBox1'
- layout: (LayoutFrame 0 0.0 287 0 0 1.0 371 0)
+ layout: (LayoutFrame 0 0.0 287 0 0 1.0 376 0)
labelPosition: topLeft
translateLabel: true
component:
(SpecCollection
collection: (
(LabelSpec
- label: 'orientation:'
+ label: 'Orientation:'
name: 'orientation'
- layout: (AlignmentOrigin 85 0 13 0 1 0.5)
+ layout: (AlignmentOrigin 100 0 13 0 1 0.5)
activeHelpKey: borderWidth
translateLabel: true
resizeForLabel: true
@@ -425,7 +425,7 @@
)
(ComboListSpec
name: 'orientationList'
- layout: (LayoutFrame 85 0 2 0 194 0 24 0)
+ layout: (LayoutFrame 100 0 2 0 194 0 24 0)
model: orientation
comboList: orientationList
useIndex: false
@@ -446,9 +446,16 @@
comboList: whichViewList
useIndex: false
)
+ (LabelSpec
+ label: 'Visibility:'
+ name: 'visibilityLabel'
+ layout: (AlignmentOrigin 100 0 40 0 1 0.5)
+ translateLabel: true
+ resizeForLabel: true
+ )
(InputFieldSpec
name: 'visibility'
- layout: (LayoutFrame 85 0 29 0 0 1.0 51 0)
+ layout: (LayoutFrame 100 0 29 0 0 1.0 51 0)
activeHelpKey: canvas
model: visibility
group: inputGroup
@@ -456,13 +463,6 @@
modifiedChannel: modifiedChannel
acceptOnPointerLeave: false
)
- (LabelSpec
- label: 'visibility:'
- name: 'visibilityLabel'
- layout: (AlignmentOrigin 85 0 40 0 1 0.5)
- translateLabel: true
- resizeForLabel: true
- )
)
)
--- a/InspectorView.st Thu Nov 19 10:10:23 2015 +0000
+++ b/InspectorView.st Fri Nov 20 06:48:55 2015 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -3158,7 +3156,7 @@
!
derivedFields
- "the check below is not sufficient - if someone catches messages, for example.
+ "the check below is not sufficient - if some proxy catches messages, for example.
Therefore, we do a manual lookup here:"
(object class whichClassIncludesSelector:#inspectorExtraAttributes) isNil ifTrue:[
--- a/Tools__NewSystemBrowser.st Thu Nov 19 10:10:23 2015 +0000
+++ b/Tools__NewSystemBrowser.st Fri Nov 20 06:48:55 2015 +0100
@@ -44346,7 +44346,7 @@
].
self selectedProtocolMethodsDo:[:cls :protocol :sel :methodToCopyOrMove |
- |question msg selectorToCopyOrMove dontDoIt newMethod|
+ |question msg selectorToCopyOrMove dontDoIt newMethod newPackage|
"/ skip the version method (to avoid confusing the repository)
((AbstractSourceCodeManager isVersionMethodSelector:sel) and:[newClass isMeta]) ifFalse:[
@@ -44366,6 +44366,25 @@
dontDoIt ifFalse:[
lastMethodMoveClass := newClassName.
+ "/ check if the target class is in a different package;
+ "/ ask for the package if so
+ newClass package ~= methodToCopyOrMove package ifTrue:[
+ newPackage := OptionBox
+ request:(resources stringWithCRs:'Destination class %1 is in package "%2";\Source method %3 is in package "%4".\\If you choose "%2", it will be a regular method of the class,\if you choose "%4", it will be an extension method.\\Put copied method into which package?'
+ with:newClass name allBold
+ with:newClass package allBold
+ with:methodToCopyOrMove selector allBold
+ with:methodToCopyOrMove package allBold)
+ label:(resources string:'Package Confirmation')
+ image:nil
+ buttonLabels:{ newClass package . methodToCopyOrMove package . PackageId noProjectID . (resources string:'Cancel') }
+ values:{ newClass package . methodToCopyOrMove package . PackageId noProjectID . nil }
+ default:newClass package
+ onCancel:nil.
+ newPackage isNil ifTrue:[^ self].
+ "/ self halt.
+ ].
+
changes notNil ifTrue:[
changes
compile: (methodToCopyOrMove source)
@@ -44390,7 +44409,14 @@
] ifFalse:[
(methodToCopyOrMove mclass) removeSelector:selectorToCopyOrMove.
]
- ]
+ ].
+ newPackage notNil ifTrue:[
+ changes notNil ifTrue:[
+ changes changeProjectOf:selectorToCopyOrMove in:newClass to:newPackage
+ ] ifFalse:[
+ newMethod package:newPackage.
+ ].
+ ].
]
]
]