--- a/Tools__ProjectCheckerBrowser.st Wed Mar 27 12:24:47 2013 +0000
+++ b/Tools__ProjectCheckerBrowser.st Thu Mar 28 12:24:57 2013 +0000
@@ -15,7 +15,7 @@
ApplicationModel subclass:#ProjectCheckerBrowser
instanceVariableNames:'projectCheckerHolder problemSelectionHolder problemListHolder
- infoPanel'
+ infoPanel accepted showCancel'
classVariableNames:''
poolDictionaries:''
category:'System-Support-Projects'
@@ -78,7 +78,7 @@
(WindowSpec
label: 'Package Issues'
name: 'Package Issues'
- bounds: (Rectangle 0 0 581 370)
+ bounds: (Rectangle 0 0 581 467)
)
component:
(SpecCollection
@@ -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:
)
)
@@ -140,11 +139,11 @@
)
)
- handles: (Any 0.5 1.0)
+ handles: (Any 0.421052631578947 1.0)
)
(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 <jan.vrany@fit.cvut.cz>"
+!
+
+showCancel
+ ^ showCancel ? false
+!
+
+showCancel:something
+ showCancel := something.
! !
!ProjectCheckerBrowser methodsFor:'actions'!
+doCancel
+ <resource: #uiCallback>
+
+ accepted := false.
+ AbortSignal raiseRequest
+!
+
doCheckAgain
<resource: #uiCallback>
@@ -253,6 +293,10 @@
"Created: / 09-02-2012 / 19:23:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+infoText
+ ^ resources string:'Select a problem in the above list to get detail information and a hint for repair'.
+!
+
problemDescriptionAspect
<resource: #uiAspect>
@@ -261,42 +305,42 @@
(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 <jan.vrany@fit.cvut.cz>"
!
+problemDescriptionTextHolder
+ <resource: #uiAspect>
+
+ |holder|
+
+ (holder := builder bindingAt:#problemDescriptionTextHolder) isNil ifTrue:[
+ holder := ValueHolder with:(self infoText).
+ builder aspectAt:#problemDescriptionTextHolder put:holder.
+ ].
+ ^ holder.
+!
+
problemListHolder
<resource: #uiAspect>
-
-
problemListHolder isNil ifTrue:[
-"/ problemListHolder := ValueHolder new.
- problemListHolder := AspectAdaptor forAspect: #value.
- problemListHolder subjectSendsUpdates: true.
+ problemListHolder := ValueHolder new.
].
^ problemListHolder.
- "Modified (format): / 13-09-2012 / 17:26:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 13-02-2012 / 18:47:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
problemSelectionHolder
<resource: #uiAspect>
- "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.
!
@@ -332,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."
@@ -346,9 +397,9 @@
updateFromProjectCheckerHolder
- self problemListHolder subject: self projectChecker problems.
+ self problemListHolder value: self projectChecker problems.
- "Modified: / 13-09-2012 / 17:34:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 25-07-2012 / 18:01:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ProjectCheckerBrowser methodsFor:'hooks'!
@@ -364,19 +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.3 2013-03-27 19:30:07 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectCheckerBrowser.st,v 1.1 2012-07-26 11:59:59 vrany Exp $'
-!
-
-version_HG
-
- ^ '$Changeset: <not expanded> $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__ProjectCheckerBrowser.st,v 1.3 2013-03-27 19:30:07 cg Exp $'
!
version_SVN
- ^ '§Id: Tools__ProjectCheckerBrowser.st 8024 2012-07-26 10:10:37Z vranyj1 §'
+ ^ 'Id: Tools__ProjectCheckerBrowser.st 8024 2012-07-26 10:10:37Z vranyj1 '
! !