# HG changeset patch # User Stefan Vogel # Date 1070538644 -3600 # Node ID e33aee13defea04d202ddb2e36b3f7b40a6a1b03 # Parent 1bb15bba99eedb40e50bc6ff88604b9215ca618d Use 'Discard Changes and Exit' instead of 'Forget it...' when trying to close an application with pending changes diff -r 1bb15bba99ee -r e33aee13defe UIHelpTool.st --- a/UIHelpTool.st Wed Dec 03 12:32:03 2003 +0100 +++ b/UIHelpTool.st Thu Dec 04 12:50:44 2003 +0100 @@ -12,9 +12,9 @@ "{ Package: 'stx:libtool2' }" -ToolApplicationModel subclass:#UIHelpTool - instanceVariableNames:'specClass specSelector classItemList classItemModel keyItemModel - helpTextView modifiedHolder contentsModifiedChannel editModel' +ResourceSpecEditor subclass:#UIHelpTool + instanceVariableNames:'classItemList classItemModel keyItemModel helpTextView + modifiedHolder contentsModifiedChannel editModel' classVariableNames:'' poolDictionaries:'' category:'Interface-UIPainter' @@ -103,6 +103,14 @@ ^'Help' ! ! +!UIHelpTool class methodsFor:'defaults'! + +resourceType + "get the type of the resource of the method generated by the UIHelpTool" + + ^ #help +! ! + !UIHelpTool class methodsFor:'help specs'! helpSpec @@ -859,25 +867,6 @@ !UIHelpTool methodsFor:'private'! -askForModification - "asks for modification; launch a dialog if something is modified; - returns true if the modifications are accepted by user otherwise - false. - " - |dialog| - - self modified ifTrue:[ - dialog := YesNoBox title:(resources string:'List was modified !!') - yesText:(resources string:'Forget it and proceed') - noText:(resources string:'Cancel'). - - dialog showAtPointer. - dialog accepted ifFalse:[^ false]. - self modified:false. - ]. - ^ true -! - extractResourceFrom:aString "extracts class and selector from a resource string. On success an association with the key a class and the selector as value @@ -998,10 +987,10 @@ !UIHelpTool methodsFor:'startup & release'! closeRequest - "asks for permission before closing - " - (masterApplication isNil and:[self askForModification]) ifTrue:[ - super closeRequest. + "asks for permission before closing" + + masterApplication isNil ifTrue:[ + super closeRequest. ]. ! diff -r 1bb15bba99ee -r e33aee13defe UIPainter.st --- a/UIPainter.st Wed Dec 03 12:32:03 2003 +0100 +++ b/UIPainter.st Thu Dec 04 12:50:44 2003 +0100 @@ -2563,9 +2563,9 @@ (modified or: [painter isModified or: [self helpTool modified]]) ifTrue:[ - ((YesNoBox title:(resources string:'Window Spec was modified !!')) + ((YesNoBox title:(resources string:'Window spec was modified. Exit anyway?')) noText:(resources string:'Cancel'); - yesText:(resources string:'Forget it and proceed'); + yesText:(resources string:'Discard Changes and Exit'); showAtPointer; accepted) ifFalse: [^false]. modified := false.