6799
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2005 eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
"{ Package: 'stx:libtool' }"
|
|
14 |
|
|
15 |
"{ NameSpace: Tools }"
|
|
16 |
|
|
17 |
SimpleDialog subclass:#CheckinInfoDialog
|
6979
|
18 |
instanceVariableNames:'descriptionHolder logMessageHolder isStableHolder tagHolder
|
|
19 |
tagItHolder quickCheckInHolder quickCheckInVisibleHolder'
|
6799
|
20 |
classVariableNames:'LastSourceLogMessage'
|
|
21 |
poolDictionaries:''
|
|
22 |
category:'System-SourceCodeManagement'
|
|
23 |
!
|
|
24 |
|
|
25 |
!CheckinInfoDialog class methodsFor:'documentation'!
|
|
26 |
|
|
27 |
copyright
|
|
28 |
"
|
|
29 |
COPYRIGHT (c) 2005 eXept Software AG
|
|
30 |
All Rights Reserved
|
|
31 |
|
|
32 |
This software is furnished under a license and may be used
|
|
33 |
only in accordance with the terms of that license and with the
|
|
34 |
inclusion of the above copyright notice. This software may not
|
|
35 |
be provided or otherwise made available to, or used by, any
|
|
36 |
other person. No title to or ownership of the software is
|
|
37 |
hereby transferred.
|
|
38 |
"
|
|
39 |
!
|
|
40 |
|
|
41 |
documentation
|
|
42 |
"
|
|
43 |
checkin-dialog.
|
|
44 |
used to be private in SourceCodeManagerUtilites.
|
|
45 |
moved to libtool because libbasic3 should not contain code inheriting from GUI classes.
|
|
46 |
|
|
47 |
[author:]
|
|
48 |
|
|
49 |
[see also:]
|
|
50 |
|
|
51 |
[instance variables:]
|
|
52 |
|
|
53 |
[class variables:]
|
|
54 |
"
|
|
55 |
! !
|
|
56 |
|
|
57 |
!CheckinInfoDialog class methodsFor:'interface specs'!
|
|
58 |
|
|
59 |
windowSpec
|
|
60 |
"This resource specification was automatically generated
|
|
61 |
by the UIPainter of ST/X."
|
|
62 |
|
|
63 |
"Do not manually edit this!! If it is corrupted,
|
|
64 |
the UIPainter may not be able to read the specification."
|
|
65 |
|
|
66 |
"
|
6979
|
67 |
UIPainter new openOnClass:Tools::CheckinInfoDialog andSelector:#windowSpec
|
|
68 |
Tools::CheckinInfoDialog new openInterface:#windowSpec
|
|
69 |
Tools::CheckinInfoDialog open
|
6799
|
70 |
"
|
|
71 |
|
|
72 |
<resource: #canvas>
|
|
73 |
|
|
74 |
^
|
|
75 |
#(FullSpec
|
|
76 |
name: windowSpec
|
|
77 |
window:
|
|
78 |
(WindowSpec
|
|
79 |
label: 'Enter Log Message'
|
|
80 |
name: 'Enter Log Message'
|
|
81 |
min: (Point 10 10)
|
6979
|
82 |
bounds: (Rectangle 0 0 563 327)
|
6799
|
83 |
)
|
|
84 |
component:
|
|
85 |
(SpecCollection
|
|
86 |
collection: (
|
|
87 |
(HorizontalPanelViewSpec
|
|
88 |
name: 'HorizontalPanel2'
|
|
89 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0)
|
|
90 |
horizontalLayout: left
|
|
91 |
verticalLayout: center
|
6979
|
92 |
horizontalSpace: 0
|
6799
|
93 |
verticalSpace: 3
|
|
94 |
component:
|
|
95 |
(SpecCollection
|
|
96 |
collection: (
|
|
97 |
(LabelSpec
|
6979
|
98 |
label: 'Enter checkIn log-message for: '
|
6799
|
99 |
name: 'Label1'
|
|
100 |
translateLabel: true
|
|
101 |
resizeForLabel: true
|
|
102 |
useDefaultExtent: true
|
|
103 |
)
|
|
104 |
(LabelSpec
|
|
105 |
name: 'Label2'
|
|
106 |
translateLabel: true
|
|
107 |
labelChannel: descriptionHolder
|
|
108 |
useDefaultExtent: true
|
|
109 |
)
|
|
110 |
)
|
|
111 |
|
|
112 |
)
|
|
113 |
)
|
|
114 |
(TextEditorSpec
|
|
115 |
name: 'TextEditor1'
|
6979
|
116 |
layout: (LayoutFrame 2 0.0 38 0 -2 1 -119 1)
|
6799
|
117 |
model: logMessageHolder
|
|
118 |
hasHorizontalScrollBar: true
|
|
119 |
hasVerticalScrollBar: true
|
|
120 |
)
|
|
121 |
(CheckBoxSpec
|
6979
|
122 |
label: 'Quick Checkin (Only Classes in ChangeSet)'
|
|
123 |
name: 'CheckInChangedOnlyCheckbox'
|
|
124 |
layout: (LayoutFrame 3 0 -114 1 -3 1 -92 1)
|
|
125 |
visibilityChannel: quickCheckInVisibleHolder
|
|
126 |
model: quickCheckInHolder
|
|
127 |
translateLabel: true
|
|
128 |
)
|
|
129 |
(CheckBoxSpec
|
|
130 |
label: 'Mark as Stable'
|
|
131 |
name: 'MarkStableCheckBox'
|
|
132 |
layout: (LayoutFrame 3 0 -87 1 -3 1 -65 1)
|
6799
|
133 |
model: isStableHolder
|
|
134 |
translateLabel: true
|
|
135 |
)
|
6979
|
136 |
(CheckBoxSpec
|
|
137 |
label: 'Tag It'
|
|
138 |
name: 'TagItCheckBox'
|
|
139 |
layout: (LayoutFrame 3 0 -60 1 0 0.5 -38 1)
|
|
140 |
model: tagItHolder
|
|
141 |
translateLabel: true
|
|
142 |
)
|
|
143 |
(LabelSpec
|
|
144 |
label: 'Tag:'
|
|
145 |
name: 'TagLabel'
|
|
146 |
layout: (LayoutFrame 1 0.25 265 0 0 0.5 287 0)
|
|
147 |
translateLabel: true
|
|
148 |
adjust: right
|
|
149 |
)
|
|
150 |
(InputFieldSpec
|
|
151 |
name: 'TagEntryField'
|
|
152 |
layout: (LayoutFrame 0 0.5 265 0 -3 1 287 0)
|
|
153 |
enableChannel: tagItInHolder
|
|
154 |
model: tagHolder
|
|
155 |
acceptOnReturn: true
|
|
156 |
acceptOnTab: true
|
|
157 |
acceptOnLostFocus: true
|
|
158 |
acceptOnPointerLeave: false
|
|
159 |
)
|
6799
|
160 |
(HorizontalPanelViewSpec
|
|
161 |
name: 'HorizontalPanel1'
|
6979
|
162 |
layout: (LayoutFrame 0 0.0 -40 1 0 1.0 0 1.0)
|
6799
|
163 |
horizontalLayout: fitSpace
|
|
164 |
verticalLayout: center
|
|
165 |
horizontalSpace: 3
|
6979
|
166 |
verticalSpace: 2
|
6799
|
167 |
component:
|
|
168 |
(SpecCollection
|
|
169 |
collection: (
|
|
170 |
(ActionButtonSpec
|
|
171 |
label: 'OK'
|
|
172 |
name: 'Button1'
|
|
173 |
translateLabel: true
|
|
174 |
model: doAccept
|
|
175 |
extent: (Point 277 22)
|
|
176 |
)
|
|
177 |
(ActionButtonSpec
|
|
178 |
label: 'Cancel'
|
|
179 |
name: 'Button2'
|
|
180 |
translateLabel: true
|
|
181 |
model: doCancel
|
|
182 |
extent: (Point 277 22)
|
|
183 |
)
|
|
184 |
)
|
|
185 |
|
|
186 |
)
|
|
187 |
)
|
|
188 |
)
|
|
189 |
|
|
190 |
)
|
|
191 |
)
|
|
192 |
! !
|
|
193 |
|
|
194 |
!CheckinInfoDialog class methodsFor:'opening'!
|
|
195 |
|
|
196 |
getCheckinInfoFor:aString initialAnswer:initialAnswer
|
6979
|
197 |
^ self getCheckinInfoFor:aString initialAnswer:initialAnswer withQuickOption:false
|
|
198 |
|
|
199 |
"
|
|
200 |
self getCheckinInfoFor:'hello' initialAnswer:'bla'
|
|
201 |
"
|
|
202 |
!
|
|
203 |
|
|
204 |
getCheckinInfoFor:aString initialAnswer:initialAnswer withQuickOption:withQuickOption
|
6799
|
205 |
|dialog|
|
|
206 |
|
|
207 |
dialog := self new.
|
6979
|
208 |
dialog
|
|
209 |
description:aString;
|
|
210 |
logMessage:initialAnswer;
|
|
211 |
withQuickOption:withQuickOption.
|
6799
|
212 |
|
|
213 |
dialog open.
|
|
214 |
dialog accepted ifFalse:[
|
|
215 |
^ nil.
|
|
216 |
].
|
|
217 |
|
|
218 |
^ dialog
|
|
219 |
|
|
220 |
|
|
221 |
"
|
|
222 |
self getCheckinInfoFor:'hello' initialAnswer:'bla'
|
|
223 |
"
|
|
224 |
! !
|
|
225 |
|
|
226 |
!CheckinInfoDialog methodsFor:'accessing'!
|
|
227 |
|
|
228 |
description
|
|
229 |
^ self descriptionHolder value
|
|
230 |
!
|
|
231 |
|
|
232 |
description:aString
|
|
233 |
self descriptionHolder value:aString
|
|
234 |
!
|
|
235 |
|
|
236 |
isStable
|
|
237 |
^ self isStableHolder value
|
|
238 |
!
|
|
239 |
|
|
240 |
isStable:aBoolean
|
|
241 |
self isStableHolder value:aBoolean
|
|
242 |
!
|
|
243 |
|
|
244 |
logMessage
|
|
245 |
^ self logMessageHolder value
|
|
246 |
!
|
|
247 |
|
|
248 |
logMessage:aString
|
|
249 |
self logMessageHolder value:aString
|
6979
|
250 |
!
|
|
251 |
|
|
252 |
quickCheckIn
|
|
253 |
^ self quickCheckInHolder value
|
|
254 |
!
|
|
255 |
|
|
256 |
quickCheckIn:aBoolean
|
|
257 |
self quickCheckInHolder value:aBoolean
|
|
258 |
!
|
|
259 |
|
|
260 |
tag
|
6990
|
261 |
^ self tagHolder value withoutSeparators
|
6979
|
262 |
!
|
|
263 |
|
|
264 |
tag:aString
|
|
265 |
self tagHolder value:aString
|
|
266 |
!
|
|
267 |
|
|
268 |
tagIt
|
|
269 |
^ self tagItHolder value
|
|
270 |
!
|
|
271 |
|
|
272 |
tagIt:aBoolean
|
|
273 |
self tagItHolder value:aBoolean
|
|
274 |
!
|
|
275 |
|
|
276 |
withQuickOption:aBoolean
|
|
277 |
^ self quickCheckInVisibleHolder value:aBoolean
|
6799
|
278 |
! !
|
|
279 |
|
|
280 |
!CheckinInfoDialog methodsFor:'aspects'!
|
|
281 |
|
|
282 |
descriptionHolder
|
|
283 |
descriptionHolder isNil ifTrue:[
|
|
284 |
descriptionHolder := ValueHolder new.
|
|
285 |
].
|
|
286 |
^ descriptionHolder
|
|
287 |
!
|
|
288 |
|
|
289 |
isStableHolder
|
|
290 |
isStableHolder isNil ifTrue:[
|
|
291 |
isStableHolder := false asValue.
|
|
292 |
].
|
|
293 |
^ isStableHolder.
|
|
294 |
!
|
|
295 |
|
|
296 |
logMessageHolder
|
|
297 |
logMessageHolder isNil ifTrue:[
|
|
298 |
logMessageHolder := LastSourceLogMessage asValue.
|
|
299 |
].
|
|
300 |
^ logMessageHolder.
|
6979
|
301 |
!
|
|
302 |
|
|
303 |
quickCheckInHolder
|
|
304 |
quickCheckInHolder isNil ifTrue:[
|
|
305 |
quickCheckInHolder := true asValue.
|
|
306 |
].
|
|
307 |
^ quickCheckInHolder
|
|
308 |
!
|
|
309 |
|
|
310 |
quickCheckInVisibleHolder
|
|
311 |
quickCheckInVisibleHolder isNil ifTrue:[
|
|
312 |
quickCheckInVisibleHolder := false asValue.
|
|
313 |
].
|
|
314 |
^ quickCheckInVisibleHolder
|
|
315 |
!
|
|
316 |
|
|
317 |
tagHolder
|
|
318 |
tagHolder isNil ifTrue:[
|
|
319 |
tagHolder := '' asValue.
|
|
320 |
].
|
|
321 |
^ tagHolder
|
|
322 |
!
|
|
323 |
|
|
324 |
tagItHolder
|
|
325 |
tagItHolder isNil ifTrue:[
|
|
326 |
tagItHolder := false asValue.
|
|
327 |
].
|
|
328 |
^ tagItHolder
|
6799
|
329 |
! !
|
|
330 |
|
|
331 |
!CheckinInfoDialog class methodsFor:'documentation'!
|
|
332 |
|
|
333 |
version
|
6990
|
334 |
^ '$Header: /cvs/stx/stx/libtool/Tools__CheckinInfoDialog.st,v 1.3 2006-08-24 22:12:36 cg Exp $'
|
6799
|
335 |
! !
|