SettingsDialog.st
branchjv
changeset 12170 6c9c4b7981ee
parent 12163 6b96be4094dd
child 12198 414e7b69ecda
--- a/SettingsDialog.st	Fri Feb 17 01:48:18 2012 +0000
+++ b/SettingsDialog.st	Wed Feb 22 09:55:48 2012 +0000
@@ -1307,6 +1307,9 @@
     ].
 
     item := self selectedItem value.
+
+    item isNil ifTrue:[ item := applicationList root ].
+
     lastSelection := item.
     noApp := (item isNil) ifTrue:true ifFalse:[item isCategory].
     self enableOK value:(noApp not).
@@ -1367,6 +1370,7 @@
     self modifiedChanged.
 
     "Modified: / 29-10-2010 / 11:51:13 / cg"
+    "Modified: / 17-02-2012 / 10:24:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 update:something with:aParameter from:changedObject
@@ -1637,6 +1641,13 @@
               translateLabel: true
               model: openSettingsFile
             )
+           (ActionButtonSpec
+              label: 'Reload'
+              name: 'Button2'
+              layout: (LayoutFrame -230 1 60 0.5 -130 1 85 0.5)
+              translateLabel: true
+              model: reloadSettingsFile
+            )
            )
          
         )
@@ -1678,6 +1689,24 @@
         openOnFileNamed:filename editing:true
 
     "Created: / 07-02-2012 / 01:08:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+reloadSettingsFile
+    | filename |
+
+    filename := UserPreferences current 
+                    at:#settingsFilename      
+                    ifAbsent:[UserPreferences defaultUserSettingsFile pathName].
+    self reloadSettingsFile: filename
+
+    "Created: / 17-02-2012 / 10:26:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+reloadSettingsFile: filename 
+
+    filename asFilename fileIn.
+
+    "Created: / 17-02-2012 / 10:27:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !SettingsDialog::SettingsFilenameAppl methodsFor:'protocol'!
@@ -1705,7 +1734,7 @@
 !SettingsDialog class methodsFor:'documentation'!
 
 version
-    ^ '$Id: SettingsDialog.st 7892 2012-02-14 20:24:28Z vranyj1 $'
+    ^ '$Id: SettingsDialog.st 7911 2012-02-22 09:55:48Z vranyj1 $'
 !
 
 version_CVS
@@ -1713,7 +1742,8 @@
 !
 
 version_SVN
-    ^ '$Id: SettingsDialog.st 7892 2012-02-14 20:24:28Z vranyj1 $'
+    ^ '$Id: SettingsDialog.st 7911 2012-02-22 09:55:48Z vranyj1 $'
 ! !
 
 SettingsDialog initialize!
+