author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 19 Jan 2015 10:10:26 +0000 | |
changeset 514 | 7a1a8fa59edd |
parent 509 | f92210d4585b |
child 535 | cde846c99f0d |
permissions | -rw-r--r-- |
211 | 1 |
" |
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
2 |
stx:libscm - a new source code management library for Smalltalk/X |
509
f92210d4585b
Updated copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
436
diff
changeset
|
3 |
Copyright (C) 2012-2015 Jan Vrany |
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
4 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
5 |
This library is free software; you can redistribute it and/or |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
6 |
modify it under the terms of the GNU Lesser General Public |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
7 |
License as published by the Free Software Foundation; either |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
8 |
version 2.1 of the License. |
211 | 9 |
|
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
10 |
This library is distributed in the hope that it will be useful, |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
13 |
Lesser General Public License for more details. |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
14 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
15 |
You should have received a copy of the GNU Lesser General Public |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
16 |
License along with this library; if not, write to the Free Software |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
17 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
211 | 18 |
" |
44 | 19 |
"{ Package: 'stx:libscm/common' }" |
20 |
||
514
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
21 |
"{ NameSpace: Smalltalk }" |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
22 |
|
44 | 23 |
SCMAbstractDialog subclass:#SCMAbstractCommitDialog |
24 |
instanceVariableNames:'task messageView messageModifiedHolder fileSelectionHolder |
|
359
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
25 |
fileListShowOnlyModifiedHolder fileListHolder fileListView |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
26 |
enabledHolder' |
44 | 27 |
classVariableNames:'' |
28 |
poolDictionaries:'' |
|
29 |
category:'SCM-Common-StX-Interface' |
|
30 |
! |
|
31 |
||
32 |
Object subclass:#FileEntry |
|
359
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
33 |
instanceVariableNames:'application entry include includeEditable name icon' |
44 | 34 |
classVariableNames:'' |
35 |
poolDictionaries:'' |
|
36 |
privateIn:SCMAbstractCommitDialog |
|
37 |
! |
|
38 |
||
211 | 39 |
!SCMAbstractCommitDialog class methodsFor:'documentation'! |
40 |
||
41 |
copyright |
|
42 |
" |
|
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
43 |
stx:libscm - a new source code management library for Smalltalk/X |
509
f92210d4585b
Updated copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
436
diff
changeset
|
44 |
Copyright (C) 2012-2015 Jan Vrany |
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
45 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
46 |
This library is free software; you can redistribute it and/or |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
47 |
modify it under the terms of the GNU Lesser General Public |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
48 |
License as published by the Free Software Foundation; either |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
49 |
version 2.1 of the License. |
211 | 50 |
|
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
51 |
This library is distributed in the hope that it will be useful, |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
52 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
53 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
54 |
Lesser General Public License for more details. |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
55 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
56 |
You should have received a copy of the GNU Lesser General Public |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
57 |
License along with this library; if not, write to the Free Software |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
333
diff
changeset
|
58 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
211 | 59 |
" |
60 |
! ! |
|
44 | 61 |
|
62 |
!SCMAbstractCommitDialog class methodsFor:'interface specs'! |
|
63 |
||
64 |
contentSpec |
|
65 |
"This resource specification was automatically generated |
|
66 |
by the UIPainter of ST/X." |
|
67 |
||
68 |
"Do not manually edit this!! If it is corrupted, |
|
69 |
the UIPainter may not be able to read the specification." |
|
70 |
||
71 |
" |
|
72 |
UIPainter new openOnClass:SVN::CommitDialog2 andSelector:#contentSpec |
|
73 |
SVN::CommitDialog2 new openInterface:#contentSpec |
|
74 |
" |
|
75 |
||
76 |
<resource: #canvas> |
|
77 |
||
78 |
^ |
|
79 |
#(FullSpec |
|
80 |
name: contentSpec |
|
81 |
window: |
|
82 |
(WindowSpec |
|
83 |
label: 'Commit...' |
|
84 |
name: 'Commit...' |
|
85 |
min: (Point 10 10) |
|
86 |
bounds: (Rectangle 0 0 698 529) |
|
87 |
) |
|
88 |
component: |
|
89 |
(SpecCollection |
|
90 |
collection: ( |
|
91 |
(VariableVerticalPanelSpec |
|
92 |
name: 'VariablePanel' |
|
93 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
94 |
component: |
|
95 |
(SpecCollection |
|
96 |
collection: ( |
|
97 |
(ViewSpec |
|
98 |
name: 'MessageAndInfoPane' |
|
99 |
component: |
|
100 |
(SpecCollection |
|
101 |
collection: ( |
|
102 |
(SubCanvasSpec |
|
103 |
name: 'InfoPanel' |
|
104 |
layout: (LayoutFrame 0 0 0 0 0 1 40 0) |
|
105 |
level: 0 |
|
106 |
initiallyInvisible: true |
|
107 |
hasHorizontalScrollBar: false |
|
108 |
hasVerticalScrollBar: false |
|
109 |
clientKey: infoPanel |
|
110 |
createNewBuilder: false |
|
111 |
) |
|
112 |
(ViewSpec |
|
113 |
name: 'MessagePane' |
|
114 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
115 |
component: |
|
116 |
(SpecCollection |
|
117 |
collection: ( |
|
118 |
(LabelSpec |
|
119 |
label: 'Commit message:' |
|
120 |
name: 'MessageLabel' |
|
121 |
layout: (LayoutFrame 0 0 0 0 0 1 25 0) |
|
122 |
translateLabel: true |
|
123 |
adjust: left |
|
124 |
) |
|
125 |
(TextEditorSpec |
|
126 |
name: 'Message' |
|
127 |
layout: (LayoutFrame 0 0 30 0 0 1 0 1) |
|
128 |
enableChannel: enabledHolder |
|
129 |
hasHorizontalScrollBar: true |
|
130 |
hasVerticalScrollBar: true |
|
131 |
modifiedChannel: messageModifiedHolder |
|
132 |
hasKeyboardFocusInitially: false |
|
133 |
postBuildCallback: messageView: |
|
134 |
) |
|
135 |
) |
|
136 |
||
137 |
) |
|
138 |
) |
|
139 |
) |
|
140 |
||
141 |
) |
|
142 |
) |
|
143 |
(ViewSpec |
|
144 |
name: 'FilePane' |
|
145 |
component: |
|
146 |
(SpecCollection |
|
147 |
collection: ( |
|
148 |
(UISubSpecification |
|
149 |
name: 'FilePaneSpec' |
|
150 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
151 |
minorKey: filePaneSpec |
|
152 |
) |
|
153 |
) |
|
154 |
||
155 |
) |
|
156 |
) |
|
157 |
) |
|
158 |
||
159 |
) |
|
160 |
handles: (Any 0.5 1.0) |
|
161 |
) |
|
162 |
) |
|
163 |
||
164 |
) |
|
165 |
) |
|
166 |
! |
|
167 |
||
168 |
fileListColumnSpec |
|
169 |
"This resource specification was automatically generated |
|
170 |
by the DataSetBuilder of ST/X." |
|
171 |
||
172 |
"Do not manually edit this!! If it is corrupted, |
|
173 |
the DataSetBuilder may not be able to read the specification." |
|
174 |
||
175 |
" |
|
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
176 |
DataSetBuilder new openOnClass:SCMAbstractCommitDialog andSelector:#fileListColumnSpec |
44 | 177 |
" |
178 |
||
179 |
<resource: #tableColumns> |
|
180 |
||
181 |
^#( |
|
182 |
(DataSetColumnSpec |
|
359
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
183 |
label: 'Icon' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
184 |
activeHelpKey: '' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
185 |
activeHelpKeyForLabel: '' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
186 |
labelButtonType: Button |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
187 |
width: 22 |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
188 |
minWidth: 22 |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
189 |
height: heightOfFirstRow |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
190 |
menuFromApplication: false |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
191 |
printSelector: icon |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
192 |
canSelect: false |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
193 |
showRowSeparator: false |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
194 |
showColSeparator: false |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
195 |
) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
196 |
(DataSetColumnSpec |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
197 |
label: 'Check' |
44 | 198 |
activeHelpKey: '' |
199 |
activeHelpKeyForLabel: '' |
|
200 |
labelButtonType: None |
|
201 |
width: 22 |
|
202 |
minWidth: 22 |
|
359
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
203 |
height: heightOfFirstRow |
44 | 204 |
editorType: CheckToggle |
205 |
rendererType: CheckToggle |
|
206 |
model: include |
|
207 |
menuFromApplication: false |
|
208 |
printSelector: include |
|
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
209 |
selectSelector: includeEditable |
44 | 210 |
showRowSeparator: false |
211 |
showColSeparator: false |
|
212 |
) |
|
213 |
(DataSetColumnSpec |
|
359
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
214 |
label: 'File' |
44 | 215 |
labelAlignment: left |
216 |
activeHelpKey: '' |
|
217 |
activeHelpKeyForLabel: '' |
|
218 |
labelButtonType: Button |
|
359
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
219 |
height: heightOfFirstRow |
44 | 220 |
menuFromApplication: false |
221 |
printSelector: pathText |
|
222 |
canSelect: false |
|
223 |
showRowSeparator: false |
|
224 |
showColSeparator: false |
|
225 |
) |
|
226 |
) |
|
227 |
||
228 |
! |
|
229 |
||
230 |
filePaneSpec |
|
231 |
"This resource specification was automatically generated |
|
232 |
by the UIPainter of ST/X." |
|
233 |
||
234 |
"Do not manually edit this!! If it is corrupted, |
|
235 |
the UIPainter may not be able to read the specification." |
|
236 |
||
237 |
" |
|
359
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
238 |
UIPainter new openOnClass:SCMAbstractCommitDialog andSelector:#filePaneSpec |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
239 |
SCMAbstractCommitDialog new openInterface:#filePaneSpec |
44 | 240 |
" |
241 |
||
242 |
<resource: #canvas> |
|
243 |
||
244 |
^ |
|
359
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
245 |
#(FullSpec |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
246 |
name: filePaneSpec |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
247 |
window: |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
248 |
(WindowSpec |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
249 |
label: 'File List' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
250 |
name: 'File List' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
251 |
min: (Point 10 10) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
252 |
bounds: (Rectangle 0 0 586 403) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
253 |
) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
254 |
component: |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
255 |
(SpecCollection |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
256 |
collection: ( |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
257 |
(LabelSpec |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
258 |
label: 'Checked files will be commited to repository.' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
259 |
name: 'FileListLabel' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
260 |
layout: (LayoutFrame 0 0 10 0 0 1 35 0) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
261 |
translateLabel: true |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
262 |
adjust: left |
44 | 263 |
) |
359
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
264 |
(DataSetSpec |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
265 |
name: 'WCEntryTable' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
266 |
layout: (LayoutFrame 0 0 35 0 0 1 -30 1) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
267 |
enableChannel: enabledHolder |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
268 |
model: fileSelectionHolder |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
269 |
menu: fileListMenu |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
270 |
hasHorizontalScrollBar: true |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
271 |
hasVerticalScrollBar: true |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
272 |
dataList: fileListHolder |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
273 |
useIndex: false |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
274 |
columnHolder: fileListColumnSpec |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
275 |
showLabels: false |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
276 |
postBuildCallback: postBuildFileListView: |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
277 |
) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
278 |
(CheckBoxSpec |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
279 |
label: 'Show only modified entries' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
280 |
name: 'ShowOnlyChanged' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
281 |
layout: (LayoutFrame 0 0 -30 1 -170 1 0 1) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
282 |
enableChannel: enabledHolder |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
283 |
model: fileListShowOnlyModifiedHolder |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
284 |
translateLabel: true |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
285 |
) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
286 |
(LinkButtonSpec |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
287 |
label: 'Browse working copy' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
288 |
name: 'BrowseWC' |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
289 |
layout: (LayoutFrame -170 1 -30 1 0 1 0 1) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
290 |
translateLabel: true |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
291 |
labelChannel: browseWorkingCopyLabel |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
292 |
adjust: right |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
293 |
model: doBrowseWorkingCopy |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
294 |
) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
295 |
) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
296 |
|
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
297 |
) |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
298 |
) |
44 | 299 |
! |
300 |
||
301 |
windowSpec |
|
302 |
"This resource specification was automatically generated |
|
303 |
by the UIPainter of ST/X." |
|
304 |
||
305 |
"Do not manually edit this!! If it is corrupted, |
|
306 |
the UIPainter may not be able to read the specification." |
|
307 |
||
308 |
" |
|
66
4a4af79eb019
SCMAbstractPackageModel: fixed initialization of working copy
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
60
diff
changeset
|
309 |
UIPainter new openOnClass:SCMAbstractCommitDialog andSelector:#windowSpec |
4a4af79eb019
SCMAbstractPackageModel: fixed initialization of working copy
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
60
diff
changeset
|
310 |
SCMAbstractCommitDialog new openInterface:#windowSpec |
4a4af79eb019
SCMAbstractPackageModel: fixed initialization of working copy
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
60
diff
changeset
|
311 |
SCMAbstractCommitDialog open |
44 | 312 |
" |
313 |
||
314 |
<resource: #canvas> |
|
315 |
||
316 |
^ |
|
317 |
#(FullSpec |
|
318 |
name: windowSpec |
|
319 |
window: |
|
320 |
(WindowSpec |
|
321 |
label: 'SubVersion: Dialog ' |
|
322 |
name: 'SubVersion: Dialog ' |
|
323 |
labelChannel: titleHolder |
|
324 |
min: (Point 10 10) |
|
325 |
bounds: (Rectangle 0 0 648 451) |
|
326 |
) |
|
327 |
component: |
|
328 |
(SpecCollection |
|
329 |
collection: ( |
|
330 |
(ViewSpec |
|
331 |
name: 'TitleBox' |
|
332 |
layout: (LayoutFrame 0 0 0 0 0 1 66 0) |
|
333 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
334 |
component: |
|
335 |
(SpecCollection |
|
336 |
collection: ( |
|
337 |
(LabelSpec |
|
338 |
label: 'DialogTitle' |
|
339 |
name: 'DialogTitle' |
|
340 |
layout: (LayoutFrame 10 0 0 0 -75 1 40 0) |
|
341 |
style: (FontDescription helvetica medium roman 18 #'iso10646-1') |
|
342 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
343 |
translateLabel: true |
|
344 |
labelChannel: titleHolder |
|
345 |
adjust: left |
|
346 |
) |
|
347 |
(LabelSpec |
|
348 |
label: 'DialogSubtitle' |
|
349 |
name: 'DialogSubtitle' |
|
350 |
layout: (LayoutFrame 30 0 40 0 -75 1 66 0) |
|
351 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
352 |
translateLabel: true |
|
353 |
labelChannel: subtitleHolder |
|
354 |
resizeForLabel: false |
|
355 |
adjust: left |
|
356 |
) |
|
357 |
(LabelSpec |
|
358 |
label: 'Icon' |
|
359 |
name: 'DialogIcon' |
|
360 |
layout: (LayoutFrame -157 1 0 0 0 1 66 0) |
|
361 |
hasCharacterOrientedLabel: false |
|
362 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
363 |
translateLabel: true |
|
364 |
labelChannel: dialogIconAspect |
|
66
4a4af79eb019
SCMAbstractPackageModel: fixed initialization of working copy
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
60
diff
changeset
|
365 |
adjust: right |
44 | 366 |
) |
367 |
) |
|
368 |
||
369 |
) |
|
370 |
) |
|
371 |
(ViewSpec |
|
372 |
name: 'ContentBox' |
|
373 |
layout: (LayoutFrame 5 0 70 0 -5 1 -50 1) |
|
374 |
component: |
|
375 |
(SpecCollection |
|
376 |
collection: ( |
|
377 |
(SubCanvasSpec |
|
378 |
name: 'Content' |
|
379 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
380 |
hasHorizontalScrollBar: false |
|
381 |
hasVerticalScrollBar: false |
|
382 |
specHolder: contentSpecHolder |
|
383 |
createNewBuilder: false |
|
384 |
) |
|
385 |
) |
|
386 |
||
387 |
) |
|
388 |
) |
|
389 |
(DividerSpec |
|
390 |
name: 'Separator' |
|
391 |
layout: (LayoutFrame 5 0 -50 1 -5 1 -30 1) |
|
392 |
) |
|
393 |
(UISubSpecification |
|
394 |
name: 'Buttons' |
|
395 |
layout: (LayoutFrame 130 0 -30 1 0 1 0 1) |
|
396 |
minorKey: buttonsSpec |
|
397 |
) |
|
398 |
(LinkButtonSpec |
|
399 |
label: 'Help' |
|
400 |
name: 'Help' |
|
401 |
layout: (LayoutFrame 30 0 -30 1 130 0 0 1) |
|
402 |
style: (FontDescription helvetica medium roman 12 #'iso10646-1') |
|
403 |
initiallyInvisible: true |
|
404 |
foregroundColor: (Color 0.0 0.0 86.9993133440147) |
|
405 |
translateLabel: true |
|
406 |
model: doHelp |
|
407 |
) |
|
408 |
(MenuPanelSpec |
|
409 |
name: 'More' |
|
410 |
layout: (LayoutFrame 0 0 -30 1 30 0 -50 1) |
|
411 |
level: 0 |
|
412 |
model: doInspect |
|
413 |
menu: actionsMenu |
|
414 |
) |
|
415 |
) |
|
416 |
||
417 |
) |
|
418 |
) |
|
419 |
! ! |
|
420 |
||
421 |
!SCMAbstractCommitDialog class methodsFor:'menu specs'! |
|
422 |
||
423 |
fileListMenu |
|
424 |
"This resource specification was automatically generated |
|
425 |
by the MenuEditor of ST/X." |
|
426 |
||
427 |
"Do not manually edit this!! If it is corrupted, |
|
428 |
the MenuEditor may not be able to read the specification." |
|
429 |
||
430 |
||
431 |
" |
|
144
36273f5f4f52
SCM-specific methods pushed down to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
119
diff
changeset
|
432 |
MenuEditor new openOnClass:SCMAbstractCommitDialog andSelector:#fileListMenu |
36273f5f4f52
SCM-specific methods pushed down to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
119
diff
changeset
|
433 |
(Menu new fromLiteralArrayEncoding:(SCMAbstractCommitDialog fileListMenu)) startUp |
44 | 434 |
" |
435 |
||
436 |
<resource: #menu> |
|
437 |
||
438 |
^ |
|
439 |
#(Menu |
|
440 |
( |
|
441 |
(MenuItem |
|
333 | 442 |
enabled: canShowDiffsForEntry |
44 | 443 |
label: 'Show differences' |
444 |
itemValue: doShowDiffsForEntry |
|
445 |
) |
|
446 |
(MenuItem |
|
333 | 447 |
enabled: canShowDiffsForEntry |
144
36273f5f4f52
SCM-specific methods pushed down to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
119
diff
changeset
|
448 |
label: 'Show differences (against newest)' |
44 | 449 |
itemValue: doShowDiffsForEntryAgainstHEAD |
450 |
) |
|
514
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
451 |
(MenuItem |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
452 |
label: '-' |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
453 |
) |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
454 |
(MenuItem |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
455 |
label: 'Select All Files' |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
456 |
itemValue: doSelectAll |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
457 |
) |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
458 |
(MenuItem |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
459 |
label: 'Unselect all Files' |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
460 |
itemValue: doSelectNone |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
461 |
) |
44 | 462 |
) |
463 |
nil |
|
464 |
nil |
|
465 |
) |
|
466 |
! ! |
|
467 |
||
468 |
!SCMAbstractCommitDialog methodsFor:'accessing'! |
|
469 |
||
470 |
defaultSubtitle |
|
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
359
diff
changeset
|
471 |
| t packages| |
44 | 472 |
|
473 |
t := self task. |
|
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
359
diff
changeset
|
474 |
packages := t packages. |
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
359
diff
changeset
|
475 |
^packages notEmptyOrNil ifTrue:[ |
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
359
diff
changeset
|
476 |
packages size == 1 ifTrue:[ |
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
359
diff
changeset
|
477 |
'Package: ' , packages anElement name asText allItalic |
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
359
diff
changeset
|
478 |
] ifFalse:[ |
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
359
diff
changeset
|
479 |
'Packages: ' , ((packages collect:[:e | e name ]) asStringWith: ', ') |
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
359
diff
changeset
|
480 |
]. |
44 | 481 |
] ifFalse:[ |
171
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
482 |
| title | |
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
483 |
|
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
484 |
title := t temporaryWorkingCopy root pathName , ' [' , t temporaryWorkingCopy branch name , ']'. |
171
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
485 |
title size > 70 ifTrue:[ |
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
486 |
title := '...' , (title copyFrom: title size - 67). |
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
487 |
]. |
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
488 |
title. |
44 | 489 |
] |
490 |
||
491 |
"Created: / 28-10-2008 / 09:14:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
359
diff
changeset
|
492 |
"Modified: / 22-02-2014 / 23:45:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 493 |
! |
494 |
||
495 |
fileListToCommit |
|
496 |
^(self fileListHolder value ? #()) |
|
497 |
select:[:entry|entry include] |
|
498 |
thenCollect:[:entry|entry path]. |
|
499 |
||
500 |
"Created: / 08-02-2012 / 18:16:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
501 |
! |
|
502 |
||
503 |
message |
|
504 |
||
505 |
^messageView notNil |
|
506 |
ifTrue:[messageView contents] |
|
507 |
ifFalse:[nil] |
|
508 |
||
509 |
"Created: / 31-03-2008 / 21:06:28 / janfrog" |
|
510 |
"Modified: / 09-04-2009 / 08:50:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
511 |
"Modified: / 08-02-2012 / 18:07:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
512 |
! |
|
513 |
||
514 |
message: aString |
|
515 |
||
516 |
^messageView contents: aString |
|
517 |
||
518 |
"Created: / 08-04-2009 / 23:27:09 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
519 |
"Modified: / 08-02-2012 / 18:08:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
520 |
! |
|
521 |
||
171
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
522 |
model |
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
523 |
<resource: #obsolete> |
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
524 |
|
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
525 |
self breakPoint: #jv. |
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
526 |
^self task |
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
527 |
|
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
528 |
"Created: / 12-01-2013 / 11:59:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
529 |
! |
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
530 |
|
44 | 531 |
task |
532 |
||
171
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
533 |
^task |
44 | 534 |
|
535 |
"Created: / 23-03-2009 / 11:49:15 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
171
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
536 |
"Modified: / 12-01-2013 / 11:57:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 537 |
! |
538 |
||
171
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
539 |
task: t |
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
540 |
task := t. |
44 | 541 |
|
542 |
"Created: / 23-03-2009 / 11:49:24 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
171
771ae4f01925
Changes to support standalone commit (without package model).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
144
diff
changeset
|
543 |
"Modified: / 12-01-2013 / 12:00:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 544 |
! |
545 |
||
546 |
workingCopy |
|
547 |
||
548 |
^self task workingCopy |
|
549 |
||
550 |
"Created: / 08-02-2012 / 18:07:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
551 |
! ! |
|
552 |
||
553 |
!SCMAbstractCommitDialog methodsFor:'acessing-views'! |
|
554 |
||
555 |
messageView: aView |
|
556 |
||
557 |
messageView := aView scrolledView. |
|
558 |
"/ messageView model: |
|
559 |
"/ (self class messages |
|
560 |
"/ at: self task package |
|
561 |
"/ ifAbsent:[self task message]) |
|
562 |
||
563 |
"Created: / 08-02-2012 / 17:58:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
564 |
! ! |
|
565 |
||
566 |
!SCMAbstractCommitDialog methodsFor:'actions'! |
|
567 |
||
568 |
doAccept |
|
569 |
||
570 |
self showProgressWhile:[ |
|
58
057693eae3c7
- SCMAbstractCommitDialog
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
53
diff
changeset
|
571 |
self acceptEnabled:false. |
057693eae3c7
- SCMAbstractCommitDialog
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
53
diff
changeset
|
572 |
(self task) |
057693eae3c7
- SCMAbstractCommitDialog
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
53
diff
changeset
|
573 |
message:self message; |
057693eae3c7
- SCMAbstractCommitDialog
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
53
diff
changeset
|
574 |
paths: self fileListToCommit; |
057693eae3c7
- SCMAbstractCommitDialog
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
53
diff
changeset
|
575 |
doCommit. |
057693eae3c7
- SCMAbstractCommitDialog
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
53
diff
changeset
|
576 |
self accept value:true |
44 | 577 |
] |
578 |
||
579 |
"Created: / 01-04-2008 / 18:59:12 / janfrog" |
|
580 |
"Modified: / 19-08-2009 / 14:26:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
581 |
"Modified: / 08-02-2012 / 18:17:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
58
057693eae3c7
- SCMAbstractCommitDialog
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
53
diff
changeset
|
582 |
"Modified (format): / 15-11-2012 / 10:12:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 583 |
! |
584 |
||
585 |
doBrowseWorkingCopy |
|
172
ca0b1a930b87
Fix: use temporaryWorkingCopy in SCMAbstractCommitDialog>>doBrowseWorkingCopy.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
171
diff
changeset
|
586 |
self task temporaryWorkingCopyRoot browse |
44 | 587 |
|
172
ca0b1a930b87
Fix: use temporaryWorkingCopy in SCMAbstractCommitDialog>>doBrowseWorkingCopy.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
171
diff
changeset
|
588 |
"Modified: / 12-01-2013 / 14:03:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 589 |
! |
590 |
||
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
591 |
doCommitAllChangedPackages |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
592 |
| revision packages | |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
593 |
|
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
594 |
"/ Collect all changed packages at given revision... |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
595 |
revision := task packages revision. |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
596 |
packages := task packages class new. |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
597 |
task packages anElement root yourselfAndAllChildrenDo:[:each| |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
598 |
(each isVirtual not and:[each revision = revision and:[ each hasChanges ]]) ifTrue:[ |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
599 |
packages add: each. |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
600 |
]. |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
601 |
]. |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
602 |
task packages: packages. |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
603 |
|
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
604 |
"Created: / 03-03-2014 / 10:08:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
436
58c7b3b23cd2
Fixed commit warning when not all modified packages are about to commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
407
diff
changeset
|
605 |
"Modified: / 27-05-2014 / 16:03:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
606 |
! |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
607 |
|
44 | 608 |
doShowDiffsForEntry |
144
36273f5f4f52
SCM-specific methods pushed down to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
119
diff
changeset
|
609 |
"raise an error: must be redefined in concrete subclass(es)" |
44 | 610 |
|
144
36273f5f4f52
SCM-specific methods pushed down to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
119
diff
changeset
|
611 |
^ self subclassResponsibility |
44 | 612 |
! |
613 |
||
614 |
doShowDiffsForEntryAgainstHEAD |
|
144
36273f5f4f52
SCM-specific methods pushed down to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
119
diff
changeset
|
615 |
"raise an error: must be redefined in concrete subclass(es)" |
44 | 616 |
|
144
36273f5f4f52
SCM-specific methods pushed down to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
119
diff
changeset
|
617 |
^ self subclassResponsibility |
359
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
618 |
! |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
619 |
|
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
620 |
postBuildFileListView: aScrolledView |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
621 |
<resource: #uiCallback> |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
622 |
|
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
623 |
fileListView := aScrolledView scrolledView. |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
624 |
"/ Ugly hack to make it working on 6.2.2, sigh. |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
625 |
"/ (ListModelView::TableRenderer canUnderstand: #showItemInAdditionToColumns:) ifTrue:[ |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
626 |
"/ fileListView setupTableRenderer |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
627 |
"/ showItemInAdditionToColumns: false; |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
628 |
"/ columnDescriptors: self class fileListColumnSpec. |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
629 |
"/ ]. |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
630 |
|
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
631 |
"Modified: / 29-11-2013 / 15:35:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 632 |
! ! |
633 |
||
634 |
!SCMAbstractCommitDialog methodsFor:'aspects'! |
|
635 |
||
636 |
acceptButtonTitleAspect |
|
637 |
||
638 |
^'Commit' |
|
639 |
||
640 |
"Created: / 08-02-2012 / 17:46:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
641 |
! |
|
642 |
||
643 |
browseWorkingCopyLabel |
|
644 |
||
645 |
^'Browse working copy...' asText |
|
646 |
colorizeAllWith: Color blue; |
|
647 |
actionForAll:[ self doBrowseWorkingCopy ]; |
|
648 |
yourself |
|
649 |
||
650 |
"Created: / 05-02-2012 / 01:28:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
651 |
! |
|
652 |
||
653 |
enabledHolder |
|
654 |
<resource: #uiAspect> |
|
655 |
||
656 |
enabledHolder isNil ifTrue:[ |
|
657 |
enabledHolder := true asValue. |
|
658 |
]. |
|
659 |
^ enabledHolder. |
|
660 |
||
661 |
"Modified (comment): / 11-02-2012 / 23:28:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
662 |
! |
|
663 |
||
664 |
fileListHolder |
|
665 |
<resource: #uiAspect> |
|
666 |
||
667 |
"automatically generated by UIPainter ..." |
|
668 |
||
669 |
"*** the code below creates a default model when invoked." |
|
670 |
"*** (which may not be the one you wanted)" |
|
671 |
"*** Please change as required and accept it in the browser." |
|
672 |
"*** (and replace this comment by something more useful ;-)" |
|
673 |
||
674 |
fileListHolder isNil ifTrue:[ |
|
675 |
fileListHolder := ValueHolder new. |
|
676 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
677 |
"/ fileListHolder addDependent:self. |
|
678 |
"/ fileListHolder onChangeSend:#fileListHolderChanged to:self. |
|
679 |
]. |
|
680 |
^ fileListHolder. |
|
681 |
||
682 |
"Modified: / 08-02-2012 / 18:27:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
683 |
! |
|
684 |
||
685 |
fileListShowOnlyModifiedHolder |
|
686 |
<resource: #uiAspect> |
|
687 |
||
688 |
"automatically generated by UIPainter ..." |
|
689 |
||
690 |
"*** the code below creates a default model when invoked." |
|
691 |
"*** (which may not be the one you wanted)" |
|
692 |
"*** Please change as required and accept it in the browser." |
|
693 |
"*** (and replace this comment by something more useful ;-)" |
|
694 |
||
695 |
fileListShowOnlyModifiedHolder isNil ifTrue:[ |
|
696 |
fileListShowOnlyModifiedHolder := true asValue. |
|
697 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
698 |
"/ fileListShowOnlyModifiedHolder addDependent:self. |
|
699 |
fileListShowOnlyModifiedHolder onChangeSend:#updateFileList to:self. |
|
700 |
]. |
|
701 |
^ fileListShowOnlyModifiedHolder. |
|
702 |
||
703 |
"Modified: / 08-02-2012 / 18:04:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
704 |
! |
|
705 |
||
706 |
fileSelectionHolder |
|
707 |
<resource: #uiAspect> |
|
708 |
||
709 |
"automatically generated by UIPainter ..." |
|
710 |
||
711 |
"*** the code below creates a default model when invoked." |
|
712 |
"*** (which may not be the one you wanted)" |
|
713 |
"*** Please change as required and accept it in the browser." |
|
714 |
"*** (and replace this comment by something more useful ;-)" |
|
715 |
||
716 |
fileSelectionHolder isNil ifTrue:[ |
|
717 |
fileSelectionHolder := ValueHolder new. |
|
718 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
719 |
"/ fileSelectionHolder addDependent:self. |
|
720 |
"/ fileSelectionHolder onChangeSend:#fileSelectionHolderChanged to:self. |
|
721 |
]. |
|
722 |
^ fileSelectionHolder. |
|
723 |
! |
|
724 |
||
725 |
infoPanel |
|
726 |
infoPanel isNil ifTrue:[ |
|
727 |
infoPanel := Tools::InlineMessageDialog new. |
|
728 |
infoPanel panelHiddenHolder: self enabledHolder. |
|
729 |
]. |
|
730 |
^ infoPanel |
|
731 |
||
732 |
"Created: / 09-02-2012 / 19:23:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
733 |
! |
|
734 |
||
735 |
messageModifiedHolder |
|
736 |
"return/create the 'messageModifiedHolder' value holder (automatically generated)" |
|
737 |
||
738 |
messageModifiedHolder isNil ifTrue:[ |
|
739 |
messageModifiedHolder := ValueHolder with: false. |
|
740 |
messageModifiedHolder onChangeEvaluate:[ |
|
741 |
self acceptEnabled: (self message indexOfNonSeparator ~~ 0). |
|
742 |
messageModifiedHolder setValue: false. |
|
743 |
] |
|
744 |
]. |
|
745 |
^ messageModifiedHolder |
|
746 |
||
747 |
"Modified: / 08-02-2012 / 18:46:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
748 |
! ! |
|
749 |
||
750 |
!SCMAbstractCommitDialog methodsFor:'change & update'! |
|
751 |
||
752 |
updateFileList |
|
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
753 |
"raise an error: must be redefined in concrete subclass(es)" |
44 | 754 |
|
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
755 |
^ self subclassResponsibility |
44 | 756 |
! ! |
757 |
||
758 |
!SCMAbstractCommitDialog methodsFor:'hooks'! |
|
759 |
||
760 |
commonPostBuild |
|
761 |
||
762 |
self window extent: 640@640 |
|
763 |
||
764 |
"Created: / 08-02-2012 / 18:30:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
765 |
! |
|
766 |
||
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
767 |
postOpenWith1: anUIBuilder |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
768 |
|
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
769 |
(self task isPackageCommit |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
770 |
and:[ self task isSelectiveFileoutTask not |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
771 |
and:[ self task isCommitingAllChangedPackages not ]]) ifTrue:[ |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
772 |
self infoPanel |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
773 |
reset; |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
774 |
beInformation; |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
775 |
message:(resources string: 'There are more changed packages...'); |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
776 |
addButtonWithLabel: (resources string:'Commit all changed') |
436
58c7b3b23cd2
Fixed commit warning when not all modified packages are about to commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
407
diff
changeset
|
777 |
action: [ self doCommitAllChangedPackages. self infoPanel hide. self postOpenWith2: anUIBuilder]; |
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
778 |
addButtonWithLabel: (resources string:'Continue') |
436
58c7b3b23cd2
Fixed commit warning when not all modified packages are about to commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
407
diff
changeset
|
779 |
action: [ self infoPanel hide. self postOpenWith2: anUIBuilder]; |
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
780 |
show. |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
781 |
^ false. |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
782 |
]. |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
783 |
^ true. |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
784 |
|
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
785 |
"Created: / 03-03-2014 / 10:00:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
436
58c7b3b23cd2
Fixed commit warning when not all modified packages are about to commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
407
diff
changeset
|
786 |
"Modified: / 27-05-2014 / 16:03:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
787 |
! |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
788 |
|
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
789 |
postOpenWith2: anUIBuilder |
44 | 790 |
|
791 |
self showProgressWhile:[ |
|
792 |
self doUpdateCode. |
|
407
c3470898ba5f
Fix for issue #30 - Commit button is disabled even if commit message is not empty (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
793 |
self doRunSanityChecks. |
c3470898ba5f
Fix for issue #30 - Commit button is disabled even if commit message is not empty (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
794 |
self doUpdateButtonEnablements. |
44 | 795 |
]. |
796 |
||
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
797 |
"Created: / 03-03-2014 / 09:59:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
407
c3470898ba5f
Fix for issue #30 - Commit button is disabled even if commit message is not empty (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
798 |
"Modified: / 26-03-2014 / 15:06:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
799 |
! |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
800 |
|
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
801 |
postOpenWith: anUIBuilder |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
802 |
(self postOpenWith1: anUIBuilder) ifTrue:[ |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
803 |
self postOpenWith2: anUIBuilder |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
804 |
]. |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
805 |
|
44 | 806 |
"Created: / 09-02-2012 / 15:23:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
807 |
"Modified: / 03-03-2014 / 10:01:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 808 |
! ! |
809 |
||
514
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
810 |
!SCMAbstractCommitDialog methodsFor:'menu actions'! |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
811 |
|
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
812 |
doSelectAll |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
813 |
self doSelectAllMatching: [ :file | true ] |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
814 |
|
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
815 |
"Modified: / 19-01-2015 / 10:01:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
816 |
! |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
817 |
|
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
818 |
doSelectAllMatching: block |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
819 |
(self fileListHolder value ? #()) do:[:each | |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
820 |
each include: (block value: each entry) |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
821 |
]. |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
822 |
fileListView invalidate |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
823 |
|
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
824 |
"Created: / 19-01-2015 / 10:00:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
825 |
! |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
826 |
|
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
827 |
doSelectNone |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
828 |
self doSelectAllMatching: [ :file | false ] |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
829 |
|
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
830 |
"Created: / 19-01-2015 / 10:00:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
831 |
! ! |
7a1a8fa59edd
Added menu etries to select all / no files in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
832 |
|
44 | 833 |
!SCMAbstractCommitDialog methodsFor:'private'! |
834 |
||
835 |
doRunSanityChecks |
|
836 |
||
837 |
| checker problems anyError | |
|
838 |
||
839 |
self task isPackageCommit ifFalse:[ |
|
840 |
^self. |
|
841 |
]. |
|
842 |
||
843 |
ActivityNotification notify: (self resources string:'Checking code...'). |
|
302
e078bdcef149
Fixes for Smalltalk/X 6.2.2 (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
844 |
checker := self task doSanityChecks. |
e078bdcef149
Fixes for Smalltalk/X 6.2.2 (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
845 |
"/ #doSanityChecks may return nil if the ProjectChecker is not available |
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
359
diff
changeset
|
846 |
"/ (like in St/X 6.2.2) |
302
e078bdcef149
Fixes for Smalltalk/X 6.2.2 (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
847 |
(checker isNil or:[(problems := checker problems) isEmptyOrNil]) ifTrue:[ |
44 | 848 |
self doUpdateWorkingCopy. |
849 |
^self. |
|
850 |
]. |
|
851 |
||
852 |
anyError := problems anySatisfy:[:problem|problem severity == #error]. |
|
853 |
self infoPanel |
|
854 |
reset; |
|
855 |
beWarning; |
|
856 |
message: |
|
857 |
(problems size == 1 |
|
858 |
ifTrue:[self resources string:'A problem has been found in the code'] |
|
859 |
ifFalse:[problems size printString , (self resources string:' problems has been found in the code')]); |
|
860 |
||
861 |
addButtonWithLabel: (self resources string:'Show') |
|
862 |
action: [ |
|
863 |
Tools::ProjectCheckerBrowser new projectChecker: checker; open. self doCancel |
|
864 |
]; |
|
865 |
||
866 |
addButton:((Button label: (self resources string:'OK') |
|
867 |
action: [ |
|
868 |
self infoPanel beProgress. |
|
869 |
self doUpdateWorkingCopy. |
|
870 |
self infoPanel hide |
|
871 |
]) enabled: anyError not; yourself); |
|
872 |
||
873 |
addButtonWithLabel: (self resources string:'Cancel') |
|
874 |
action:[self doCancel]; |
|
875 |
||
876 |
show. |
|
877 |
^anyError not |
|
878 |
||
879 |
"Created: / 10-05-2012 / 17:24:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
302
e078bdcef149
Fixes for Smalltalk/X 6.2.2 (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
880 |
"Modified: / 30-06-2013 / 12:50:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
359
diff
changeset
|
881 |
"Modified (comment): / 21-02-2014 / 23:30:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 882 |
! |
883 |
||
407
c3470898ba5f
Fix for issue #30 - Commit button is disabled even if commit message is not empty (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
884 |
doUpdateButtonEnablements |
c3470898ba5f
Fix for issue #30 - Commit button is disabled even if commit message is not empty (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
885 |
self messageModifiedHolder changed:#value. |
c3470898ba5f
Fix for issue #30 - Commit button is disabled even if commit message is not empty (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
886 |
|
c3470898ba5f
Fix for issue #30 - Commit button is disabled even if commit message is not empty (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
887 |
"Created: / 26-03-2014 / 15:06:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c3470898ba5f
Fix for issue #30 - Commit button is disabled even if commit message is not empty (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
888 |
! |
c3470898ba5f
Fix for issue #30 - Commit button is disabled even if commit message is not empty (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
889 |
|
44 | 890 |
doUpdateCode |
891 |
self task doPrepareWorkingCopy1 |
|
892 |
||
893 |
"Created: / 10-05-2012 / 17:24:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
894 |
! |
|
895 |
||
896 |
doUpdateWorkingCopy |
|
897 |
||
898 |
self task doPrepareWorkingCopy2. |
|
899 |
self message: self task message. |
|
900 |
self messageModifiedHolder changed:#value. |
|
901 |
self updateFileList. |
|
902 |
||
903 |
"Created: / 10-05-2012 / 17:25:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
904 |
! ! |
|
905 |
||
333 | 906 |
!SCMAbstractCommitDialog methodsFor:'queries'! |
907 |
||
908 |
canShowDiffsForEntry |
|
909 |
^self fileSelectionHolder value notEmptyOrNil |
|
910 |
||
911 |
"Created: / 11-07-2013 / 01:57:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
912 |
! ! |
|
913 |
||
44 | 914 |
!SCMAbstractCommitDialog::FileEntry class methodsFor:'instance creation'! |
915 |
||
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
916 |
application:applicationArg entry:entryArg name: nameArg |
44 | 917 |
|
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
918 |
^self new application:applicationArg entry:entryArg name: nameArg |
44 | 919 |
|
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
920 |
"Created: / 15-11-2012 / 01:38:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 921 |
! ! |
922 |
||
923 |
!SCMAbstractCommitDialog::FileEntry methodsFor:'accessing'! |
|
924 |
||
925 |
author |
|
926 |
^entry author |
|
927 |
||
928 |
"Created: / 09-02-2012 / 14:36:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
929 |
! |
|
930 |
||
931 |
date |
|
932 |
^entry date |
|
933 |
||
934 |
"Created: / 09-02-2012 / 14:36:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
935 |
! |
|
936 |
||
937 |
entry |
|
938 |
^ entry |
|
939 |
! |
|
940 |
||
359
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
941 |
icon |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
942 |
^ icon |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
943 |
|
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
944 |
"Created: / 29-11-2013 / 14:20:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
945 |
! |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
946 |
|
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
947 |
icon: anImage |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
948 |
icon := anImage |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
949 |
|
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
950 |
"Created: / 29-11-2013 / 14:20:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
951 |
! |
b6516e783b2d
Added status icon to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
952 |
|
44 | 953 |
include |
954 |
^ include |
|
955 |
! |
|
956 |
||
957 |
include:aBoolean |
|
958 |
include := aBoolean. |
|
959 |
! |
|
960 |
||
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
961 |
includeEditable |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
962 |
^ includeEditable |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
963 |
! |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
964 |
|
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
965 |
includeEditable:something |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
966 |
includeEditable := something. |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
967 |
! |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
968 |
|
44 | 969 |
path |
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
970 |
^entry pathName |
44 | 971 |
|
972 |
"Created: / 09-02-2012 / 14:39:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
973 |
"Modified: / 15-11-2012 / 01:36:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 974 |
! |
975 |
||
976 |
pathText |
|
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
977 |
^name |
44 | 978 |
|
979 |
"Created: / 09-02-2012 / 14:36:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
980 |
"Modified: / 15-11-2012 / 01:36:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 981 |
! |
982 |
||
983 |
revision |
|
984 |
^entry revision |
|
985 |
||
986 |
"Created: / 09-02-2012 / 14:36:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
987 |
! |
|
988 |
||
989 |
statusIcon |
|
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
990 |
^nil |
44 | 991 |
|
992 |
"Created: / 09-02-2012 / 14:36:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
993 |
"Modified: / 15-11-2012 / 01:30:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 994 |
! ! |
995 |
||
996 |
!SCMAbstractCommitDialog::FileEntry methodsFor:'initialization'! |
|
997 |
||
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
998 |
application:applicationArg entry:entryArg name: nameArg |
44 | 999 |
application := applicationArg. |
1000 |
entry := entryArg. |
|
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
1001 |
include := true. |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
1002 |
includeEditable := true. |
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
1003 |
name := nameArg. |
44 | 1004 |
|
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
1005 |
"Created: / 15-11-2012 / 01:36:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
211
diff
changeset
|
1006 |
"Modified: / 01-04-2013 / 13:33:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
44 | 1007 |
! ! |
1008 |
||
1009 |
!SCMAbstractCommitDialog class methodsFor:'documentation'! |
|
1010 |
||
1011 |
version_GIT |
|
1012 |
"Never, ever change this method. Ask JV or CG why" |
|
1013 |
^thisContext method mclass theNonMetaclass instVarNamed: #revision |
|
1014 |
! |
|
1015 |
||
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
1016 |
version_HG |
114
8b27cb46af9a
version_HG changed to return String.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
66
diff
changeset
|
1017 |
|
8b27cb46af9a
version_HG changed to return String.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
66
diff
changeset
|
1018 |
^ '$Changeset: <not expanded> $' |
53
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
1019 |
! |
8043f7b6f41a
- More common code refactored
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
44
diff
changeset
|
1020 |
|
44 | 1021 |
version_SVN |
58
057693eae3c7
- SCMAbstractCommitDialog
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
53
diff
changeset
|
1022 |
^ '§Id:: §' |
44 | 1023 |
! ! |
333 | 1024 |