author | Stefan Vogel <sv@exept.de> |
Tue, 21 Jun 2011 16:58:26 +0200 | |
changeset 612 | dbfd0498d09a |
parent 483 | 3289d0027819 |
permissions | -rw-r--r-- |
483 | 1 |
"{ Package: 'stx:libsvn' }" |
23 | 2 |
|
3 |
"{ NameSpace: SVN }" |
|
4 |
||
5 |
Dialog subclass:#RepositoryConfigurationDialog |
|
6 |
instanceVariableNames:'packageHolder urlHolder' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'SVN-UI-Dialogs' |
|
10 |
! |
|
11 |
||
12 |
||
13 |
!RepositoryConfigurationDialog class methodsFor:'help specs'! |
|
14 |
||
15 |
helpSpec |
|
16 |
"This resource specification was automatically generated |
|
17 |
by the UIHelpTool of ST/X." |
|
18 |
||
19 |
"Do not manually edit this!! If it is corrupted, |
|
20 |
the UIHelpTool may not be able to read the specification." |
|
21 |
||
22 |
" |
|
23 |
UIHelpTool openOnClass:SVN::RepositoryConfigurationDialog |
|
24 |
" |
|
25 |
||
26 |
<resource: #help> |
|
27 |
||
28 |
^ super helpSpec addPairsFrom:#( |
|
29 |
||
30 |
#Package |
|
31 |
'Package name may contain wild cards: \ * matches any text\ # matches any character\ [...] matches set of characters' |
|
32 |
||
33 |
#URL |
|
34 |
'Repository url. Following variables are expanded\ %p - full package name (ex: ''stx/goodies/libsvn'')' |
|
35 |
||
36 |
) |
|
37 |
! ! |
|
38 |
||
39 |
!RepositoryConfigurationDialog class methodsFor:'interface specs'! |
|
40 |
||
41 |
contentSpec |
|
42 |
"This resource specification was automatically generated |
|
43 |
by the UIPainter of ST/X." |
|
44 |
||
45 |
"Do not manually edit this!! If it is corrupted, |
|
46 |
the UIPainter may not be able to read the specification." |
|
47 |
||
48 |
" |
|
49 |
UIPainter new openOnClass:SVN::RepositoryConfigurationDialog andSelector:#contentSpec |
|
50 |
SVN::RepositoryConfigurationDialog new openInterface:#contentSpec |
|
51 |
" |
|
52 |
||
53 |
<resource: #canvas> |
|
54 |
||
55 |
^ |
|
56 |
#(FullSpec |
|
57 |
name: contentSpec |
|
58 |
window: |
|
59 |
(WindowSpec |
|
60 |
label: 'Repository configuration' |
|
61 |
name: 'Repository configuration' |
|
62 |
min: (Point 10 10) |
|
63 |
bounds: (Rectangle 0 0 647 345) |
|
64 |
) |
|
65 |
component: |
|
66 |
(SpecCollection |
|
67 |
collection: ( |
|
68 |
(TransparentBoxSpec |
|
69 |
name: 'Content' |
|
70 |
layout: (LayoutFrame 0 0 -30 0.5 0 1 30 0.5) |
|
71 |
component: |
|
72 |
(SpecCollection |
|
73 |
collection: ( |
|
74 |
(LabelSpec |
|
75 |
label: 'Package:' |
|
76 |
name: 'PackageLabel' |
|
77 |
layout: (LayoutFrame 0 0 15 0 120 0 35 0) |
|
78 |
translateLabel: true |
|
79 |
adjust: right |
|
80 |
) |
|
81 |
(InputFieldSpec |
|
82 |
name: 'Package' |
|
83 |
layout: (LayoutFrame 122 0 5 0 -2 1 30 0) |
|
84 |
activeHelpKey: Package |
|
85 |
enableChannel: svnEnabledAspect |
|
86 |
model: packageHolder |
|
87 |
immediateAccept: false |
|
88 |
acceptOnReturn: true |
|
89 |
acceptOnTab: true |
|
90 |
acceptOnLostFocus: true |
|
91 |
modifiedChannel: modifiedChannel |
|
92 |
acceptOnPointerLeave: true |
|
93 |
valueChangeCallBackSelector: validate |
|
94 |
) |
|
95 |
(LabelSpec |
|
96 |
label: 'Repository URL:' |
|
97 |
name: 'URLLabel' |
|
98 |
layout: (LayoutFrame 0 0 47 0 120 0 62 0) |
|
99 |
translateLabel: true |
|
100 |
adjust: right |
|
101 |
) |
|
102 |
(InputFieldSpec |
|
103 |
name: 'URL' |
|
104 |
layout: (LayoutFrame 122 0 37 0 0 1 62 0) |
|
105 |
activeHelpKey: URL |
|
106 |
enableChannel: svnEnabledAspect |
|
107 |
model: urlHolder |
|
108 |
immediateAccept: false |
|
109 |
acceptOnReturn: true |
|
110 |
acceptOnTab: true |
|
111 |
acceptOnLostFocus: true |
|
112 |
modifiedChannel: modifiedChannel |
|
113 |
acceptOnPointerLeave: true |
|
114 |
valueChangeCallBackSelector: validate |
|
115 |
) |
|
116 |
) |
|
117 |
||
118 |
) |
|
119 |
) |
|
120 |
) |
|
121 |
||
122 |
) |
|
123 |
) |
|
124 |
! ! |
|
125 |
||
126 |
!RepositoryConfigurationDialog methodsFor:'accessing'! |
|
127 |
||
128 |
answerValueSelector |
|
129 |
||
130 |
^#model |
|
131 |
||
132 |
"Modified: / 16-08-2009 / 11:54:10 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
133 |
! |
|
134 |
||
135 |
package |
|
136 |
||
137 |
^self packageHolder value |
|
138 |
||
139 |
"Created: / 16-08-2009 / 17:19:39 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
140 |
! |
|
141 |
||
142 |
url |
|
143 |
||
144 |
^self urlHolder value |
|
145 |
||
146 |
"Created: / 16-08-2009 / 17:02:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
147 |
! ! |
|
148 |
||
149 |
!RepositoryConfigurationDialog methodsFor:'accessing - defaults'! |
|
150 |
||
151 |
defaultModel |
|
152 |
||
153 |
^RepositoryConfiguration new |
|
154 |
||
155 |
"Created: / 16-08-2009 / 16:02:43 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
156 |
! |
|
157 |
||
158 |
defaultTitle |
|
159 |
||
160 |
^'Repository configuration' |
|
161 |
||
162 |
"Created: / 03-10-2008 / 13:58:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
163 |
"Modified: / 16-08-2009 / 16:12:12 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
164 |
! ! |
|
165 |
||
166 |
!RepositoryConfigurationDialog methodsFor:'actions'! |
|
167 |
||
168 |
doAccept |
|
169 |
||
170 |
self canDoAccept ifFalse:[^self]. |
|
171 |
self model |
|
172 |
package: self package; |
|
173 |
url: self url. |
|
174 |
super doAccept. |
|
175 |
||
176 |
"Created: / 16-08-2009 / 17:02:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
177 |
! ! |
|
178 |
||
179 |
!RepositoryConfigurationDialog methodsFor:'aspects'! |
|
180 |
||
181 |
packageHolder |
|
182 |
<resource: #uiAspect> |
|
183 |
||
184 |
"automatically generated by UIPainter ..." |
|
185 |
||
186 |
"*** the code below creates a default model when invoked." |
|
187 |
"*** (which may not be the one you wanted)" |
|
188 |
"*** Please change as required and accept it in the browser." |
|
189 |
"*** (and replace this comment by something more useful ;-)" |
|
190 |
||
191 |
packageHolder isNil ifTrue:[ |
|
192 |
packageHolder := ValueHolder new. |
|
193 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
194 |
"/ packageHolder addDependent:self. |
|
195 |
"/ packageHolder onChangeSend:#packageHolderChanged to:self. |
|
196 |
]. |
|
197 |
^ packageHolder. |
|
198 |
! |
|
199 |
||
200 |
urlHolder |
|
201 |
<resource: #uiAspect> |
|
202 |
||
203 |
"automatically generated by UIPainter ..." |
|
204 |
||
205 |
"*** the code below creates a default model when invoked." |
|
206 |
"*** (which may not be the one you wanted)" |
|
207 |
"*** Please change as required and accept it in the browser." |
|
208 |
"*** (and replace this comment by something more useful ;-)" |
|
209 |
||
210 |
urlHolder isNil ifTrue:[ |
|
211 |
urlHolder := ValueHolder new. |
|
212 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
213 |
"/ urlHolder addDependent:self. |
|
214 |
"/ urlHolder onChangeSend:#urlHolderChanged to:self. |
|
215 |
]. |
|
216 |
^ urlHolder. |
|
217 |
! ! |
|
218 |
||
219 |
!RepositoryConfigurationDialog methodsFor:'validation'! |
|
220 |
||
221 |
validate |
|
222 |
| url | |
|
223 |
||
224 |
[url := self url. |
|
225 |
url |
|
226 |
ifNil: |
|
227 |
[^self canDoAccept: false] |
|
228 |
ifNotNil: |
|
229 |
[url := url asURL. |
|
230 |
url isValidSvnRepositoryUrl |
|
231 |
ifFalse:[^self canDoAccept: false] |
|
232 |
ifTrue:[self urlHolder setValue: url printString]]. |
|
233 |
self canDoAccept: true. |
|
612
dbfd0498d09a
Rename SVN::Error to SVN::SvnError for stc compatibility
Stefan Vogel <sv@exept.de>
parents:
483
diff
changeset
|
234 |
] on: SvnError do: |
23 | 235 |
[self canDoAccept: false]. |
236 |
||
237 |
"Created: / 16-08-2009 / 16:25:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
238 |
! ! |
|
239 |
||
240 |
!RepositoryConfigurationDialog class methodsFor:'documentation'! |
|
241 |
||
242 |
version |
|
243 |
^ '$Header$' |
|
180 | 244 |
! |
245 |
||
246 |
version_CVS |
|
247 |
^ '$Header$' |
|
248 |
! |
|
249 |
||
250 |
version_SVN |
|
278
b664de08d3e5
update #version_SVN with § as keyword expansion character
fm
parents:
180
diff
changeset
|
251 |
^'§Id: SVN__RepositoryConfigurationDialog.st 107 2009-08-16 17:21:27Z vranyj1 §' |
23 | 252 |
! ! |