author | Claus Gittinger <cg@exept.de> |
Fri, 18 Nov 2016 16:14:26 +0100 | |
changeset 1180 | 92753f6cc822 |
parent 862 | 9bba459ff219 |
permissions | -rw-r--r-- |
754 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany |
|
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
4 |
||
5 |
Permission is hereby granted, free of charge, to any person |
|
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
25 |
" |
|
457 | 26 |
"{ Package: 'stx:libsvn' }" |
88 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
Dialog subclass:#CredentialsDialog |
|
31 |
instanceVariableNames:'savePasswordHolder' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'SVN-UI-Dialogs' |
|
35 |
! |
|
36 |
||
754 | 37 |
!CredentialsDialog class methodsFor:'documentation'! |
38 |
||
39 |
copyright |
|
40 |
" |
|
41 |
Copyright (c) 2007-2010 Jan Vrany |
|
42 |
Copyright (c) 2009-2010 eXept Software AG |
|
43 |
||
44 |
Permission is hereby granted, free of charge, to any person |
|
45 |
obtaining a copy of this software and associated documentation |
|
46 |
files (the 'Software'), to deal in the Software without |
|
47 |
restriction, including without limitation the rights to use, |
|
48 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
49 |
copies of the Software, and to permit persons to whom the |
|
50 |
Software is furnished to do so, subject to the following |
|
51 |
conditions: |
|
52 |
||
53 |
The above copyright notice and this permission notice shall be |
|
54 |
included in all copies or substantial portions of the Software. |
|
55 |
||
56 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
57 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
58 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
59 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
60 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
61 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
62 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
63 |
OTHER DEALINGS IN THE SOFTWARE. |
|
64 |
||
65 |
" |
|
66 |
! ! |
|
88 | 67 |
|
68 |
!CredentialsDialog class methodsFor:'interface specs'! |
|
69 |
||
70 |
contentSpec |
|
71 |
"This resource specification was automatically generated |
|
72 |
by the UIPainter of ST/X." |
|
73 |
||
74 |
"Do not manually edit this!! If it is corrupted, |
|
75 |
the UIPainter may not be able to read the specification." |
|
76 |
||
77 |
" |
|
78 |
UIPainter new openOnClass:SVN::CredentialsDialog andSelector:#dialogSpec |
|
79 |
SVN::CredentialsDialog new openInterface:#dialogSpec |
|
80 |
" |
|
81 |
||
82 |
<resource: #canvas> |
|
83 |
||
84 |
^ |
|
85 |
#(FullSpec |
|
86 |
name: dialogSpec |
|
87 |
window: |
|
88 |
(WindowSpec |
|
89 |
label: 'Dialog' |
|
90 |
name: 'Dialog' |
|
91 |
min: (Point 10 10) |
|
92 |
bounds: (Rectangle 0 0 424 345) |
|
93 |
) |
|
94 |
component: |
|
95 |
(SpecCollection |
|
96 |
collection: ( |
|
97 |
(LabelSpec |
|
98 |
label: 'Username:' |
|
99 |
name: 'UsernameLabel' |
|
100 |
layout: (LayoutFrame 0 0 -34 0.5 100 0 -14 0.5) |
|
101 |
translateLabel: true |
|
102 |
adjust: right |
|
103 |
) |
|
104 |
(InputFieldSpec |
|
105 |
name: 'Username' |
|
106 |
layout: (LayoutFrame 110 0 -40 0.5 -5 1 -15 0.5) |
|
107 |
model: usernameAspect |
|
108 |
immediateAccept: true |
|
109 |
acceptOnReturn: true |
|
110 |
acceptOnTab: true |
|
111 |
acceptOnLostFocus: true |
|
112 |
acceptOnPointerLeave: false |
|
113 |
) |
|
114 |
(LabelSpec |
|
115 |
label: 'Password:' |
|
116 |
name: 'PasswordLabel' |
|
117 |
layout: (LayoutFrame 0 0 0 0.5 100 0 25 0.5) |
|
118 |
translateLabel: true |
|
119 |
adjust: right |
|
120 |
) |
|
121 |
(InputFieldSpec |
|
122 |
name: 'Password' |
|
123 |
layout: (LayoutFrame 110 0 -5 0.5 -5 1 20 0.5) |
|
124 |
model: passwordAspect |
|
125 |
type: password |
|
126 |
immediateAccept: true |
|
127 |
acceptOnReturn: true |
|
128 |
acceptOnTab: true |
|
129 |
acceptOnLostFocus: true |
|
130 |
acceptOnPointerLeave: false |
|
131 |
) |
|
132 |
(CheckBoxSpec |
|
133 |
label: 'Save password' |
|
134 |
name: 'SavePassword' |
|
135 |
layout: (LayoutFrame 110 0 25 0.5 -5 1 55 0.5) |
|
136 |
model: savePasswordHolder |
|
137 |
translateLabel: true |
|
138 |
) |
|
139 |
) |
|
140 |
||
141 |
) |
|
142 |
) |
|
143 |
||
144 |
"Created: / 21-10-2008 / 12:37:21 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
145 |
! ! |
|
146 |
||
754 | 147 |
!CredentialsDialog class methodsFor:'others'! |
88 | 148 |
|
754 | 149 |
version_CVS |
862
9bba459ff219
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
754
diff
changeset
|
150 |
^ '$Header$' |
754 | 151 |
! ! |
88 | 152 |
|
754 | 153 |
!CredentialsDialog methodsFor:'accessing'! |
88 | 154 |
|
155 |
savePassword |
|
156 |
"return the value in 'savePasswordHolder'" |
|
157 |
||
158 |
^ self savePasswordHolder value |
|
159 |
||
160 |
"Created: / 03-10-2008 / 14:39:00 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
161 |
! |
|
162 |
||
163 |
savePassword: newValue |
|
164 |
"set the value in 'savePasswordHolder'" |
|
165 |
||
166 |
self savePasswordHolder value: newValue |
|
167 |
||
168 |
"Created: / 03-10-2008 / 14:39:00 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
169 |
! ! |
|
170 |
||
171 |
!CredentialsDialog methodsFor:'accessing - defaults'! |
|
172 |
||
173 |
defaultModel |
|
174 |
"Superclass SVN::Dialog says that I am responsible to implement this method" |
|
175 |
||
176 |
^Credentials new |
|
177 |
||
178 |
"Created: / 03-10-2008 / 14:58:09 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
179 |
! |
|
180 |
||
181 |
defaultTitle |
|
182 |
"Superclass SVN::Dialog says that I am responsible to implement this method" |
|
183 |
||
184 |
^'Credentials' |
|
185 |
||
186 |
"Created: / 03-10-2008 / 13:58:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
187 |
! ! |
|
188 |
||
189 |
!CredentialsDialog methodsFor:'aspects'! |
|
190 |
||
191 |
passwordAspect |
|
192 |
||
193 |
^(AspectAdaptor forAspect: #password) |
|
194 |
subjectChannel: self modelHolder |
|
195 |
||
196 |
"Created: / 03-10-2008 / 14:56:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
197 |
! |
|
198 |
||
199 |
savePasswordHolder |
|
200 |
"return/create the valueHolder 'savePasswordHolder'" |
|
201 |
||
202 |
savePasswordHolder isNil ifTrue:[ |
|
203 |
savePasswordHolder := ValueHolder with:true "defaultValue here". |
|
204 |
]. |
|
205 |
^ savePasswordHolder |
|
206 |
||
207 |
"Created: / 03-10-2008 / 14:39:00 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
208 |
! |
|
209 |
||
210 |
usernameAspect |
|
211 |
||
212 |
^(AspectAdaptor forAspect: #username) |
|
213 |
subjectChannel: self modelHolder; |
|
214 |
onChangeSend: #usernameChanged to: self; |
|
215 |
yourself |
|
216 |
||
217 |
"Created: / 03-10-2008 / 14:56:31 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
218 |
! ! |
|
219 |
||
220 |
!CredentialsDialog methodsFor:'change & update'! |
|
221 |
||
222 |
usernameChanged |
|
754 | 223 |
self acceptEnabled:(self usernameAspect value isNilOrEmptyCollection not) |
88 | 224 |
! ! |
225 |
||
226 |
!CredentialsDialog methodsFor:'hooks'! |
|
227 |
||
228 |
commonPostOpen |
|
229 |
||
230 |
self usernameChanged |
|
231 |
||
232 |
"Created: / 03-10-2008 / 17:57:32 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
233 |
! ! |
|
234 |
||
235 |
!CredentialsDialog class methodsFor:'documentation'! |
|
236 |
||
237 |
version |
|
862
9bba459ff219
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
754
diff
changeset
|
238 |
^ '$Header$' |
190 | 239 |
! |
240 |
||
241 |
version_SVN |
|
862
9bba459ff219
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
754
diff
changeset
|
242 |
^ '§Id: SVN__CredentialsDialog.st 363 2011-08-08 13:49:48Z vranyj1 §' |
88 | 243 |
! ! |