author | Claus Gittinger <cg@exept.de> |
Tue, 16 Jan 2018 22:26:58 +0100 | |
changeset 1183 | 8af078552bae |
parent 808 | d16dbb96c794 |
permissions | -rw-r--r-- |
745 | 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 |
" |
|
401 | 26 |
"{ Package: 'stx:libsvn' }" |
18 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
Dialog subclass:#ProgressDialog |
|
31 |
instanceVariableNames:'' |
|
745 | 32 |
classVariableNames:'CurrentQuerySignal' |
18 | 33 |
poolDictionaries:'' |
34 |
category:'SVN-UI-Dialogs' |
|
35 |
! |
|
36 |
||
745 | 37 |
!ProgressDialog 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 |
! |
|
67 |
||
68 |
example1 |
|
69 |
||
70 |
SVN::ProgressDialog |
|
71 |
! ! |
|
72 |
||
73 |
!ProgressDialog class methodsFor:'initialization'! |
|
74 |
||
75 |
initialize |
|
76 |
"Invoked at system start or when the class is dynamically loaded." |
|
77 |
||
78 |
CurrentQuerySignal := QuerySignal new |
|
79 |
||
80 |
"Modified: / 10-03-2010 / 18:38:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
81 |
! ! |
|
82 |
||
83 |
!ProgressDialog class methodsFor:'accessing'! |
|
84 |
||
85 |
current |
|
86 |
||
87 |
| current | |
|
88 |
current := CurrentQuerySignal query. |
|
89 |
current ifNil:[current := self new]. |
|
90 |
^current |
|
91 |
||
92 |
"Created: / 10-03-2010 / 18:37:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
93 |
! ! |
|
18 | 94 |
|
95 |
!ProgressDialog class methodsFor:'interface opening'! |
|
96 |
||
97 |
openOn: aBlock |
|
98 |
||
99 |
^self openOn: aBlock title: 'Working...' |
|
100 |
||
101 |
"Created: / 28-10-2008 / 14:50:25 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
102 |
! |
|
103 |
||
104 |
openOn: aBlock title: title |
|
105 |
||
106 |
^self openOn: aBlock title: title subtitle: '' |
|
107 |
||
108 |
"Created: / 28-10-2008 / 14:50:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
109 |
! |
|
110 |
||
111 |
openOn: block title: title subtitle: subtitle |
|
112 |
||
113 |
^self new |
|
114 |
model: block; |
|
115 |
title: title; |
|
116 |
subtitle: subtitle; |
|
117 |
open |
|
118 |
||
119 |
"Created: / 28-10-2008 / 14:50:03 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
120 |
"Modified: / 09-04-2009 / 14:11:37 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
121 |
! ! |
|
122 |
||
123 |
!ProgressDialog class methodsFor:'interface specs'! |
|
124 |
||
125 |
buttonsSpec |
|
126 |
"This resource specification was automatically generated |
|
127 |
by the UIPainter of ST/X." |
|
128 |
||
129 |
"Do not manually edit this!! If it is corrupted, |
|
130 |
the UIPainter may not be able to read the specification." |
|
131 |
||
132 |
" |
|
133 |
UIPainter new openOnClass:SVN::Dialog andSelector:#buttonsSpec |
|
134 |
SVN::Dialog new openInterface:#buttonsSpec |
|
135 |
" |
|
136 |
||
137 |
<resource: #canvas> |
|
138 |
||
139 |
^ |
|
140 |
#(FullSpec |
|
141 |
name: buttonsSpec |
|
142 |
window: |
|
143 |
(WindowSpec |
|
144 |
label: 'Buttons' |
|
145 |
name: 'Buttons' |
|
146 |
min: (Point 10 10) |
|
147 |
bounds: (Rectangle 0 0 400 30) |
|
148 |
) |
|
149 |
component: |
|
150 |
(SpecCollection |
|
151 |
collection: ( |
|
152 |
(HorizontalPanelViewSpec |
|
153 |
name: 'ButtonPanel' |
|
154 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
155 |
horizontalLayout: rightSpace |
|
156 |
verticalLayout: center |
|
157 |
horizontalSpace: 3 |
|
158 |
verticalSpace: 3 |
|
159 |
component: |
|
160 |
(SpecCollection |
|
161 |
collection: ( |
|
162 |
(ActionButtonSpec |
|
163 |
label: 'Cancel' |
|
164 |
name: 'CancelButton' |
|
165 |
translateLabel: true |
|
166 |
model: doCancel |
|
167 |
extent: (Point 125 22) |
|
168 |
) |
|
169 |
) |
|
170 |
||
171 |
) |
|
172 |
) |
|
173 |
) |
|
174 |
||
175 |
) |
|
176 |
) |
|
177 |
||
178 |
"Created: / 28-10-2008 / 14:53:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
179 |
! ! |
|
180 |
||
745 | 181 |
!ProgressDialog class methodsFor:'others'! |
18 | 182 |
|
745 | 183 |
version_CVS |
808
d16dbb96c794
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
745
diff
changeset
|
184 |
^ '$Header$' |
18 | 185 |
! ! |
186 |
||
187 |
!ProgressDialog methodsFor:'accessing - defaults'! |
|
188 |
||
189 |
defaultContentSpec |
|
190 |
||
191 |
||
192 |
^#progressSpec |
|
193 |
||
194 |
"Created: / 28-10-2008 / 14:51:12 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
195 |
! |
|
196 |
||
197 |
defaultTitle |
|
198 |
^'Working...' |
|
199 |
||
200 |
"Created: / 28-10-2008 / 14:55:19 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
201 |
! ! |
|
202 |
||
203 |
!ProgressDialog methodsFor:'actions'! |
|
204 |
||
205 |
doAccept |
|
206 |
||
207 |
self accept value: true |
|
208 |
||
209 |
"Created: / 19-08-2009 / 14:25:51 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
210 |
! ! |
|
211 |
||
212 |
!ProgressDialog methodsFor:'drag & drop'! |
|
213 |
||
214 |
dropObjects:aCollectionOfDropObjects in:aComponent |
|
215 |
"drop manager wants to drop. |
|
216 |
This is ony sent, if #canDrop: returned true. |
|
217 |
Must be redefine in order for drop to work." |
|
218 |
||
219 |
self shouldImplement |
|
220 |
||
221 |
"Created: / 28-10-2008 / 14:59:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
222 |
! ! |
|
223 |
||
224 |
!ProgressDialog methodsFor:'hooks'! |
|
225 |
||
226 |
postOpenWith: aUIBuilder |
|
227 |
||
228 |
self showProgressWhile: |
|
229 |
[self model value. |
|
230 |
self doAccept] |
|
231 |
||
232 |
"Created: / 28-10-2008 / 14:51:52 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
233 |
"Modified: / 19-08-2009 / 14:36:16 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
234 |
! ! |
|
235 |
||
236 |
!ProgressDialog class methodsFor:'documentation'! |
|
237 |
||
238 |
version |
|
808
d16dbb96c794
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
745
diff
changeset
|
239 |
^ '$Header$' |
216 | 240 |
! |
241 |
||
242 |
version_SVN |
|
808
d16dbb96c794
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
745
diff
changeset
|
243 |
^ '§Id: SVN__ProgressDialog.st 363 2011-08-08 13:49:48Z vranyj1 §' |
18 | 244 |
! ! |
745 | 245 |
|
246 |
ProgressDialog initialize! |