author | Claus Gittinger <cg@exept.de> |
Mon, 18 Sep 2006 15:10:15 +0200 | |
changeset 7179 | 8229aa65d96b |
parent 7110 | 86a7ea1388a1 |
child 7591 | 61cf0097b5dc |
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 |
||
13 |
"{ Package: 'stx:libtool' }" |
|
14 |
||
15 |
"{ NameSpace: Tools }" |
|
16 |
||
17 |
SimpleDialog subclass:#CheckinInfoDialog |
|
6979 | 18 |
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
|
19 |
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 |
|
7179 | 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' |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
116 |
layout: (LayoutFrame 2 0.0 38 0 -2 1 -101 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' |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
124 |
layout: (LayoutFrame 3 0 -95 1 -3 1 -73 1) |
6979 | 125 |
visibilityChannel: quickCheckInVisibleHolder |
126 |
model: quickCheckInHolder |
|
127 |
translateLabel: true |
|
128 |
) |
|
129 |
(CheckBoxSpec |
|
130 |
label: 'Mark as Stable' |
|
131 |
name: 'MarkStableCheckBox' |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
132 |
layout: (LayoutFrame 3 0 -68 1 -3 1 -46 1) |
6799 | 133 |
model: isStableHolder |
134 |
translateLabel: true |
|
135 |
) |
|
6979 | 136 |
(InputFieldSpec |
137 |
name: 'TagEntryField' |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
138 |
layout: (LayoutFrame 0 0.5 -68 1 -3 1 -46 1) |
6979 | 139 |
enableChannel: tagItInHolder |
140 |
model: tagHolder |
|
141 |
acceptOnReturn: true |
|
142 |
acceptOnTab: true |
|
143 |
acceptOnLostFocus: true |
|
144 |
acceptOnPointerLeave: false |
|
145 |
) |
|
6799 | 146 |
(HorizontalPanelViewSpec |
147 |
name: 'HorizontalPanel1' |
|
6979 | 148 |
layout: (LayoutFrame 0 0.0 -40 1 0 1.0 0 1.0) |
6799 | 149 |
horizontalLayout: fitSpace |
150 |
verticalLayout: center |
|
151 |
horizontalSpace: 3 |
|
6979 | 152 |
verticalSpace: 2 |
6799 | 153 |
component: |
154 |
(SpecCollection |
|
155 |
collection: ( |
|
156 |
(ActionButtonSpec |
|
157 |
label: 'OK' |
|
158 |
name: 'Button1' |
|
159 |
translateLabel: true |
|
160 |
model: doAccept |
|
161 |
extent: (Point 277 22) |
|
162 |
) |
|
163 |
(ActionButtonSpec |
|
164 |
label: 'Cancel' |
|
165 |
name: 'Button2' |
|
166 |
translateLabel: true |
|
167 |
model: doCancel |
|
168 |
extent: (Point 277 22) |
|
169 |
) |
|
170 |
) |
|
171 |
||
172 |
) |
|
173 |
) |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
174 |
(LabelSpec |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
175 |
label: 'Tag:' |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
176 |
name: 'Label3' |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
177 |
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
|
178 |
translateLabel: true |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
179 |
adjust: right |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
180 |
) |
6799 | 181 |
) |
182 |
||
183 |
) |
|
184 |
) |
|
185 |
! ! |
|
186 |
||
187 |
!CheckinInfoDialog class methodsFor:'opening'! |
|
188 |
||
189 |
getCheckinInfoFor:aString initialAnswer:initialAnswer |
|
6979 | 190 |
^ self getCheckinInfoFor:aString initialAnswer:initialAnswer withQuickOption:false |
191 |
||
192 |
" |
|
193 |
self getCheckinInfoFor:'hello' initialAnswer:'bla' |
|
194 |
" |
|
195 |
! |
|
196 |
||
197 |
getCheckinInfoFor:aString initialAnswer:initialAnswer withQuickOption:withQuickOption |
|
6799 | 198 |
|dialog| |
199 |
||
200 |
dialog := self new. |
|
6979 | 201 |
dialog |
202 |
description:aString; |
|
203 |
logMessage:initialAnswer; |
|
204 |
withQuickOption:withQuickOption. |
|
6799 | 205 |
|
206 |
dialog open. |
|
207 |
dialog accepted ifFalse:[ |
|
208 |
^ nil. |
|
209 |
]. |
|
210 |
||
211 |
^ dialog |
|
212 |
||
213 |
||
214 |
" |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
215 |
self getCheckinInfoFor:'hello' initialAnswer:'bla' |
6799 | 216 |
" |
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
217 |
|
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
218 |
"Modified: / 12-09-2006 / 14:07:43 / cg" |
6799 | 219 |
! ! |
220 |
||
221 |
!CheckinInfoDialog methodsFor:'accessing'! |
|
222 |
||
223 |
description |
|
224 |
^ self descriptionHolder value |
|
225 |
! |
|
226 |
||
227 |
description:aString |
|
7179 | 228 |
self descriptionHolder value:aString allBold |
6799 | 229 |
! |
230 |
||
231 |
isStable |
|
232 |
^ self isStableHolder value |
|
233 |
! |
|
234 |
||
235 |
isStable:aBoolean |
|
236 |
self isStableHolder value:aBoolean |
|
237 |
! |
|
238 |
||
239 |
logMessage |
|
240 |
^ self logMessageHolder value |
|
241 |
! |
|
242 |
||
243 |
logMessage:aString |
|
244 |
self logMessageHolder value:aString |
|
6979 | 245 |
! |
246 |
||
247 |
quickCheckIn |
|
248 |
^ self quickCheckInHolder value |
|
249 |
! |
|
250 |
||
251 |
quickCheckIn:aBoolean |
|
252 |
self quickCheckInHolder value:aBoolean |
|
253 |
! |
|
254 |
||
255 |
tag |
|
6990 | 256 |
^ self tagHolder value withoutSeparators |
6979 | 257 |
! |
258 |
||
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
259 |
tag:aStringOrNil |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
260 |
self tagHolder value:aStringOrNil |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
261 |
|
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
262 |
"Modified: / 12-09-2006 / 12:03:50 / cg" |
6979 | 263 |
! |
264 |
||
265 |
tagIt |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
266 |
^ self tag notEmptyOrNil |
6979 | 267 |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
268 |
"Created: / 12-09-2006 / 13:06:49 / cg" |
6979 | 269 |
! |
270 |
||
271 |
withQuickOption:aBoolean |
|
272 |
^ self quickCheckInVisibleHolder value:aBoolean |
|
6799 | 273 |
! ! |
274 |
||
275 |
!CheckinInfoDialog methodsFor:'aspects'! |
|
276 |
||
277 |
descriptionHolder |
|
278 |
descriptionHolder isNil ifTrue:[ |
|
279 |
descriptionHolder := ValueHolder new. |
|
280 |
]. |
|
281 |
^ descriptionHolder |
|
282 |
! |
|
283 |
||
284 |
isStableHolder |
|
285 |
isStableHolder isNil ifTrue:[ |
|
286 |
isStableHolder := false asValue. |
|
287 |
]. |
|
288 |
^ isStableHolder. |
|
289 |
! |
|
290 |
||
291 |
logMessageHolder |
|
292 |
logMessageHolder isNil ifTrue:[ |
|
293 |
logMessageHolder := LastSourceLogMessage asValue. |
|
294 |
]. |
|
295 |
^ logMessageHolder. |
|
6979 | 296 |
! |
297 |
||
298 |
quickCheckInHolder |
|
299 |
quickCheckInHolder isNil ifTrue:[ |
|
300 |
quickCheckInHolder := true asValue. |
|
301 |
]. |
|
302 |
^ quickCheckInHolder |
|
303 |
! |
|
304 |
||
305 |
quickCheckInVisibleHolder |
|
306 |
quickCheckInVisibleHolder isNil ifTrue:[ |
|
307 |
quickCheckInVisibleHolder := false asValue. |
|
308 |
]. |
|
309 |
^ quickCheckInVisibleHolder |
|
310 |
! |
|
311 |
||
312 |
tagHolder |
|
313 |
tagHolder isNil ifTrue:[ |
|
314 |
tagHolder := '' asValue. |
|
315 |
]. |
|
316 |
^ tagHolder |
|
6799 | 317 |
! ! |
318 |
||
319 |
!CheckinInfoDialog class methodsFor:'documentation'! |
|
320 |
||
321 |
version |
|
7179 | 322 |
^ '$Header: /cvs/stx/stx/libtool/Tools__CheckinInfoDialog.st,v 1.6 2006-09-18 13:10:15 cg Exp $' |
6799 | 323 |
! ! |