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