author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 01 Feb 2013 12:02:22 +0000 | |
changeset 210 | 54a73fa50d40 |
parent 163 | 21bc6994087d |
permissions | -rw-r--r-- |
162 | 1 |
" |
210 | 2 |
COPYRIGHT (c) 2012-2013 by Jan Vrany |
162 | 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:libscm/mercurial' }" |
|
13 |
||
14 |
FileBrowserV2 subclass:#HGWorkingCopyBrowser |
|
15 |
instanceVariableNames:'toolbarHgVisibleHolder' |
|
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'SCM-Mercurial-StX-Interface' |
|
19 |
! |
|
20 |
||
163
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
21 |
Smalltalk::DirectoryContentsBrowser subclass:#DirectoryContentsBrowser |
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
22 |
instanceVariableNames:'toolbarHgVisibleHolder' |
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
23 |
classVariableNames:'' |
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
24 |
poolDictionaries:'' |
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
25 |
privateIn:HGWorkingCopyBrowser |
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
26 |
! |
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
27 |
|
162 | 28 |
!HGWorkingCopyBrowser class methodsFor:'documentation'! |
29 |
||
30 |
copyright |
|
31 |
" |
|
210 | 32 |
COPYRIGHT (c) 2012-2013 by Jan Vrany |
162 | 33 |
All Rights Reserved |
34 |
||
35 |
This software is furnished under a license and may be used |
|
36 |
only in accordance with the terms of that license and with the |
|
37 |
inclusion of the above copyright notice. This software may not |
|
38 |
be provided or otherwise made available to, or used by, any |
|
39 |
other person. No title to or ownership of the software is |
|
40 |
hereby transferred. |
|
41 |
" |
|
42 |
! ! |
|
43 |
||
44 |
!HGWorkingCopyBrowser class methodsFor:'help specs'! |
|
45 |
||
46 |
helpSpec |
|
47 |
"This resource specification was automatically generated |
|
48 |
by the UIHelpTool of ST/X." |
|
49 |
||
50 |
"Do not manually edit this!! If it is corrupted, |
|
51 |
the UIHelpTool may not be able to read the specification." |
|
52 |
||
53 |
" |
|
54 |
UIHelpTool openOnClass:HGWorkingCopyBrowser |
|
55 |
" |
|
56 |
||
57 |
<resource: #help> |
|
58 |
||
59 |
^ super helpSpec addPairsFrom:#( |
|
60 |
||
61 |
#copyFile |
|
62 |
'' |
|
63 |
||
64 |
#cutFile |
|
65 |
'' |
|
66 |
||
67 |
#deleteFile |
|
68 |
'' |
|
69 |
||
70 |
#editFile |
|
71 |
'' |
|
72 |
||
73 |
#fileGotoBookmark |
|
74 |
'' |
|
75 |
||
76 |
#fileGotoSmalltalkDirectory |
|
77 |
'' |
|
78 |
||
79 |
#fileHistory |
|
80 |
'' |
|
81 |
||
82 |
#fileHome |
|
83 |
'' |
|
84 |
||
85 |
#fileIn |
|
86 |
'' |
|
87 |
||
88 |
#pasteFile |
|
89 |
'' |
|
90 |
||
91 |
) |
|
92 |
! ! |
|
93 |
||
94 |
!HGWorkingCopyBrowser class methodsFor:'interface specs'! |
|
95 |
||
96 |
windowSpec |
|
97 |
"This resource specification was automatically generated |
|
98 |
by the UIPainter of ST/X." |
|
99 |
||
100 |
"Do not manually edit this!! If it is corrupted, |
|
101 |
the UIPainter may not be able to read the specification." |
|
102 |
||
103 |
" |
|
104 |
UIPainter new openOnClass:HGWorkingCopyBrowser andSelector:#windowSpec |
|
105 |
HGWorkingCopyBrowser new openInterface:#windowSpec |
|
106 |
HGWorkingCopyBrowser open |
|
107 |
" |
|
108 |
||
109 |
<resource: #canvas> |
|
110 |
||
111 |
^ |
|
112 |
#(FullSpec |
|
113 |
name: windowSpec |
|
114 |
window: |
|
115 |
(WindowSpec |
|
116 |
label: FileBrowser |
|
117 |
name: FileBrowser |
|
118 |
min: (Point 10 10) |
|
119 |
bounds: (Rectangle 0 0 800 600) |
|
120 |
menu: mainMenu |
|
121 |
icon: defaultIcon |
|
122 |
) |
|
123 |
component: |
|
124 |
(SpecCollection |
|
125 |
collection: ( |
|
126 |
(ViewSpec |
|
127 |
name: 'ToolbarBox1' |
|
128 |
layout: (LayoutFrame 0 0 0 0 0 1 40 0) |
|
129 |
level: 0 |
|
130 |
visibilityChannel: toolBarVisibleHolder |
|
131 |
component: |
|
132 |
(SpecCollection |
|
133 |
collection: ( |
|
134 |
(ActionButtonSpec |
|
135 |
label: 'hideToolBarIcon' |
|
136 |
name: 'HideToolBarButton' |
|
137 |
layout: (LayoutFrame 0 0 0 0 13 0 40 0) |
|
138 |
activeHelpKey: hideToolBar |
|
139 |
hasCharacterOrientedLabel: false |
|
140 |
translateLabel: true |
|
141 |
model: hideToolbar |
|
142 |
postBuildCallback: hideToolBarButtonCreated: |
|
143 |
) |
|
144 |
(MenuPanelSpec |
|
145 |
name: 'ToolBar' |
|
146 |
layout: (LayoutFrame 13 0 0 0 0 1 40 0) |
|
147 |
level: 1 |
|
148 |
menu: toolBarMainMenu |
|
149 |
textDefault: true |
|
150 |
) |
|
151 |
) |
|
152 |
||
153 |
) |
|
154 |
) |
|
155 |
(ViewSpec |
|
156 |
name: 'ToolBarBox2' |
|
157 |
layout: (LayoutFrame 0 0 40 0 0 1 80 0) |
|
158 |
level: 0 |
|
159 |
visibilityChannel: toolbarHgVisibleHolder |
|
160 |
component: |
|
161 |
(SpecCollection |
|
162 |
collection: ( |
|
163 |
(ActionButtonSpec |
|
164 |
label: 'hideToolBarIcon' |
|
165 |
name: 'Button1' |
|
166 |
layout: (LayoutFrame 0 0 0 0 13 0 40 0) |
|
167 |
activeHelpKey: hideToolBar |
|
168 |
hasCharacterOrientedLabel: false |
|
169 |
translateLabel: true |
|
170 |
model: hideToolbarHg |
|
171 |
postBuildCallback: hideToolBarButtonCreated: |
|
172 |
) |
|
173 |
(MenuPanelSpec |
|
174 |
name: 'ToolBar2' |
|
175 |
layout: (LayoutFrame 13 0 0 0 0 1 40 0) |
|
176 |
level: 1 |
|
177 |
menu: toolBarHGMenu |
|
178 |
textDefault: true |
|
179 |
) |
|
180 |
) |
|
181 |
||
182 |
) |
|
183 |
) |
|
184 |
(ViewSpec |
|
185 |
name: 'FilenameEntryFieldBox' |
|
186 |
layout: (LayoutFrame 0 0 80 0 0 1 105 0) |
|
187 |
level: 0 |
|
188 |
visibilityChannel: filenameEntryFieldVisibleHolder |
|
189 |
component: |
|
190 |
(SpecCollection |
|
191 |
collection: ( |
|
192 |
(ActionButtonSpec |
|
193 |
label: 'hideFilenameEntryFieldIcon' |
|
194 |
name: 'HideFilenameEntryFieldButton' |
|
195 |
layout: (LayoutFrame 0 0 0 0 13 0 0 1) |
|
196 |
activeHelpKey: hideFilenameEntryField |
|
197 |
hasCharacterOrientedLabel: false |
|
198 |
translateLabel: true |
|
199 |
model: hideFilenameEntryField |
|
200 |
postBuildCallback: hideFilenameEntryFieldButtonCreated: |
|
201 |
) |
|
202 |
(HorizontalPanelViewSpec |
|
203 |
name: 'HorizontalPanel1' |
|
204 |
layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0) |
|
205 |
level: 1 |
|
206 |
horizontalLayout: leftFit |
|
207 |
verticalLayout: fit |
|
208 |
horizontalSpace: 3 |
|
209 |
verticalSpace: 3 |
|
210 |
component: |
|
211 |
(SpecCollection |
|
212 |
collection: ( |
|
213 |
(ComboListSpec |
|
214 |
name: 'ComboList1' |
|
215 |
visibilityChannel: driveSelectorVisible |
|
216 |
model: selectedDeviceDrive |
|
217 |
comboList: listOfDeviceDrives |
|
218 |
useIndex: false |
|
219 |
hidePullDownMenuButton: false |
|
220 |
extent: (Point 53 23) |
|
221 |
) |
|
222 |
(VariableHorizontalPanelSpec |
|
223 |
name: 'VariableHorizontalPanel1' |
|
224 |
level: 0 |
|
225 |
showHandle: true |
|
226 |
component: |
|
227 |
(SpecCollection |
|
228 |
collection: ( |
|
229 |
(NonScrollableArbitraryComponentSpec |
|
230 |
name: 'NonScrollableArbitraryComponent1' |
|
231 |
component: FilenameEditFieldV2 |
|
232 |
postBuildCallback: postBuildEditField: |
|
233 |
) |
|
234 |
(ViewSpec |
|
235 |
name: 'FilterBox' |
|
236 |
component: |
|
237 |
(SpecCollection |
|
238 |
collection: ( |
|
239 |
(LabelSpec |
|
240 |
label: 'Filter:' |
|
241 |
name: 'Filter' |
|
242 |
layout: (LayoutFrame 0 0 0 0 40 0 0 1) |
|
243 |
translateLabel: true |
|
244 |
adjust: left |
|
245 |
postBuildCallback: postBuildPathViewBox: |
|
246 |
) |
|
247 |
(ComboBoxSpec |
|
248 |
name: 'FilterSelectionBox' |
|
249 |
layout: (LayoutFrame 40 0 0 0 0 1 0 1) |
|
250 |
model: filterModel |
|
251 |
immediateAccept: true |
|
252 |
acceptOnPointerLeave: false |
|
253 |
comboList: filterListModel |
|
254 |
) |
|
255 |
) |
|
256 |
||
257 |
) |
|
258 |
postBuildCallback: postBuildPathViewBox: |
|
259 |
) |
|
260 |
) |
|
261 |
||
262 |
) |
|
263 |
handles: (Any 0.774936 1.0) |
|
264 |
postBuildCallback: postBuildPathViewBox: |
|
265 |
useDefaultExtent: true |
|
266 |
) |
|
267 |
) |
|
268 |
||
269 |
) |
|
270 |
postBuildCallback: postBuildPathViewBox: |
|
271 |
) |
|
272 |
) |
|
273 |
||
274 |
) |
|
275 |
) |
|
276 |
(#'FileBrowserV2UISpecifications::PanelSpec' |
|
277 |
name: 'BrowserBox' |
|
278 |
layout: (LayoutFrame 0 0.0 106 0.0 0 1.0 -26 1.0) |
|
279 |
level: 0 |
|
280 |
showHandle: true |
|
281 |
snapMode: both |
|
282 |
whichView: last |
|
283 |
orientation: vertical |
|
284 |
visibility: viewNoteBookApplicationHolder |
|
285 |
component: |
|
286 |
(SpecCollection |
|
287 |
collection: ( |
|
288 |
(#'FileBrowserV2UISpecifications::PanelSpec' |
|
289 |
name: 'HorizontalPanel' |
|
290 |
level: 0 |
|
291 |
snapMode: both |
|
292 |
whichView: first |
|
293 |
orientation: horizontal |
|
294 |
visibility: showDirectoryTree |
|
295 |
component: |
|
296 |
(SpecCollection |
|
297 |
collection: ( |
|
298 |
(SubCanvasSpec |
|
299 |
name: 'DirectoryTreeBrowser' |
|
300 |
hasHorizontalScrollBar: false |
|
301 |
hasVerticalScrollBar: false |
|
302 |
majorKey: DirectoryTreeBrowser |
|
303 |
createNewApplication: true |
|
304 |
createNewBuilder: true |
|
305 |
postBuildCallback: postBuildDirectoryTree: |
|
306 |
) |
|
307 |
(SubCanvasSpec |
|
308 |
name: 'DirectoryContentsBrowser' |
|
309 |
hasHorizontalScrollBar: false |
|
310 |
hasVerticalScrollBar: false |
|
163
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
311 |
majorKey: 'HGWorkingCopyBrowser::DirectoryContentsBrowser' |
162 | 312 |
createNewApplication: true |
313 |
createNewBuilder: true |
|
314 |
) |
|
315 |
) |
|
316 |
||
317 |
) |
|
318 |
handles: (Any 0.225 1.0) |
|
319 |
) |
|
320 |
(SubCanvasSpec |
|
321 |
name: 'FileApplicationNoteBook' |
|
322 |
tabable: false |
|
323 |
hasHorizontalScrollBar: false |
|
324 |
hasVerticalScrollBar: false |
|
325 |
majorKey: FileApplicationNoteBook |
|
326 |
createNewApplication: true |
|
327 |
createNewBuilder: true |
|
328 |
) |
|
329 |
) |
|
330 |
||
331 |
) |
|
332 |
handles: (Any 0.5 1.0) |
|
333 |
) |
|
334 |
(ViewSpec |
|
335 |
name: 'InfoBox' |
|
336 |
layout: (LayoutFrame 0 0 -26 1 0 1 0 1) |
|
337 |
level: 0 |
|
338 |
visibilityChannel: infoBarVisibleHolder |
|
339 |
component: |
|
340 |
(SpecCollection |
|
341 |
collection: ( |
|
342 |
(LabelSpec |
|
343 |
label: 'NotifyLabel' |
|
344 |
name: 'NotifyLabel' |
|
345 |
layout: (LayoutFrame 0 0 1 0.0 -220 1 1 1.0) |
|
346 |
level: -1 |
|
347 |
translateLabel: true |
|
348 |
labelChannel: notifyChannel |
|
349 |
adjust: left |
|
350 |
) |
|
351 |
(LabelSpec |
|
352 |
label: 'encoding' |
|
353 |
name: 'EncodingLabel' |
|
354 |
layout: (LayoutFrame -318 1 2 0.0 -235 1 0 1.0) |
|
355 |
activeHelpKey: encodingLabel |
|
356 |
level: 0 |
|
357 |
labelChannel: fileEncodingHolder |
|
358 |
adjust: right |
|
359 |
menu: encodingMenu |
|
360 |
) |
|
361 |
(LabelSpec |
|
362 |
name: 'FileEncodingLockedLabel' |
|
363 |
layout: (LayoutFrame -235 1 2 0.0 -220 1 20 0.0) |
|
364 |
activeHelpKey: encodingLockedLabel |
|
365 |
level: 0 |
|
366 |
labelChannel: fileEncodingLockImageHolder |
|
367 |
adjust: right |
|
368 |
menu: encodingMenu |
|
369 |
) |
|
370 |
(LabelSpec |
|
371 |
label: 'Shown Files' |
|
372 |
name: 'ShownFilesLabel' |
|
373 |
layout: (LayoutFrame -220 1 1 0.0 -65 1 1 1.0) |
|
374 |
activeHelpKey: numberOfFiles |
|
375 |
level: -1 |
|
376 |
translateLabel: true |
|
377 |
labelChannel: shownFiles |
|
378 |
adjust: right |
|
379 |
) |
|
380 |
(ViewSpec |
|
381 |
name: 'ProgressIndicatorBox' |
|
382 |
layout: (LayoutFrame -220 1 1 0.0 -65 1 1 1.0) |
|
383 |
level: -1 |
|
384 |
visibilityChannel: activityVisibilityChannel |
|
385 |
component: |
|
386 |
(SpecCollection |
|
387 |
collection: ( |
|
388 |
(ProgressIndicatorSpec |
|
389 |
name: 'ProgressIndicator1' |
|
390 |
layout: (LayoutFrame 5 0.0 -7 0.5 -5 1.0 7 0.5) |
|
391 |
backgroundColor: (Color 0.0 66.6666666666667 66.6666666666667) |
|
392 |
isActivityIndicator: true |
|
393 |
) |
|
394 |
) |
|
395 |
||
396 |
) |
|
397 |
) |
|
398 |
(LabelSpec |
|
399 |
name: 'BusyLabel' |
|
400 |
layout: (LayoutFrame -220 1 1 0.0 -65 1 1 1.0) |
|
401 |
activeHelpKey: modeLabel |
|
402 |
level: -1 |
|
403 |
visibilityChannel: busyLabelVisibleHolder |
|
404 |
translateLabel: true |
|
405 |
labelChannel: busyLabelHolder |
|
406 |
adjust: right |
|
407 |
) |
|
408 |
(LabelSpec |
|
409 |
label: 'M' |
|
410 |
name: 'ModeLabel' |
|
411 |
layout: (LayoutFrame -65 1 1 0.0 -55 1 1 1.0) |
|
412 |
activeHelpKey: modeLabel |
|
413 |
level: -1 |
|
414 |
translateLabel: true |
|
415 |
labelChannel: modeLabelHolder |
|
416 |
adjust: right |
|
417 |
postBuildCallback: postBuildEditModeInfoLabel: |
|
418 |
) |
|
419 |
(LabelSpec |
|
420 |
label: 'L' |
|
421 |
name: 'LineLabel' |
|
422 |
layout: (LayoutFrame -55 1 1 0.0 -20 1 1 1.0) |
|
423 |
activeHelpKey: lineLabel |
|
424 |
level: -1 |
|
425 |
translateLabel: true |
|
426 |
labelChannel: cursorLineLabelHolder |
|
427 |
adjust: right |
|
428 |
) |
|
429 |
(LabelSpec |
|
430 |
label: 'C' |
|
431 |
name: 'ColLabel' |
|
432 |
layout: (LayoutFrame -20 1 1 0.0 0 1 1 1.0) |
|
433 |
activeHelpKey: columnLabel |
|
434 |
level: -1 |
|
435 |
translateLabel: true |
|
436 |
labelChannel: cursorColLabelHolder |
|
437 |
adjust: right |
|
438 |
) |
|
439 |
) |
|
440 |
||
441 |
) |
|
442 |
) |
|
443 |
(LabelSpec |
|
444 |
label: 'Preview' |
|
445 |
name: 'PreviewLabel' |
|
446 |
layout: (LayoutFrame 0 0.5 93 0 100 0.5 115 0) |
|
447 |
level: 0 |
|
448 |
borderWidth: 1 |
|
449 |
visibilityChannel: previewVisibleHolder |
|
450 |
backgroundColor: (Color 86.9993133440147 86.9993133440147 86.9993133440147) |
|
451 |
translateLabel: true |
|
452 |
) |
|
453 |
(ArbitraryComponentSpec |
|
454 |
name: 'Preview' |
|
455 |
layout: (LayoutFrame 0 0.5 116 0 -147 1 -266 1) |
|
456 |
level: 1 |
|
457 |
visibilityChannel: previewVisibleHolder |
|
458 |
hasBorder: false |
|
459 |
component: ImageView |
|
460 |
) |
|
461 |
(ActionButtonSpec |
|
462 |
label: 'closePreviewButtonImage' |
|
463 |
name: 'ClosePreviewButton' |
|
464 |
layout: (LayoutFrame -169 1 94 0 -147 1 116 0) |
|
465 |
visibilityChannel: previewVisibleHolder |
|
466 |
hasCharacterOrientedLabel: false |
|
467 |
translateLabel: true |
|
468 |
) |
|
469 |
) |
|
470 |
||
471 |
) |
|
472 |
) |
|
163
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
473 |
|
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
474 |
"Modified: / 14-12-2012 / 19:59:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
162 | 475 |
! ! |
476 |
||
477 |
!HGWorkingCopyBrowser class methodsFor:'menu specs'! |
|
478 |
||
479 |
scmMenuSlice |
|
480 |
"This resource specification was automatically generated |
|
481 |
by the MenuEditor of ST/X." |
|
482 |
||
483 |
"Do not manually edit this!! If it is corrupted, |
|
484 |
the MenuEditor may not be able to read the specification." |
|
485 |
||
486 |
||
487 |
" |
|
488 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#scmMenuSlice |
|
489 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser scmMenuSlice)) startUp |
|
490 |
" |
|
491 |
||
492 |
<resource: #menu> |
|
493 |
||
494 |
^ |
|
495 |
#(Menu |
|
496 |
( |
|
497 |
(MenuItem |
|
498 |
label: 'Mercurial' |
|
499 |
translateLabel: true |
|
500 |
submenuChannel: hgMenu |
|
501 |
) |
|
502 |
||
503 |
) |
|
504 |
nil |
|
505 |
nil |
|
506 |
) |
|
507 |
||
508 |
"Created: / 14-12-2012 / 15:25:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
509 |
! |
|
510 |
||
511 |
toolBarMainMenu |
|
512 |
"This resource specification was automatically generated |
|
513 |
by the MenuEditor of ST/X." |
|
514 |
||
515 |
"Do not manually edit this!! If it is corrupted, |
|
516 |
the MenuEditor may not be able to read the specification." |
|
517 |
||
518 |
||
519 |
" |
|
520 |
MenuEditor new openOnClass:HGWorkingCopyBrowser andSelector:#toolBarMainMenu |
|
521 |
(Menu new fromLiteralArrayEncoding:(HGWorkingCopyBrowser toolBarMainMenu)) startUp |
|
522 |
" |
|
523 |
||
524 |
<resource: #menu> |
|
525 |
||
526 |
^ |
|
527 |
#(Menu |
|
528 |
( |
|
529 |
(MenuItem |
|
530 |
activeHelpKey: directoryBack |
|
531 |
enabled: enableBack |
|
532 |
label: 'Back' |
|
533 |
itemValue: doBack |
|
534 |
isButton: true |
|
535 |
submenuChannel: menuDirHistoryBack |
|
536 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyBackIcon) |
|
537 |
) |
|
538 |
(MenuItem |
|
539 |
label: '' |
|
540 |
) |
|
541 |
(MenuItem |
|
542 |
activeHelpKey: directoryForward |
|
543 |
enabled: enableForward |
|
544 |
label: 'Forward' |
|
545 |
itemValue: doForward |
|
546 |
isButton: true |
|
547 |
submenuChannel: menuDirHistoryForward |
|
548 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyForwardIcon) |
|
549 |
) |
|
550 |
(MenuItem |
|
551 |
label: '-' |
|
552 |
) |
|
553 |
(MenuItem |
|
554 |
activeHelpKey: directoryUp |
|
555 |
enabled: enableDirectoryUp |
|
556 |
label: 'DirectoryUp' |
|
557 |
itemValue: doGoDirectoryUp |
|
558 |
isButton: true |
|
559 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryUpIcon) |
|
560 |
) |
|
561 |
(MenuItem |
|
562 |
activeHelpKey: fileHome |
|
563 |
enabled: enableHome |
|
564 |
label: 'Home' |
|
565 |
itemValue: doGotoHomeDirectory |
|
566 |
isButton: true |
|
567 |
isVisible: false |
|
568 |
labelImage: (ResourceRetriever ToolbarIconLibrary homeIcon) |
|
569 |
) |
|
570 |
(MenuItem |
|
571 |
activeHelpKey: fileGotoDefaultDirectory |
|
572 |
enabled: enableGotoDefaultDirectory |
|
573 |
label: 'Current' |
|
574 |
itemValue: doGotoDefaultDirectory |
|
575 |
isButton: true |
|
576 |
isVisible: false |
|
577 |
labelImage: (ResourceRetriever ToolbarIconLibrary currentDirectoryIcon) |
|
578 |
) |
|
579 |
(MenuItem |
|
580 |
activeHelpKey: fileGotoSmalltalkDirectory |
|
581 |
enabled: enableGotoSmalltalkDirectory |
|
582 |
label: 'ST/X Default' |
|
583 |
itemValue: doGotoSmalltalkDirectory |
|
584 |
isButton: true |
|
585 |
isVisible: false |
|
586 |
labelImage: (ResourceRetriever ToolbarIconLibrary stxHomeIcon) |
|
587 |
) |
|
588 |
(MenuItem |
|
589 |
activeHelpKey: fileGotoBookmark |
|
590 |
label: 'Bookmarks' |
|
591 |
isButton: true |
|
592 |
isVisible: false |
|
593 |
submenuChannel: gotoBookmarksMenu |
|
594 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryBookmarksIcon) |
|
595 |
) |
|
596 |
(MenuItem |
|
597 |
activeHelpKey: fileHistory |
|
598 |
enabled: enableFileHistory |
|
599 |
label: 'File History' |
|
600 |
isButton: true |
|
601 |
isVisible: false |
|
602 |
submenuChannel: menuFileHistory |
|
603 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyIcon) |
|
604 |
) |
|
605 |
(MenuItem |
|
606 |
label: '-' |
|
607 |
) |
|
608 |
(MenuItem |
|
609 |
activeHelpKey: searchFile |
|
610 |
label: 'Search File' |
|
611 |
itemValue: doOpenSearchFile |
|
612 |
isButton: true |
|
613 |
labelImage: (ResourceRetriever ToolbarIconLibrary searchFileIcon) |
|
614 |
) |
|
615 |
(MenuItem |
|
616 |
label: '-' |
|
617 |
) |
|
618 |
(MenuItem |
|
619 |
activeHelpKey: cutFile |
|
620 |
enabled: hasSelection |
|
621 |
label: 'Cut' |
|
622 |
itemValue: cutFiles |
|
623 |
isButton: true |
|
624 |
isVisible: false |
|
625 |
labelImage: (ResourceRetriever ToolbarIconLibrary cutFileIcon) |
|
626 |
) |
|
627 |
(MenuItem |
|
628 |
activeHelpKey: copyFile |
|
629 |
enabled: hasSelection |
|
630 |
label: 'Copy' |
|
631 |
itemValue: copyFiles |
|
632 |
isButton: true |
|
633 |
isVisible: false |
|
634 |
labelImage: (ResourceRetriever ToolbarIconLibrary copyFileIcon) |
|
635 |
) |
|
636 |
(MenuItem |
|
637 |
activeHelpKey: pasteFile |
|
638 |
enabled: canPaste |
|
639 |
label: 'Paste' |
|
640 |
itemValue: pasteFiles |
|
641 |
isButton: true |
|
642 |
isVisible: false |
|
643 |
labelImage: (ResourceRetriever ToolbarIconLibrary pasteFileIcon) |
|
644 |
) |
|
645 |
(MenuItem |
|
646 |
activeHelpKey: deleteFile |
|
647 |
enabled: hasSelection |
|
648 |
label: 'Delete' |
|
649 |
itemValue: deleteFiles |
|
650 |
isButton: true |
|
651 |
isVisible: false |
|
652 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteFileIcon) |
|
653 |
) |
|
654 |
(MenuItem |
|
655 |
label: '-' |
|
656 |
isVisible: false |
|
657 |
) |
|
658 |
(MenuItem |
|
659 |
activeHelpKey: editFile |
|
660 |
label: 'Edit File' |
|
661 |
itemValue: doShowFileContents |
|
662 |
isButton: true |
|
663 |
isVisible: false |
|
664 |
labelImage: (ResourceRetriever ToolbarIconLibrary editFileIcon) |
|
665 |
) |
|
666 |
(MenuItem |
|
667 |
activeHelpKey: fileIn |
|
668 |
label: 'File In' |
|
669 |
itemValue: fileFileIn |
|
670 |
isButton: true |
|
671 |
isVisible: false |
|
672 |
labelImage: (ResourceRetriever ToolbarIconLibrary fileInIcon) |
|
673 |
) |
|
674 |
(MenuItem |
|
675 |
activeHelpKey: openChangeBrowser |
|
676 |
enabled: hasFileSelection |
|
677 |
label: 'Changes Browser' |
|
678 |
itemValue: openChangesBrowser |
|
679 |
isButton: true |
|
680 |
labelImage: (ResourceRetriever ToolbarIconLibrary startChangesBrowserIcon) |
|
681 |
) |
|
682 |
(MenuItem |
|
683 |
label: '-' |
|
684 |
isVisible: false |
|
685 |
) |
|
686 |
(MenuItem |
|
687 |
activeHelpKey: addTerminal |
|
688 |
label: 'VT100' |
|
689 |
itemValue: doAddTerminal |
|
690 |
isButton: true |
|
691 |
labelImage: (ResourceRetriever ToolbarIconLibrary shellTerminalIcon) |
|
692 |
) |
|
693 |
(MenuItem |
|
694 |
activeHelpKey: make |
|
695 |
enabled: canMake |
|
696 |
label: 'Make' |
|
697 |
itemValue: doMake |
|
698 |
isButton: true |
|
699 |
labelImage: (ResourceRetriever ToolbarIconLibrary make24x24Icon3) |
|
700 |
) |
|
701 |
(MenuItem |
|
702 |
activeHelpKey: viewDetails |
|
703 |
label: 'viewDetails' |
|
704 |
isButton: true |
|
705 |
startGroup: right |
|
706 |
hideMenuOnActivated: false |
|
707 |
indication: viewDetails |
|
708 |
labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
|
709 |
) |
|
710 |
(MenuItem |
|
711 |
activeHelpKey: viewDetails |
|
712 |
label: 'viewDetails' |
|
713 |
isButton: true |
|
714 |
startGroup: right |
|
715 |
isVisible: false |
|
716 |
indication: viewDetails |
|
717 |
submenuChannel: viewDetailsMenuSpec |
|
718 |
labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
|
719 |
) |
|
720 |
(MenuItem |
|
721 |
activeHelpKey: selectDetails |
|
722 |
label: '' |
|
723 |
isButton: true |
|
724 |
startGroup: right |
|
725 |
submenuChannel: viewDetailsMenuSpec |
|
726 |
labelImage: (ResourceRetriever ToolbarIconLibrary empty1x20Icon) |
|
727 |
) |
|
728 |
) |
|
729 |
nil |
|
730 |
nil |
|
731 |
) |
|
732 |
! ! |
|
733 |
||
734 |
!HGWorkingCopyBrowser methodsFor:'actions'! |
|
735 |
||
736 |
hideToolbarHg |
|
737 |
||
738 |
self toolbarHgVisibleHolder value: false |
|
739 |
||
740 |
"Created: / 14-12-2012 / 15:21:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
741 |
! ! |
|
742 |
||
743 |
!HGWorkingCopyBrowser methodsFor:'aspects'! |
|
744 |
||
163
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
745 |
directoryContentsBrowser |
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
746 |
^ self applications at:#'HGWorkingCopyBrowser::DirectoryContentsBrowser' ifAbsent:nil. |
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
747 |
|
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
748 |
"Created: / 14-12-2012 / 20:01:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
749 |
! |
21bc6994087d
Experimental HGWorkingCopyBrowser - unfinished!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
162
diff
changeset
|
750 |
|
162 | 751 |
toolbarHgVisibleHolder |
752 |
"return/create the 'bookmarkBarVisibleHolder' value holder (automatically generated)" |
|
753 |
||
754 |
toolbarHgVisibleHolder isNil ifTrue:[ |
|
755 |
toolbarHgVisibleHolder := true asValue. |
|
756 |
toolbarHgVisibleHolder addDependent:self. |
|
757 |
]. |
|
758 |
^ toolbarHgVisibleHolder |
|
759 |
||
760 |
"Created: / 14-12-2012 / 15:20:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
761 |
! |
|
762 |
||
763 |
toolbarHgVisibleHolder:something |
|
764 |
"set the 'bookmarkBarVisibleHolder' value holder (automatically generated)" |
|
765 |
||
766 |
|oldValue newValue| |
|
767 |
||
768 |
toolbarHgVisibleHolder notNil ifTrue:[ |
|
769 |
oldValue := toolbarHgVisibleHolder value. |
|
770 |
toolbarHgVisibleHolder removeDependent:self. |
|
771 |
]. |
|
772 |
toolbarHgVisibleHolder := something. |
|
773 |
toolbarHgVisibleHolder notNil ifTrue:[ |
|
774 |
toolbarHgVisibleHolder addDependent:self. |
|
775 |
]. |
|
776 |
newValue := toolbarHgVisibleHolder value. |
|
777 |
oldValue ~~ newValue ifTrue:[ |
|
778 |
self update:#value with:newValue from:toolbarHgVisibleHolder. |
|
779 |
]. |
|
780 |
||
781 |
"Created: / 14-12-2012 / 15:20:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
782 |
! ! |
|
783 |
||
784 |
!HGWorkingCopyBrowser methodsFor:'aspects-visibility'! |
|
785 |
||
786 |
hgMenusAreShown |
|
787 |
^true |
|
788 |
||
789 |
"Created: / 14-12-2012 / 15:41:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
790 |
! ! |
|
791 |
||
792 |
!HGWorkingCopyBrowser methodsFor:'change & update'! |
|
793 |
||
794 |
currentFileNameHolderChanged |
|
795 |
super currentFileNameHolderChanged. |
|
796 |
||
797 |
"Created: / 20-04-2012 / 18:04:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
798 |
"Modified: / 14-12-2012 / 15:23:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
799 |
! |
|
800 |
||
801 |
update:something with:aParameter from:changedObject |
|
802 |
"Invoked when an object that I depend upon sends a change notification." |
|
803 |
||
804 |
"stub code automatically generated - please change as required" |
|
805 |
||
806 |
"/ changedObject == someOfMyValueHolders ifTrue:[ |
|
807 |
"/ self doSomethingApropriate. |
|
808 |
"/ ^ self. |
|
809 |
"/ ]. |
|
810 |
super update:something with:aParameter from:changedObject |
|
811 |
! |
|
812 |
||
813 |
updateToolVisibility |
|
814 |
|builder toolBar bookmarkBar infoBar filenameEntryField vPanel topOffset bottomOffset |
|
815 |
toolBarVisible bookmarkBarVisible filenameEntryFieldVisible infoBarVisible d| |
|
816 |
||
817 |
builder := self builder. |
|
818 |
||
819 |
topOffset := 0. |
|
820 |
bottomOffset := 0. |
|
821 |
||
822 |
toolBarVisible := self toolBarVisibleHolder value. |
|
823 |
toolBarVisible ifTrue:[ |
|
824 |
toolBar := builder componentAt:#ToolbarBox1. |
|
825 |
topOffset := topOffset + toolBar height. |
|
826 |
]. |
|
827 |
||
828 |
bookmarkBarVisible := self toolbarHgVisibleHolder value. |
|
829 |
bookmarkBarVisible ifTrue:[ |
|
830 |
bookmarkBar := builder componentAt:#ToolBarBox2. |
|
831 |
topOffset := topOffset + (bookmarkBar height max: 40) |
|
832 |
]. |
|
833 |
||
834 |
filenameEntryFieldVisible := self filenameEntryFieldVisibleHolder value. |
|
835 |
filenameEntryFieldVisible ifTrue:[ |
|
836 |
filenameEntryField := builder componentAt:#FilenameEntryFieldBox. |
|
837 |
d := filenameEntryField layout bottomOffset - filenameEntryField layout topOffset. |
|
838 |
filenameEntryField layout topOffset:topOffset bottomOffset:topOffset + d. |
|
839 |
topOffset := topOffset + filenameEntryField height. |
|
840 |
filenameEntryField container notNil ifTrue:[ |
|
841 |
filenameEntryField containerChangedSize. |
|
842 |
]. |
|
843 |
]. |
|
844 |
||
845 |
infoBarVisible := self infoBarVisibleHolder value. |
|
846 |
infoBarVisible ifTrue:[ |
|
847 |
infoBar := builder componentAt:#InfoBox. |
|
848 |
bottomOffset := bottomOffset - infoBar height. |
|
849 |
]. |
|
850 |
||
851 |
vPanel := builder componentAt:#BrowserBox. |
|
852 |
vPanel layout topOffset:topOffset+1. |
|
853 |
vPanel layout bottomOffset:bottomOffset-1. |
|
854 |
vPanel container notNil ifTrue:[ |
|
855 |
vPanel containerChangedSize. |
|
856 |
]. |
|
857 |
||
858 |
"Modified: / 14-12-2012 / 15:23:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
859 |
! ! |
|
860 |
||
861 |
!HGWorkingCopyBrowser class methodsFor:'documentation'! |
|
862 |
||
863 |
version_HG |
|
864 |
||
865 |
^ '$Changeset: <not expanded> $' |
|
866 |
! ! |
|
210 | 867 |