AbstractSettingsApplication.st
changeset 4324 289972d3e455
parent 4319 1cfd366098a2
child 4327 076dfc82d0ed
--- a/AbstractSettingsApplication.st	Tue Nov 26 16:57:45 2002 +0100
+++ b/AbstractSettingsApplication.st	Tue Nov 26 17:59:01 2002 +0100
@@ -123,13 +123,6 @@
 	privateIn:AbstractSettingsApplication
 !
 
-AbstractSettingsApplication subclass:#PlainSettingsAppl
-	instanceVariableNames:'modifiedChannel'
-	classVariableNames:''
-	poolDictionaries:''
-	privateIn:AbstractSettingsApplication
-!
-
 AbstractSettingsApplication subclass:#PrinterSettingsAppl
 	instanceVariableNames:'modifiedChannel selectedUnit supportsColor topMargin rightMargin
 		bottomMargin landscape pageFormatList pageFormat unitList
@@ -194,30 +187,36 @@
     ^ AbstractLauncherApplication classResources
 ! !
 
-!AbstractSettingsApplication methodsFor:'actions'!
+!AbstractSettingsApplication methodsFor:'protocol'!
+
+help
+
+    self subclassResponsibility.
+"/    self warn:'no help available here'.
+"/    self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/keyboardSetting.html'].
+!
 
 loadRequest
 
-    self subclassResponsibility
+    self subclassResponsibility.
+"/    self modifiedChannel value:false.
 !
 
 saveRequest
 
-    self subclassResponsibility
-! !
-
-!AbstractSettingsApplication methodsFor:'queries'!
-
-isNotPartOfSettinsDialog
-
-    ^ self isPartOfSettinsDialog not
-!
-
-isPartOfSettinsDialog
-
-    | masterApplication |
-    masterApplication := self masterApplication.
-    ^ masterApplication notNil and:[ masterApplication class == AbstractLauncherApplication::SettingsDialog].
+    self subclassResponsibility.
+"/    | result |
+"/
+"/    (self hasUnsavedChanges) ifTrue:[
+"/        result := self confirmWithCancel:(resources string:'Save changed Settings ?'). 
+"/        result isNil ifTrue:[ ^ false].
+"/        result ifTrue:[
+"/            self saveSettings.
+"/        ] ifFalse:[
+"/            self loadRequest.
+"/        ]
+"/    ].
+"/    ^ true
 ! !
 
 !AbstractSettingsApplication::CompilerSettingsAppl class methodsFor:'defaults'!
@@ -577,14 +576,6 @@
 
 !AbstractSettingsApplication::CompilerSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -1405,14 +1396,6 @@
 
 !AbstractSettingsApplication::DisplaySettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -1914,14 +1897,6 @@
 
 !AbstractSettingsApplication::EditSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -2478,14 +2453,6 @@
     ]
 !
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -3133,14 +3100,6 @@
 
 !AbstractSettingsApplication::HTTPServerSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -3566,14 +3525,6 @@
 
 !AbstractSettingsApplication::KbdMappingSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -3939,14 +3890,6 @@
 
 !AbstractSettingsApplication::LanguageSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 doubleClick:aEntry
 
     self saveSettings.
@@ -4701,14 +4644,6 @@
 
 !AbstractSettingsApplication::MemorySettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -5119,14 +5054,6 @@
 
 !AbstractSettingsApplication::MiscCommunicationSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -5489,14 +5416,6 @@
 
 !AbstractSettingsApplication::MiscSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -6023,14 +5942,6 @@
 
 !AbstractSettingsApplication::OsiSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -6338,143 +6249,6 @@
         self osiCMISEMessageLogging value ~= OSI::CMISE messageLogging]]])
 ! !
 
-!AbstractSettingsApplication::PlainSettingsAppl 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::PlainSettingsAppl andSelector:#windowSpec
-     AbstractSettingsApplication::PlainSettingsAppl new openInterface:#windowSpec
-     AbstractSettingsApplication::PlainSettingsAppl open
-    "
-
-    <resource: #canvas>
-
-    ^ 
-     #(#FullSpec
-        #name: #windowSpec
-        #window: 
-       #(#WindowSpec
-          #label: 'Settings'
-          #name: 'Settings'
-          #min: #(#Point 10 10)
-          #max: #(#Point 1024 768)
-          #bounds: #(#Rectangle 16 42 616 592)
-        )
-        #component: 
-       #(#SpecCollection
-          #collection: #()
-        )
-      )
-! !
-
-!AbstractSettingsApplication::PlainSettingsAppl methodsFor:'actions'!
-
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
-evaluateModified
-
-    self modifiedChannel value:(self hasUnsavedChanges).
-!
-
-help
-
-    self warn:'no help available here'.
-"/    self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/keyboardSetting.html'].
-!
-
-loadRequest
-
-    self modifiedChannel value:false.
-!
-
-saveRequest
-    | result |
-
-    (self hasUnsavedChanges) ifTrue:[
-        result := self confirmWithCancel:(resources string:'Save changed Settings ?'). 
-        result isNil ifTrue:[ ^ false].
-        result ifTrue:[
-            self saveSettings.
-        ] ifFalse:[
-            self loadRequest.
-        ]
-    ].
-    ^ true
-!
-
-saveSettings
-
-    self hasUnsavedChanges ifTrue:[
-        self modifiedChannel value:false.
-    ].
-! !
-
-!AbstractSettingsApplication::PlainSettingsAppl methodsFor:'aspects'!
-
-modifiedChannel
-
-    modifiedChannel isNil ifTrue:[
-        modifiedChannel := false asValue.
-    ].
-    ^ modifiedChannel
-! !
-
-!AbstractSettingsApplication::PlainSettingsAppl methodsFor:'change & update'!
-
-update:something with:aParameter from:changedObject
-    "Invoked when an object that I depend upon sends a change notification."
-
-    "stub code automatically generated - please change as required"
-
-"/    changedObject == self allOfThem ifTrue:[
-"/        ^ self.
-"/    ].
-
-    super update:something with:aParameter from:changedObject
-! !
-
-!AbstractSettingsApplication::PlainSettingsAppl methodsFor:'initialization & release'!
-
-initialize
-
-    resources := self class owningClass classResources.
-    super initialize
-!
-
-postOpen
-!
-
-postOpenAsSubcanvasWith:aBuilder
-
-    self postOpen.
-    ^ super postOpenAsSubcanvasWith:aBuilder
-!
-
-postOpenWith:aBuilder
-
-    self postOpen.
-    ^ super postOpenWith:aBuilder
-! !
-
-!AbstractSettingsApplication::PlainSettingsAppl methodsFor:'queries'!
-
-hasUnsavedChanges
-
-    ^ true
-! !
-
 !AbstractSettingsApplication::PrinterSettingsAppl class methodsFor:'image specs'!
 
 defaultIcon
@@ -6809,14 +6583,6 @@
 
 !AbstractSettingsApplication::PrinterSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -7408,14 +7174,6 @@
 
 !AbstractSettingsApplication::RDoItServerSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -8057,14 +7815,6 @@
     self withWaitCursorDo:[ AbstractSourceCodeManager condenseSourceCache ]
 !
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -8568,14 +8318,6 @@
 
 !AbstractSettingsApplication::StyleSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -8934,14 +8676,6 @@
 
 !AbstractSettingsApplication::SystemMessageSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -9214,14 +8948,6 @@
 
 !AbstractSettingsApplication::ToolsSettingsAppl methodsFor:'actions'!
 
-doCancel
-
-    self isPartOfSettinsDialog ifTrue:[
-        self loadRequest.
-    ].
-    self closeRequest.
-!
-
 evaluateModified
 
     self modifiedChannel value:(self hasUnsavedChanges).
@@ -9392,5 +9118,5 @@
 !AbstractSettingsApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.8 2002-11-26 15:55:42 penk Exp $'
-! !
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.9 2002-11-26 16:59:01 penk Exp $'
+! !