--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SVN__BranchSelectionDialog.st Wed Sep 23 18:47:18 2009 +0200
@@ -0,0 +1,228 @@
+"{ Package: 'cvut:stx/goodies/libsvn' }"
+
+"{ NameSpace: SVN }"
+
+Dialog subclass:#BranchSelectionDialog
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'SVN-UI-Dialogs'
+!
+
+!BranchSelectionDialog class methodsFor:'documentation'!
+
+documentation
+"
+ documentation to be added.
+
+ [author:]
+ Jan Vrany (janfrog@bruxa)
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+!
+
+examples
+"
+ Starting the application:
+ [exBegin]
+ SVN::BranchSelectionDialog open
+
+ [exEnd]
+
+ more examples to be added:
+ [exBegin]
+ ... add code fragment for
+ ... executable example here ...
+ [exEnd]
+"
+!
+
+history
+ "Created: / 11-04-2008 / 13:46:09 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+version_SVN
+ ^'$Id$'
+! !
+
+!BranchSelectionDialog class methodsFor:'interface specs'!
+
+contentSpec
+ "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:SVN::BranchSelectionDialog andSelector:#dialogSpec
+ SVN::BranchSelectionDialog new openInterface:#dialogSpec
+ "
+
+ <resource: #canvas>
+
+ ^
+ #(FullSpec
+ name: dialogSpec
+ window:
+ (WindowSpec
+ label: 'NewApplication'
+ name: 'NewApplication'
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 300 300)
+ )
+ component:
+ (SpecCollection
+ collection: (
+ (SelectionInListModelViewSpec
+ name: 'BranchList'
+ layout: (LayoutFrame 0 0 0 0 0 1 -25 1)
+ model: branchAspect
+ hasHorizontalScrollBar: true
+ hasVerticalScrollBar: true
+ listModel: branchesAspect
+ useIndex: false
+ highlightMode: line
+ )
+ (CheckBoxSpec
+ label: 'Show tags'
+ name: 'ShowTags'
+ layout: (LayoutFrame 0 0 -25 1 0 1 0 1)
+ initiallyDisabled: true
+ model: showTagsAspect
+ translateLabel: true
+ )
+ )
+
+ )
+ )
+
+ "Created: / 21-10-2008 / 12:37:01 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!BranchSelectionDialog methodsFor:'accessing'!
+
+answerValueSelector
+ "Superclass SVN::Dialog says that I am responsible to implement this method"
+
+ ^#branchAspect
+
+ "Created: / 19-04-2008 / 13:15:20 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+defaultTitle
+ "Superclass SVN::Dialog says that I am responsible to implement this method"
+
+ ^ 'Select branch for ' , self model package asText allItalic
+
+ "Created: / 03-10-2008 / 13:58:40 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!BranchSelectionDialog methodsFor:'aspects'!
+
+branchAspect
+ "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 ;-)"
+
+ |holder|
+
+ (holder := builder bindingAt:#branchAspect) isNil ifTrue:[
+ holder := nil asValue.
+ builder aspectAt:#branchAspect put:holder.
+"/ if your app needs to be notified of changes, uncomment one of the lines below:
+"/ holder addDependent:self.
+"/ holder onChangeSend:#branchAspectChanged to:self.
+ ].
+ ^ holder.
+
+ "Created: / 14-04-2008 / 10:55:11 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+branchesAspect
+ "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 ;-)"
+
+ |holder|
+
+ (holder := builder bindingAt:#branchesAspect) isNil ifTrue:[
+ holder := (PluggableAdaptor on: self model)
+ getBlock:[:model|
+ self showTagsAspect value
+ ifTrue:[model value branchesAndTags]
+ ifFalse:[model value branches]]
+ putBlock:[:model :value|]
+ updateBlock:[:model :aspect :value|true]
+ ].
+
+ ^ holder.
+
+ "Created: / 14-04-2008 / 10:55:11 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+canDoAcceptAspect
+
+ |holder|
+
+ (holder := builder bindingAt:#canDoAcceptAspect) isNil ifTrue:[
+ holder := (AspectAdaptor forAspect: #notNil)
+ subjectChannel: self branchAspect.
+ builder aspectAt:#canDoAcceptAspect put: holder
+ ].
+ ^ holder.
+
+ "Created: / 14-04-2008 / 11:19:21 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
+showTagsAspect
+ "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 ;-)"
+
+ |holder|
+
+ (holder := builder bindingAt:#showTagsAspect) isNil ifTrue:[
+ holder := false asValue.
+ builder aspectAt:#showTagsAspect put:holder.
+"/ if your app needs to be notified of changes, uncomment one of the lines below:
+"/ holder addDependent:self.
+ holder onChangeEvaluate:[self branchesAspect changed].
+ ].
+ ^ holder.
+
+ "Created: / 14-04-2008 / 10:55:11 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!BranchSelectionDialog methodsFor:'drag & drop'!
+
+dropObjects:aCollectionOfDropObjects in:aComponent
+ "drop manager wants to drop.
+ This is ony sent, if #canDrop: returned true.
+ Must be redefine in order for drop to work."
+
+ self shouldImplement
+
+ "Created: / 19-04-2008 / 13:15:20 / Jan Vrany <vranyj1@fel.cvut.cz>"
+! !
+
+!BranchSelectionDialog class methodsFor:'documentation'!
+
+version
+ ^ '$Header$'
+! !