SettingsDialog.st
branchjv
changeset 12148 c675c7212c87
parent 12147 5f1d0885c1bc
child 12149 76b2dad0df76
--- a/SettingsDialog.st	Tue Feb 07 01:13:19 2012 +0000
+++ b/SettingsDialog.st	Tue Feb 07 12:43:56 2012 +0000
@@ -1584,54 +1584,6 @@
     ^ self applicationClass isNil
 ! !
 
-!SettingsDialog::SettingsFilenameAppl 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:SettingsDialog::SettingsFilenameAppl andSelector:#windowSpec
-     SettingsDialog::SettingsFilenameAppl new openInterface:#windowSpec
-     SettingsDialog::SettingsFilenameAppl open
-    "
-
-    <resource: #canvas>
-
-    ^ 
-     #(FullSpec
-        name: windowSpec
-        window: 
-       (WindowSpec
-          label: 'Settings File'
-          name: 'Settings File'
-          min: (Point 10 10)
-          bounds: (Rectangle 0 0 300 300)
-        )
-        component: 
-       (SpecCollection
-          collection: (
-           (LabelSpec
-              label: 'Preferences are stored in file:'
-              name: 'Label1'
-              layout: (LayoutFrame 0 0 -30 0.5 0 1 0 0.5)
-              translateLabel: true
-            )
-           (LinkButtonSpec
-              label: 'LinkButton'
-              name: 'EditPreferences'
-              layout: (LayoutFrame 0 0 0 0.5 0 1 30 0.5)
-              translateLabel: true
-              labelChannel: settingsFilenameAspect
-            )
-           )
-         
-        )
-      )
-! !
 
 !SettingsDialog::SettingsFilenameAppl methodsFor:'aspects'!
 
@@ -1643,14 +1595,25 @@
                     at:#settingsFilename      
                     ifAbsent:[UserPreferences defaultUserSettingsFile pathName].
     ^filename asText
-        colorizeAllWith: Color blue;
-        actionForAll:[ self openSettingsFile: filename ].
+"/        colorizeAllWith: Color blue;
+"/        actionForAll:[ self openSettingsFile: filename ].
 
     "Created: / 07-02-2012 / 01:08:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !SettingsDialog::SettingsFilenameAppl methodsFor:'private'!
 
+openSettingsFile
+    | filename |
+
+    filename := UserPreferences current 
+                    at:#settingsFilename      
+                    ifAbsent:[UserPreferences defaultUserSettingsFile pathName].
+    self openSettingsFile: filename
+
+    "Created: / 07-02-2012 / 11:15:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 openSettingsFile: filename 
 
     UserPreferences current fileBrowserClass
@@ -1684,7 +1647,7 @@
 !SettingsDialog class methodsFor:'documentation'!
 
 version
-    ^ '$Id: SettingsDialog.st 7874 2012-02-07 01:13:19Z vranyj1 $'
+    ^ '$Id: SettingsDialog.st 7875 2012-02-07 12:43:56Z vranyj1 $'
 !
 
 version_CVS
@@ -1692,7 +1655,7 @@
 !
 
 version_SVN
-    ^ '$Id: SettingsDialog.st 7874 2012-02-07 01:13:19Z vranyj1 $'
+    ^ '$Id: SettingsDialog.st 7875 2012-02-07 12:43:56Z vranyj1 $'
 ! !
 
 SettingsDialog initialize!