author | Claus Gittinger <cg@exept.de> |
Sat, 07 Nov 2009 16:56:29 +0100 | |
changeset 9223 | b0d2f67899b5 |
parent 9161 | e4761f8c188d |
child 9508 | 6ecac35f25b6 |
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 |
|
9161
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
119 |
hasKeyboardFocusInitially: false |
6799 | 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 |
9161
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
147 |
name: 'ButtonPanel1' |
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 |
9161
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
153 |
reverseOrderIfOKAtLeft: true |
6799 | 154 |
component: |
155 |
(SpecCollection |
|
156 |
collection: ( |
|
157 |
(ActionButtonSpec |
|
9161
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
158 |
label: 'Cancel' |
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
159 |
name: 'Button2' |
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
160 |
translateLabel: true |
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
161 |
model: doCancel |
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
162 |
extent: (Point 277 22) |
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
163 |
) |
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
164 |
(ActionButtonSpec |
6799 | 165 |
label: 'OK' |
166 |
name: 'Button1' |
|
167 |
translateLabel: true |
|
168 |
model: doAccept |
|
169 |
extent: (Point 277 22) |
|
170 |
) |
|
171 |
) |
|
172 |
||
173 |
) |
|
174 |
) |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
175 |
(LabelSpec |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
176 |
label: 'Tag:' |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
177 |
name: 'Label3' |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
178 |
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
|
179 |
translateLabel: true |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
180 |
adjust: right |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
181 |
) |
6799 | 182 |
) |
183 |
||
184 |
) |
|
185 |
) |
|
186 |
! ! |
|
187 |
||
188 |
!CheckinInfoDialog class methodsFor:'opening'! |
|
189 |
||
190 |
getCheckinInfoFor:aString initialAnswer:initialAnswer |
|
6979 | 191 |
^ self getCheckinInfoFor:aString initialAnswer:initialAnswer withQuickOption:false |
192 |
||
193 |
" |
|
194 |
self getCheckinInfoFor:'hello' initialAnswer:'bla' |
|
195 |
" |
|
196 |
! |
|
197 |
||
8766
f9af1c29b401
comment/format in: #getCheckinInfoFor:initialAnswer:withQuickOption:
Claus Gittinger <cg@exept.de>
parents:
7592
diff
changeset
|
198 |
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswer withQuickOption:withQuickOption |
6799 | 199 |
|dialog| |
200 |
||
201 |
dialog := self new. |
|
6979 | 202 |
dialog |
8766
f9af1c29b401
comment/format in: #getCheckinInfoFor:initialAnswer:withQuickOption:
Claus Gittinger <cg@exept.de>
parents:
7592
diff
changeset
|
203 |
description:aClassNameOrPackageNameString; |
6979 | 204 |
logMessage:initialAnswer; |
205 |
withQuickOption:withQuickOption. |
|
6799 | 206 |
|
207 |
dialog open. |
|
208 |
dialog accepted ifFalse:[ |
|
209 |
^ nil. |
|
210 |
]. |
|
211 |
||
212 |
^ dialog |
|
213 |
||
214 |
||
215 |
" |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
216 |
self getCheckinInfoFor:'hello' initialAnswer:'bla' |
6799 | 217 |
" |
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
218 |
|
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
219 |
"Modified: / 12-09-2006 / 14:07:43 / cg" |
6799 | 220 |
! ! |
221 |
||
222 |
!CheckinInfoDialog methodsFor:'accessing'! |
|
223 |
||
224 |
description |
|
225 |
^ self descriptionHolder value |
|
226 |
! |
|
227 |
||
228 |
description:aString |
|
7179 | 229 |
self descriptionHolder value:aString allBold |
6799 | 230 |
! |
231 |
||
232 |
isStable |
|
233 |
^ self isStableHolder value |
|
234 |
! |
|
235 |
||
236 |
isStable:aBoolean |
|
237 |
self isStableHolder value:aBoolean |
|
238 |
! |
|
239 |
||
240 |
logMessage |
|
241 |
^ self logMessageHolder value |
|
242 |
! |
|
243 |
||
244 |
logMessage:aString |
|
245 |
self logMessageHolder value:aString |
|
6979 | 246 |
! |
247 |
||
248 |
quickCheckIn |
|
249 |
^ self quickCheckInHolder value |
|
250 |
! |
|
251 |
||
252 |
quickCheckIn:aBoolean |
|
253 |
self quickCheckInHolder value:aBoolean |
|
254 |
! |
|
255 |
||
256 |
tag |
|
6990 | 257 |
^ self tagHolder value withoutSeparators |
6979 | 258 |
! |
259 |
||
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
260 |
tag:aStringOrNil |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
261 |
self tagHolder value:aStringOrNil |
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
262 |
|
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
263 |
"Modified: / 12-09-2006 / 12:03:50 / cg" |
6979 | 264 |
! |
265 |
||
266 |
tagIt |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
267 |
^ self tag notEmptyOrNil |
6979 | 268 |
|
7110
86a7ea1388a1
no tagIt checkBox - non-empty tag value means: tagIt
Claus Gittinger <cg@exept.de>
parents:
7097
diff
changeset
|
269 |
"Created: / 12-09-2006 / 13:06:49 / cg" |
6979 | 270 |
! |
271 |
||
272 |
withQuickOption:aBoolean |
|
273 |
^ self quickCheckInVisibleHolder value:aBoolean |
|
6799 | 274 |
! ! |
275 |
||
276 |
!CheckinInfoDialog methodsFor:'aspects'! |
|
277 |
||
278 |
descriptionHolder |
|
279 |
descriptionHolder isNil ifTrue:[ |
|
280 |
descriptionHolder := ValueHolder new. |
|
281 |
]. |
|
282 |
^ descriptionHolder |
|
283 |
! |
|
284 |
||
285 |
isStableHolder |
|
286 |
isStableHolder isNil ifTrue:[ |
|
7592
f9204291e800
isStable is not the default (too slow for now)
Claus Gittinger <cg@exept.de>
parents:
7591
diff
changeset
|
287 |
isStableHolder := false asValue. |
6799 | 288 |
]. |
289 |
^ isStableHolder. |
|
7591 | 290 |
|
7592
f9204291e800
isStable is not the default (too slow for now)
Claus Gittinger <cg@exept.de>
parents:
7591
diff
changeset
|
291 |
"Modified: / 16-01-2007 / 16:00:26 / cg" |
6799 | 292 |
! |
293 |
||
294 |
logMessageHolder |
|
295 |
logMessageHolder isNil ifTrue:[ |
|
296 |
logMessageHolder := LastSourceLogMessage asValue. |
|
297 |
]. |
|
298 |
^ logMessageHolder. |
|
6979 | 299 |
! |
300 |
||
301 |
quickCheckInHolder |
|
302 |
quickCheckInHolder isNil ifTrue:[ |
|
303 |
quickCheckInHolder := true asValue. |
|
304 |
]. |
|
305 |
^ quickCheckInHolder |
|
306 |
! |
|
307 |
||
308 |
quickCheckInVisibleHolder |
|
309 |
quickCheckInVisibleHolder isNil ifTrue:[ |
|
310 |
quickCheckInVisibleHolder := false asValue. |
|
311 |
]. |
|
312 |
^ quickCheckInVisibleHolder |
|
313 |
! |
|
314 |
||
315 |
tagHolder |
|
316 |
tagHolder isNil ifTrue:[ |
|
317 |
tagHolder := '' asValue. |
|
318 |
]. |
|
319 |
^ tagHolder |
|
6799 | 320 |
! ! |
321 |
||
322 |
!CheckinInfoDialog class methodsFor:'documentation'! |
|
323 |
||
324 |
version |
|
9161
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
325 |
^ '$Header: /cvs/stx/stx/libtool/Tools__CheckinInfoDialog.st,v 1.10 2009-11-02 14:53:23 cg Exp $' |
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
326 |
! |
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
327 |
|
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
328 |
version_CVS |
e4761f8c188d
botton order - ok at right in spec,
Claus Gittinger <cg@exept.de>
parents:
8766
diff
changeset
|
329 |
^ '$Header: /cvs/stx/stx/libtool/Tools__CheckinInfoDialog.st,v 1.10 2009-11-02 14:53:23 cg Exp $' |
6799 | 330 |
! ! |