diff -r 2ddd00171375 -r 329a570a3fbf Tools__ProjectCheckerBrowser.st --- a/Tools__ProjectCheckerBrowser.st Wed Mar 27 11:58:35 2013 +0100 +++ b/Tools__ProjectCheckerBrowser.st Wed Mar 27 12:59:37 2013 +0100 @@ -15,7 +15,7 @@ ApplicationModel subclass:#ProjectCheckerBrowser instanceVariableNames:'projectCheckerHolder problemSelectionHolder problemListHolder - infoPanel' + infoPanel accepted showCancel' classVariableNames:'' poolDictionaries:'' category:'System-Support-Projects' @@ -127,10 +127,9 @@ name: 'Description' layout: (LayoutFrame 0 0 0 0 0 1 0 1) level: 0 - visibilityChannel: rationaleVisibleHolder hasHorizontalScrollBar: true hasVerticalScrollBar: true - htmlText: problemDescriptionAspect + htmlText: problemDescriptionTextHolder postBuildCallback: setupHTMLView: ) ) @@ -144,7 +143,7 @@ ) (HorizontalPanelViewSpec name: 'ButtonPanel' - layout: (LayoutFrame 0 0 -30 1 0 1 0 1) + layout: (LayoutFrame 0 0 -30 1 -16 1 0 1) horizontalLayout: fit verticalLayout: center horizontalSpace: 3 @@ -157,18 +156,36 @@ name: 'CheckAgain' translateLabel: true model: doCheckAgain - extent: (Point 289 22) + extent: (Point 139 22) ) (ActionButtonSpec label: 'Close' name: 'CloseButton' + visibilityChannel: doNotShowCancel translateLabel: true model: doClose - extent: (Point 289 22) + extent: (Point 139 22) + ) + (ActionButtonSpec + label: 'Done' + name: 'Button1' + visibilityChannel: showCancel + translateLabel: true + model: doClose + extent: (Point 139 22) + ) + (ActionButtonSpec + label: 'Cancel' + name: 'Button2' + visibilityChannel: showCancel + translateLabel: true + model: doCancel + extent: (Point 139 22) ) ) ) + keepSpaceForOSXResizeHandleH: true ) ) @@ -178,6 +195,14 @@ !ProjectCheckerBrowser methodsFor:'accessing'! +accepted + ^ accepted ? true +! + +doNotShowCancel + ^ self showCancel not +! + problemList: problems self problemListHolder value: problems @@ -197,10 +222,25 @@ self projectCheckerHolder value: value "Created: / 13-02-2012 / 17:03:23 / Jan Vrany " +! + +showCancel + ^ showCancel ? false +! + +showCancel:something + showCancel := something. ! ! !ProjectCheckerBrowser methodsFor:'actions'! +doCancel + + + accepted := false. + AbortSignal raiseRequest +! + doCheckAgain @@ -253,6 +293,10 @@ "Created: / 09-02-2012 / 19:23:51 / Jan Vrany " ! +infoText + ^ resources string:'Select a problem in the above list to get detail information and a hint for repair'. +! + problemDescriptionAspect @@ -261,27 +305,30 @@ (holder := builder bindingAt:#problemDescriptionAspect) isNil ifTrue:[ holder := (AspectAdaptor forAspect: #descriptionAndFixes) subjectChannel: self problemSelectionHolder. + builder aspectAt:#problemDescriptionAspect put:holder. ]. ^ holder. "Modified: / 26-07-2012 / 09:44:29 / Jan Vrany " ! +problemDescriptionTextHolder + + + |holder| + + (holder := builder bindingAt:#problemDescriptionTextHolder) isNil ifTrue:[ + holder := ValueHolder with:(self infoText). + builder aspectAt:#problemDescriptionTextHolder put:holder. + ]. + ^ holder. +! + problemListHolder - "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 ;-)" - problemListHolder isNil ifTrue:[ problemListHolder := ValueHolder new. -"/ if your app needs to be notified of changes, uncomment one of the lines below: -"/ problemListHolder addDependent:self. -"/ problemListHolder onChangeSend:#problemListHolderChanged to:self. ]. ^ problemListHolder. @@ -291,18 +338,9 @@ problemSelectionHolder - "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 ;-)" - problemSelectionHolder isNil ifTrue:[ problemSelectionHolder := ValueHolder new. -"/ if your app needs to be notified of changes, uncomment one of the lines below: -"/ problemSelectionHolder addDependent:self. -"/ problemSelectionHolder onChangeSend:#problemSelectionHolderChanged to:self. + problemSelectionHolder onChangeSend:#problemSelectionChanged to:self. ]. ^ problemSelectionHolder. ! @@ -338,6 +376,13 @@ !ProjectCheckerBrowser methodsFor:'change & update'! +problemSelectionChanged + self problemDescriptionTextHolder value: + (self problemSelectionHolder value notNil + ifTrue:[self problemDescriptionAspect value] + ifFalse:[self infoText]) +! + update:something with:aParameter from:changedObject "Invoked when an object that I depend upon sends a change notification." @@ -370,13 +415,14 @@ !ProjectCheckerBrowser class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectCheckerBrowser.st,v 1.1 2012-07-26 11:59:59 vrany Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectCheckerBrowser.st,v 1.2 2013-03-27 11:59:37 cg Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectCheckerBrowser.st,v 1.1 2012-07-26 11:59:59 vrany Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectCheckerBrowser.st,v 1.2 2013-03-27 11:59:37 cg Exp $' ! version_SVN ^ '§Id: Tools__ProjectCheckerBrowser.st 8024 2012-07-26 10:10:37Z vranyj1 §' ! ! +