arcadia 0.13.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README +19 -15
- data/bin/arc +0 -0
- data/conf/LC/en-UK.LANG +1 -1
- data/conf/LC/ru-RU.LANG +272 -0
- data/conf/theme-dark.conf +3 -3
- data/ext/ae-dir-projects/ae-dir-projects.rb +5 -5
- data/ext/ae-editor/ae-editor.rb +302 -178
- data/ext/ae-subprocess-inspector/ae-subprocess-inspector.rb +2 -2
- data/ext/ae-term/ae-term.rb +11 -2
- data/lib/a-commons.rb +49 -19
- data/lib/a-contracts.rb +13 -0
- data/lib/a-core.rb +139 -36
- data/lib/a-tkcommons.rb +23 -8
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ArrowButton.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/BWidget.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Button.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ButtonBox.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ComboBox.html +8 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Dialog.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/DragSite.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/DropSite.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/DynamicHelp.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Entry.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Label.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/LabelEntry.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/LabelFrame.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ListBox.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/MainFrame.html +28 -23
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/MessageDlg.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/NoteBook.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/PagesManager.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/PanedWindow.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/PanelFrame.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/PasswdDlg.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ProgressBar.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ProgressDlg.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ScrollView.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ScrollableFrame.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ScrolledWindow.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/SelectColor.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/SelectFont.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Separator.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/SpinBox.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/StatusBar.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/TitleFrame.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Tree.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Widget.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/contents.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/index.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/navtree.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/options.htm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/CHANGES.txt +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/ChangeLog +59 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/LICENSE.txt +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/README.txt +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/arrow.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/bitmap.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/button.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/buttonbox.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/color.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/combobox.tcl +8 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/basic.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/bwidget.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/demo.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/dnd.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/manager.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/select.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/tmpldlg.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/tree.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/x1.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/dialog.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/dragsite.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/dropsite.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/dynhelp.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/entry.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/font.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/bold.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/copy.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/cut.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/dragfile.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/dragicon.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/error.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/file.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/folder.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/hourglass.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/info.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/italic.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/minus.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/new.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/opcopy.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/open.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/openfold.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/oplink.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/opmove.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/overstrike.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/palette.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/passwd.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/paste.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/plus.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/print.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/question.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/redo.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/save.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/target.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/underline.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/undo.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/warning.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/init.tcl +9 -8
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/label.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/labelentry.tcl +4 -1
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/labelframe.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/da.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/de.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/en.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/es.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/fr.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/hu.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/nl.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/no.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/pl.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/listbox.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/mainframe.tcl +110 -22
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/messagedlg.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/notebook.tcl +13 -3
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/pagesmgr.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/panedw.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/panelframe.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/passwddlg.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/pkgIndex.tcl +2 -3
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/progressbar.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/progressdlg.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/scrollframe.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/scrollview.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/scrollw.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/separator.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/spinbox.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/statusbar.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/tests/entry.test +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/titleframe.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/tree.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/utils.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/widget.tcl +15 -2
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/wizard.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/xpm2image.tcl +90 -28
- metadata +146 -196
- data/tcl/fsdialog/de.msg +0 -30
- data/tcl/fsdialog/en.msg +0 -31
- data/tcl/fsdialog/fsdialog.tcl +0 -1783
- data/tcl/fsdialog/fsdlg-gif.tcl +0 -259
- data/tcl/fsdialog/fsdlg-png.tcl +0 -265
- data/tcl/fsdialog/sv.msg +0 -32
- data/tcl/fsdialog/tclIndex +0 -6
- data/tcl/ptwidgets-1.1.0/COPYRIGHT +0 -10
- data/tcl/ptwidgets-1.1.0/ChangeLog +0 -194
- data/tcl/ptwidgets-1.1.0/README +0 -50
- data/tcl/ptwidgets-1.1.0/common/stacktrace.tcl +0 -29
- data/tcl/ptwidgets-1.1.0/common/tokenframe.tcl +0 -200
- data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_off.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_on.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokenentry.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example2.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/wmarkentry.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/toggleswitch.html +0 -402
- data/tcl/ptwidgets-1.1.0/doc/tokenentry.html +0 -1366
- data/tcl/ptwidgets-1.1.0/doc/tokensearch.html +0 -1549
- data/tcl/ptwidgets-1.1.0/doc/wmarkentry.html +0 -634
- data/tcl/ptwidgets-1.1.0/library/toggleswitch.tcl +0 -432
- data/tcl/ptwidgets-1.1.0/library/tokenentry.tcl +0 -2208
- data/tcl/ptwidgets-1.1.0/library/tokensearch.tcl +0 -2488
- data/tcl/ptwidgets-1.1.0/library/wmarkentry.tcl +0 -630
- data/tcl/ptwidgets-1.1.0/pkgIndex.tcl +0 -10
- data/tcl/ptwidgets-1.1.0/test/Makefile +0 -3
- data/tcl/ptwidgets-1.1.0/test/run.tcl +0 -3
- data/tcl/ptwidgets-1.1.0/test/test.tcl +0 -89
- data/tcl/ptwidgets-1.1.0/test/toggleswitch.test +0 -562
- data/tcl/ptwidgets-1.1.0/test/tokenentry.test +0 -1023
- data/tcl/ptwidgets-1.1.0/test/tokensearch.test +0 -1023
- data/tcl/ptwidgets-1.1.0/test/wmarkentry.test +0 -1325
- data/tcl/themes/altTheme.tcl +0 -101
- data/tcl/themes/aquaTheme.tcl +0 -59
- data/tcl/themes/clamTheme.tcl +0 -140
- data/tcl/themes/classicTheme.tcl +0 -108
- data/tcl/themes/pkgIndex.tcl +0 -3
- data/tcl/themes/ttk.tcl +0 -176
- data/tcl/themes/vistaTheme.tcl +0 -224
- data/tcl/themes/winTheme.tcl +0 -80
- data/tcl/themes/xpTheme.tcl +0 -65
- data/tcl/tkfbox/folder.gif +0 -0
- data/tcl/tkfbox/textfile.gif +0 -0
- data/tcl/tkfbox/tkfbox.tcl +0 -1
- data/tcl/tkfbox/tkfbox.tcl~ +0 -1
- data/tcl/tkfbox/updir.xbm +0 -1
data/tcl/tkfbox/tkfbox.tcl~
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# tkfbox.tcl --
|
|
2
|
return [mtkFDialog open $args]
|
|
3
1
|
|
|
4
2
|
return [mtkFDialog save $args]
|
|
5
3
|
global tkPriv data
|
|
6
4
|
|
|
7
5
|
if [info exists data] {unset data}
|
|
8
6
|
create-file-dialog
|
|
9
7
|
mtkFDialog_Config $type $argList
|
|
10
8
|
mtkFDialog_SetPath $data(selectPath)
|
|
11
9
|
# 6. Withdraw the window, then update all the geometry information
|
|
12
10
|
# so we know how big it wants to be, then center the window in the
|
|
13
11
|
# display and de-iconify it.
|
|
14
12
|
wm withdraw .tkfd
|
|
15
13
|
update idletasks
|
|
16
14
|
set x [expr [winfo screenwidth .tkfd]/2 - [winfo reqwidth .tkfd]/2 \
|
|
17
15
|
set y [expr [winfo screenheight .tkfd]/2 - [winfo reqheight .tkfd]/2 \
|
|
18
16
|
wm geom .tkfd [winfo reqwidth .tkfd]x[winfo reqheight .tkfd]+$x+$y
|
|
19
17
|
wm deiconify .tkfd
|
|
20
18
|
wm title .tkfd $data(-title)
|
|
21
19
|
# 7. Set a grab and claim the focus too.
|
|
22
20
|
set oldFocus [focus]
|
|
23
21
|
set oldGrab [grab current .tkfd]
|
|
24
22
|
if {$oldGrab != ""} {
|
|
25
23
|
}
|
|
26
24
|
#Mick: changed to grab global
|
|
27
25
|
grab .tkfd
|
|
28
26
|
wm transient .tkfd .
|
|
29
27
|
focus .tkfd.f2.ent
|
|
30
28
|
.tkfd.f2.ent delete 0 end
|
|
31
29
|
.tkfd.f2.ent insert 0 $data(selectFile)
|
|
32
30
|
.tkfd.f2.ent select from 0
|
|
33
31
|
.tkfd.f2.ent select to end
|
|
34
32
|
.tkfd.f2.ent icursor end
|
|
35
33
|
# Ensure the window is fronted
|
|
36
34
|
raise .tkfd
|
|
37
35
|
|
|
38
36
|
# 8. Wait for the user to respond, then restore the focus and
|
|
39
37
|
# return the index of the selected button. Restore the focus
|
|
40
38
|
# before deleting the window, since otherwise the window manager
|
|
41
39
|
# may take the focus away so we can't redirect it. Finally,
|
|
42
40
|
# restore any grab that was in effect.
|
|
43
41
|
tkwait variable tkPriv(selectFilePath)
|
|
44
42
|
catch {focus $oldFocus}
|
|
45
43
|
grab release .tkfd
|
|
46
44
|
wm withdraw .tkfd
|
|
47
45
|
if {$oldGrab != ""} {
|
|
48
46
|
}
|
|
49
47
|
update
|
|
50
48
|
return $tkPriv(selectFilePath)
|
|
51
49
|
global LIBRARY data tkPriv
|
|
52
50
|
if [winfo exists .tkfd] {destroy .tkfd}
|
|
53
51
|
toplevel .tkfd -class mtkFDialog
|
|
54
52
|
wm protocol .tkfd WM_DELETE_WINDOW "mtkFDialog_CancelCmd"
|
|
55
53
|
# f1: the frame with the directory option menu
|
|
56
54
|
#
|
|
57
55
|
set f1 [frame .tkfd.f1]
|
|
58
56
|
label .tkfd.f1.lab -text "Directory:" -under 0
|
|
59
57
|
tk_optionMenu .tkfd.f1.menu data(selectPath) ""
|
|
60
58
|
.tkfd.f1.menu config -takefocus 1 -highlightthickness 2
|
|
61
59
|
button .tkfd.f1.up -bitmap @[file join $LIBRARY updir.xbm]
|
|
62
60
|
|
|
63
61
|
pack .tkfd.f1.up -side right -padx 4 -fill both
|
|
64
62
|
pack .tkfd.f1.lab -side left -padx 4 -fill both
|
|
65
63
|
pack .tkfd.f1.menu -expand yes -fill both -padx 4
|
|
66
64
|
# .tkfd.icons: the IconList that list the files and directories.
|
|
67
65
|
#
|
|
68
66
|
tkIconList .tkfd.icons\
|
|
69
67
|
# f2: the frame with the OK button and the "file name" field
|
|
70
68
|
#
|
|
71
69
|
frame .tkfd.f2
|
|
72
70
|
label .tkfd.f2.lab -text "File name:" -anchor e -width 14 -under 6
|
|
73
71
|
entry .tkfd.f2.ent -bg white
|
|
74
72
|
# f3: the frame with the cancel button and the file types field
|
|
75
73
|
#
|
|
76
74
|
frame .tkfd.f3
|
|
77
75
|
label .tkfd.f3.lab -text "Files of type:" \
|
|
78
76
|
menubutton .tkfd.f3.menu -indicatoron 1 -menu .tkfd.f3.menu.m
|
|
79
77
|
menu .tkfd.f3.menu.m -tearoff 0
|
|
80
78
|
.tkfd.f3.menu config -takefocus 1 -highlightthickness 2 \
|
|
81
79
|
# the okBtn is created after the typeMenu so that the keyboard traversal
|
|
82
80
|
# is in the right order
|
|
83
81
|
button .tkfd.f2.ok -text OK -under 0 -width 6
|
|
84
82
|
button .tkfd.f3.cancel -text Cancel -under 0 -width 6
|
|
85
83
|
# pack the widgets in f2 and f3
|
|
86
84
|
#
|
|
87
85
|
pack .tkfd.f2.ok -side right -padx 4 -anchor e
|
|
88
86
|
pack .tkfd.f2.lab -side left -padx 4
|
|
89
87
|
pack .tkfd.f2.ent -expand yes -fill both -padx 2 -pady 2
|
|
90
88
|
|
|
91
89
|
pack .tkfd.f3.cancel -side right -padx 4 -anchor w
|
|
92
90
|
pack .tkfd.f3.lab -side left -padx 4
|
|
93
91
|
pack .tkfd.f3.menu -expand yes -fill x -side right
|
|
94
92
|
# Pack all the frames together. We are done with widget construction.
|
|
95
93
|
#
|
|
96
94
|
pack .tkfd.f1 -side top -fill x -pady 4
|
|
97
95
|
pack .tkfd.f3 -side bottom -fill x
|
|
98
96
|
pack .tkfd.f2 -side bottom -fill x
|
|
99
97
|
pack .tkfd.icons -expand yes -fill both -padx 4 -pady 2
|
|
100
98
|
# Set up the event handlers
|
|
101
99
|
#
|
|
102
100
|
bind .tkfd.f2.ent <Return> "mtkFDialog_ActivateEnt"
|
|
103
101
|
|
|
104
102
|
.tkfd.f1.up config -command "mtkFDialog_UpDirCmd"
|
|
105
103
|
.tkfd.f2.ok config -command "mtkFDialog_OkCmd"
|
|
106
104
|
.tkfd.f3.cancel config -command "mtkFDialog_CancelCmd"
|
|
107
105
|
bind .tkfd <Alt-d> "focus .tkfd.f1.menu"
|
|
108
106
|
bind .tkfd <Alt-t> "focus .tkfd.f3.menu"
|
|
109
107
|
bind .tkfd <Alt-n> "focus .tkfd.f2.ent"
|
|
110
108
|
bind .tkfd <KeyPress-Escape> "tkButtonInvoke .tkfd.f3.cancel"
|
|
111
109
|
bind .tkfd <Alt-o> "mtkFDialog_InvokeBtn Open"
|
|
112
110
|
bind .tkfd <Alt-s> "mtkFDialog_InvokeBtn Save"
|
|
113
111
|
# Build the focus group for all the entries
|
|
114
112
|
#
|
|
115
113
|
tkFocusGroup_Create .tkfd
|
|
116
114
|
tkFocusGroup_BindIn .tkfd .tkfd.f2.ent "mtkFDialog_EntFocusIn"
|
|
117
115
|
tkFocusGroup_BindOut .tkfd .tkfd.f2.ent "mtkFDialog_EntFocusOut"
|
|
118
116
|
# Create images for use in directory lists
|
|
119
117
|
if ![info exists tkPriv(folderImage)] {
|
|
120
118
|
}
|
|
121
119
|
global data
|
|
122
120
|
set data(type) $type
|
|
123
121
|
|
|
124
122
|
# 1: the configuration specs
|
|
125
123
|
#
|
|
126
124
|
set specs {
|
|
127
125
|
}
|
|
128
126
|
|
|
129
127
|
# 3: parse the arguments
|
|
130
128
|
#
|
|
131
129
|
tclParseConfigSpec data $specs "" $argList
|
|
132
130
|
|
|
133
131
|
if {$data(-title) == ""} {
|
|
134
132
|
}
|
|
135
133
|
|
|
136
134
|
# Mick Changes: Sets the initialdir to the path of initialfile
|
|
137
135
|
# if initialdir not set.
|
|
138
136
|
# Always wipes the dir path of initialfile
|
|
139
137
|
if { $data(-initialfile) != {} } {
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
# 4: set the default directory and selection according to the -initial
|
|
143
141
|
# settings
|
|
144
142
|
#
|
|
145
143
|
if { $data(-initialdir) == ""} {
|
|
146
144
|
} else {
|
|
147
145
|
}
|
|
148
146
|
# 5. Parse the -filetypes option
|
|
149
147
|
#
|
|
150
148
|
set data(-filetypes) [tkFDGetFileTypes $data(-filetypes)]
|
|
151
149
|
if {$data(-filetypes) == {}} {
|
|
152
150
|
} else {
|
|
153
151
|
}
|
|
154
152
|
wm transient .tkfd $data(-parent)
|
|
155
153
|
if ![winfo exists $data(-parent)] {
|
|
156
154
|
}
|
|
157
155
|
global data tcl_platform
|
|
158
156
|
set data(selectPath) $path
|
|
159
157
|
set appPWD [pwd]
|
|
160
158
|
if { $tcl_platform(platform) == "windows" && $data(selectPath) == "My Computer"} {
|
|
161
159
|
mtkFDialog_Update
|
|
162
160
|
my-cd "$appPWD"
|
|
163
161
|
return
|
|
164
162
|
}
|
|
165
163
|
mtkFDialog_Update
|
|
166
164
|
my-cd "$appPWD"
|
|
167
165
|
return
|
|
168
166
|
}
|
|
169
167
|
|
|
170
168
|
|
|
171
169
|
if [catch "my-cd \"$data(selectPath)\""] {
|
|
172
170
|
}
|
|
173
171
|
# Update the Directory: option menu
|
|
174
172
|
#
|
|
175
173
|
set list ""
|
|
176
174
|
# Mick: allow PCs to select other drives
|
|
177
175
|
global tcl_platform
|
|
178
176
|
switch -- $tcl_platform(platform) {
|
|
179
177
|
"windows" {set list [list "My Computer"]}
|
|
180
178
|
"macintosh" {set list [list "Desktop"]}
|
|
181
179
|
}
|
|
182
180
|
set dir ""
|
|
183
181
|
foreach subdir [file split $data(selectPath)] {
|
|
184
182
|
}
|
|
185
183
|
.tkfd.f1.menu.menu delete 0 end
|
|
186
184
|
foreach path $list {
|
|
187
185
|
}
|
|
188
186
|
# Restore the PWD to the application's PWD
|
|
189
187
|
#
|
|
190
188
|
my-cd "$appPWD"
|
|
191
189
|
# Change the displayed directory
|
|
192
190
|
mtkFDialog_Update
|
|
193
191
|
global data tkPriv tcl_platform
|
|
194
192
|
# If this is the Mac Desktop or PC "My Computer", just show the lists
|
|
195
193
|
tkf_show-toplevel
|
|
196
194
|
return
|
|
197
195
|
}
|
|
198
196
|
tkf_show-toplevel
|
|
199
197
|
return
|
|
200
198
|
}
|
|
201
199
|
# if the flter isnt set yet, delay the update
|
|
202
200
|
if {$data(-filetypes) != {}} {
|
|
203
201
|
}
|
|
204
202
|
|
|
205
203
|
set folder $tkPriv(folderImage)
|
|
206
204
|
set file $tkPriv(fileImage)
|
|
207
205
|
# Turn on the busy cursor. BUG?? We haven't disabled X events, though,
|
|
208
206
|
# so the user may still click and cause havoc ...
|
|
209
207
|
#
|
|
210
208
|
set entCursor [.tkfd.f2.ent cget -cursor]
|
|
211
209
|
set dlgCursor [.tkfd cget -cursor]
|
|
212
210
|
.tkfd.f2.ent config -cursor watch
|
|
213
211
|
.tkfd config -cursor watch
|
|
214
212
|
update idletasks
|
|
215
213
|
|
|
216
214
|
tkIconList_DeleteAll
|
|
217
215
|
my-cd "$data(selectPath)"
|
|
218
216
|
set globlist [lsort -dictionary [glob -nocomplain .* *]]
|
|
219
217
|
delete globlist "."
|
|
220
218
|
delete globlist ".."
|
|
221
219
|
# Make the dir list
|
|
222
220
|
#
|
|
223
221
|
foreach f $globlist {
|
|
224
222
|
}
|
|
225
223
|
# Make the file list
|
|
226
224
|
#
|
|
227
225
|
if { $data(filter)!= "*"} {
|
|
228
226
|
}
|
|
229
227
|
set top 0
|
|
230
228
|
foreach f $globlist {
|
|
231
229
|
}
|
|
232
230
|
tkIconList_Arrange
|
|
233
231
|
# turn off the busy cursor.
|
|
234
232
|
#
|
|
235
233
|
.tkfd.f2.ent config -cursor $entCursor
|
|
236
234
|
.tkfd config -cursor $dlgCursor
|
|
237
235
|
global data
|
|
238
236
|
set data(filter) [lindex $type 1]
|
|
239
237
|
.tkfd.f3.menu config -text [lindex $type 0] -indicatoron 1
|
|
240
238
|
.tkfd.icons.sbar set 0.0 0.0
|
|
241
239
|
# mick
|
|
242
240
|
set oldfile [eval ".tkfd.f2.ent get"]
|
|
243
241
|
if { $oldfile == {}} {set oldfile $data(selectFile)}
|
|
244
242
|
set data(selectFile) [file rootname $oldfile][file extension [lindex $type 1]]
|
|
245
243
|
.tkfd.f2.ent delete 0 end
|
|
246
244
|
.tkfd.f2.ent insert 0 $data(selectFile)
|
|
247
245
|
.tkfd.f2.ent select from 0
|
|
248
246
|
.tkfd.f2.ent select to end
|
|
249
247
|
.tkfd.f2.ent icursor end
|
|
250
248
|
mtkFDialog_Update
|
|
251
249
|
set appPWD [pwd]
|
|
252
250
|
set path [file join $context $text]
|
|
253
251
|
if [catch {file exists $path}] {
|
|
254
252
|
}
|
|
255
253
|
if [file exists $path] {
|
|
256
254
|
} else {
|
|
257
255
|
}
|
|
258
256
|
return [list $flag $directory $file]
|
|
259
257
|
global data
|
|
260
258
|
if { [.tkfd.f2.ent get] != ""} {
|
|
261
259
|
} else {
|
|
262
260
|
}
|
|
263
261
|
tkIconList_Unselect
|
|
264
262
|
if {$data(type) == "open"} {
|
|
265
263
|
} else {
|
|
266
264
|
}
|
|
267
265
|
.tkfd.f2.ent selection clear
|
|
268
266
|
global data
|
|
269
267
|
set text [string trim [.tkfd.f2.ent get]]
|
|
270
268
|
set list [mtkFDialogResolveFile $data(selectPath) $text]
|
|
271
269
|
set flag [lindex $list 0]
|
|
272
270
|
set path [lindex $list 1]
|
|
273
271
|
set file [lindex $list 2]
|
|
274
272
|
|
|
275
273
|
case $flag {
|
|
276
274
|
}
|
|
277
275
|
if ![string compare [.tkfd.f2.ok cget -text] $key] {
|
|
278
276
|
}
|
|
279
277
|
global data tcl_platform
|
|
280
278
|
switch -- $tcl_platform(platform) {
|
|
281
279
|
if { $data(selectPath) != "Desktop"} {
|
|
282
280
|
}
|
|
283
281
|
global data
|
|
284
282
|
set text [tkIconList_Get]
|
|
285
283
|
if { $text != ""} {
|
|
286
284
|
}
|
|
287
285
|
mtkFDialog_ActivateEnt
|
|
288
286
|
global tkPriv
|
|
289
287
|
set tkPriv(selectFilePath) ""
|
|
290
288
|
global data
|
|
291
289
|
if {$text == ""} {
|
|
292
290
|
}
|
|
293
291
|
set file [file join $data(selectPath) $text]
|
|
294
292
|
if ![file isdirectory $file] {
|
|
295
293
|
} else {
|
|
296
294
|
}
|
|
297
295
|
global data
|
|
298
296
|
if {$text == ""} {
|
|
299
297
|
}
|
|
300
298
|
set file [file join $data(selectPath) $text]
|
|
301
299
|
if [file isdirectory $file] {
|
|
302
300
|
} else {
|
|
303
301
|
}
|
|
304
302
|
global data tkPriv
|
|
305
303
|
if ![string compare $selectFilePath ""] {
|
|
306
304
|
}
|
|
307
305
|
set tkPriv(selectFilePath) $selectFilePath
|
|
308
306
|
global data
|
|
309
307
|
# Configure the widget variables of IconList, according to the command
|
|
310
308
|
# line arguments.
|
|
311
309
|
#
|
|
312
310
|
# 1: the configuration specs
|
|
313
311
|
#
|
|
314
312
|
set specs {
|
|
315
313
|
}
|
|
316
314
|
|
|
317
315
|
# 2: parse the arguments
|
|
318
316
|
#
|
|
319
317
|
tclParseConfigSpec data $specs "" $args
|
|
320
318
|
|
|
321
319
|
# Creates an IconList widget by assembling a canvas widget and a
|
|
322
320
|
# scrollbar widget. Sets all the bindings necessary for the IconList's
|
|
323
321
|
# operations.
|
|
324
322
|
|
|
325
323
|
frame $w
|
|
326
324
|
scrollbar $w.sbar -orient horizontal -highlightthickness 0 -takefocus 0
|
|
327
325
|
canvas $w.canvas -bd 2 -relief sunken -width 400 -height 120 -takefocus 1 -bg white
|
|
328
326
|
pack $w.sbar -side bottom -fill x -padx 2
|
|
329
327
|
pack $w.canvas -expand yes -fill both
|
|
330
328
|
|
|
331
329
|
$w.sbar config -command "$w.canvas xview"
|
|
332
330
|
$w.canvas config -xscrollcommand "$w.sbar set"
|
|
333
331
|
# Initializes the max icon/text width and height and other variables
|
|
334
332
|
#
|
|
335
333
|
set data(maxIW) 1
|
|
336
334
|
set data(maxIH) 1
|
|
337
335
|
set data(maxTW) 1
|
|
338
336
|
set data(maxTH) 1
|
|
339
337
|
set data(numItems) 0
|
|
340
338
|
set data(curItem) {}
|
|
341
339
|
set data(noScroll) 1
|
|
342
340
|
# Creates the event bindings.
|
|
343
341
|
#
|
|
344
342
|
bind $w.canvas <Configure> "tkIconList_Arrange"
|
|
345
343
|
bind $w.canvas <1> "tkIconList_Btn1 %x %y"
|
|
346
344
|
bind $w.canvas <B1-Motion> "tkIconList_Motion1 %x %y"
|
|
347
345
|
bind $w.canvas <Double-1> "tkIconList_Double1 %x %y"
|
|
348
346
|
bind $w.canvas <ButtonRelease-1> "tkCancelRepeat"
|
|
349
347
|
bind $w.canvas <B1-Leave> "tkIconList_Leave1 %x %y"
|
|
350
348
|
bind $w.canvas <B1-Enter> "tkCancelRepeat"
|
|
351
349
|
bind $w.canvas <Up> "tkIconList_UpDown -1"
|
|
352
350
|
bind $w.canvas <Down> "tkIconList_UpDown 1"
|
|
353
351
|
bind $w.canvas <Left> "tkIconList_LeftRight -1"
|
|
354
352
|
bind $w.canvas <Right> "tkIconList_LeftRight 1"
|
|
355
353
|
bind $w.canvas <Return> "tkIconList_ReturnKey"
|
|
356
354
|
bind $w.canvas <KeyPress> "tkIconList_KeyPress %A"
|
|
357
355
|
bind $w.canvas <Control-KeyPress> ";"
|
|
358
356
|
bind $w.canvas <Alt-KeyPress> ";"
|
|
359
357
|
bind $w.canvas <FocusIn> "tkIconList_FocusIn"
|
|
360
358
|
return $w
|
|
361
359
|
global tkPriv data
|
|
362
360
|
set w .tkfd.icons
|
|
363
361
|
if {![winfo exists $w]} return
|
|
364
362
|
set x $tkPriv(x)
|
|
365
363
|
set y $tkPriv(y)
|
|
366
364
|
if $data(noScroll) {
|
|
367
365
|
}
|
|
368
366
|
if {$x >= [winfo width $w.canvas]} {
|
|
369
367
|
} elseif {$x < 0} {
|
|
370
368
|
} elseif {$y >= [winfo height $w.canvas]} {
|
|
371
369
|
} elseif {$y < 0} {
|
|
372
370
|
} else {
|
|
373
371
|
}
|
|
374
372
|
tkIconList_Motion1 $x $y
|
|
375
373
|
set tkPriv(afterId) [after 50 tkIconList_AutoScan]
|
|
376
374
|
global data itemList
|
|
377
375
|
.tkfd.icons.canvas delete all
|
|
378
376
|
catch {unset data(selected)}
|
|
379
377
|
catch {unset data(rect)}
|
|
380
378
|
catch {unset data(list)}
|
|
381
379
|
catch {unset itemList}
|
|
382
380
|
set data(numItems) 0
|
|
383
381
|
set data(curItem) {}
|
|
384
382
|
global data itemList textList
|
|
385
383
|
set w .tkfd.icons
|
|
386
384
|
set iTag [$w.canvas create image 0 0 -image $image -anchor nw]
|
|
387
385
|
set tTag [$w.canvas create text 0 0 -text $text -anchor nw]
|
|
388
386
|
set rTag [$w.canvas create rect 0 0 0 0 -fill "" -outline ""]
|
|
389
387
|
|
|
390
388
|
set b [$w.canvas bbox $iTag]
|
|
391
389
|
set iW [expr [lindex $b 2]-[lindex $b 0]]
|
|
392
390
|
set iH [expr [lindex $b 3]-[lindex $b 1]]
|
|
393
391
|
if {$data(maxIW) < $iW} {
|
|
394
392
|
}
|
|
395
393
|
if {$data(maxIH) < $iH} {
|
|
396
394
|
}
|
|
397
395
|
|
|
398
396
|
set b [$w.canvas bbox $tTag]
|
|
399
397
|
set tW [expr [lindex $b 2]-[lindex $b 0]]
|
|
400
398
|
set tH [expr [lindex $b 3]-[lindex $b 1]]
|
|
401
399
|
if {$data(maxTW) < $tW} {
|
|
402
400
|
}
|
|
403
401
|
if {$data(maxTH) < $tH} {
|
|
404
402
|
}
|
|
405
403
|
|
|
406
404
|
lappend data(list) [list $iTag $tTag $rTag $iW $iH $tW $tH $data(numItems)]
|
|
407
405
|
set itemList($rTag) [list $iTag $tTag $text $data(numItems)]
|
|
408
406
|
set textList($data(numItems)) [string tolower $text]
|
|
409
407
|
incr data(numItems)
|
|
410
408
|
global data
|
|
411
409
|
set w .tkfd.icons
|
|
412
410
|
if ![info exists data(list)] {
|
|
413
411
|
}
|
|
414
412
|
set W [winfo width $w.canvas]
|
|
415
413
|
set H [winfo height $w.canvas]
|
|
416
414
|
set pad [expr [$w.canvas cget -highlightthickness] + \
|
|
417
415
|
incr W -[expr $pad*2]
|
|
418
416
|
incr H -[expr $pad*2]
|
|
419
417
|
set dx [expr $data(maxIW) + $data(maxTW) + 4]
|
|
420
418
|
if {$data(maxTH) > $data(maxIH)} {
|
|
421
419
|
} else {
|
|
422
420
|
}
|
|
423
421
|
set shift [expr $data(maxIW) + 4]
|
|
424
422
|
set x [expr $pad * 2]
|
|
425
423
|
set y [expr $pad * 1]
|
|
426
424
|
set usedColumn 0
|
|
427
425
|
foreach pair $data(list) {
|
|
428
426
|
}
|
|
429
427
|
if {$usedColumn} {
|
|
430
428
|
} else {
|
|
431
429
|
}
|
|
432
430
|
if {$sW < $W} {
|
|
433
431
|
} else {
|
|
434
432
|
}
|
|
435
433
|
set data(itemsPerColumn) [expr ($H-$pad)/$dy]
|
|
436
434
|
if {$data(itemsPerColumn) < 1} {
|
|
437
435
|
}
|
|
438
436
|
if {$data(curItem) != {}} {
|
|
439
437
|
}
|
|
440
438
|
global data
|
|
441
439
|
set w .tkfd.icons
|
|
442
440
|
if {$data(-command) != "" && [info exists data(selected)]} {
|
|
443
441
|
}
|
|
444
442
|
global data itemList
|
|
445
443
|
set w .tkfd.icons
|
|
446
444
|
if $data(noScroll) {
|
|
447
445
|
}
|
|
448
446
|
set sRegion [$w.canvas cget -scrollregion]
|
|
449
447
|
if ![string compare $sRegion {}] {
|
|
450
448
|
}
|
|
451
449
|
if ![info exists itemList($rTag)] {
|
|
452
450
|
}
|
|
453
451
|
set bbox [$w.canvas bbox $rTag]
|
|
454
452
|
set pad [expr [$w.canvas cget -highlightthickness] + \
|
|
455
453
|
set x1 [lindex $bbox 0]
|
|
456
454
|
set x2 [lindex $bbox 2]
|
|
457
455
|
incr x1 -[expr $pad * 2]
|
|
458
456
|
incr x2 -[expr $pad * 1]
|
|
459
457
|
set cW [expr [winfo width $w.canvas] - $pad*2]
|
|
460
458
|
set scrollW [expr [lindex $sRegion 2]-[lindex $sRegion 0]+1]
|
|
461
459
|
set dispX [expr int([lindex [$w.canvas xview] 0]*$scrollW)]
|
|
462
460
|
set oldDispX $dispX
|
|
463
461
|
# check if out of the right edge
|
|
464
462
|
#
|
|
465
463
|
if {[expr $x2 - $dispX] >= $cW} {
|
|
466
464
|
}
|
|
467
465
|
# check if out of the left edge
|
|
468
466
|
#
|
|
469
467
|
if {[expr $x1 - $dispX] < 0} {
|
|
470
468
|
}
|
|
471
469
|
if {$oldDispX != $dispX} {
|
|
472
470
|
}
|
|
473
471
|
global data
|
|
474
472
|
set w .tkfd.icons
|
|
475
473
|
tkIconList_Select [$w.canvas find closest \
|
|
476
474
|
global data itemList
|
|
477
475
|
set w .tkfd.icons
|
|
478
476
|
if ![info exists itemList($rTag)] {
|
|
479
477
|
}
|
|
480
478
|
set iTag [lindex $itemList($rTag) 0]
|
|
481
479
|
set tTag [lindex $itemList($rTag) 1]
|
|
482
480
|
set text [lindex $itemList($rTag) 2]
|
|
483
481
|
set serial [lindex $itemList($rTag) 3]
|
|
484
482
|
if ![info exists data(rect)] {
|
|
485
483
|
set data(rect) [$w.canvas create rect 0 0 0 0 \
|
|
486
484
|
}
|
|
487
485
|
$w.canvas lower $data(rect)
|
|
488
486
|
set bbox [$w.canvas bbox $tTag]
|
|
489
487
|
eval $w.canvas coords $data(rect) $bbox
|
|
490
488
|
set data(curItem) $serial
|
|
491
489
|
set data(selected) $text
|
|
492
490
|
|
|
493
491
|
if {$callBrowse} {
|
|
494
492
|
}
|
|
495
493
|
global data
|
|
496
494
|
set w .tkfd.icons
|
|
497
495
|
if [info exists data(rect)] {
|
|
498
496
|
}
|
|
499
497
|
if [info exists data(selected)] {
|
|
500
498
|
}
|
|
501
499
|
set data(curItem) {}
|
|
502
500
|
global data
|
|
503
501
|
set w .tkfd.icons
|
|
504
502
|
if [info exists data(selected)] {
|
|
505
503
|
} else {
|
|
506
504
|
}
|
|
507
505
|
global data
|
|
508
506
|
focus .tkfd.icons.canvas
|
|
509
507
|
tkIconList_SelectAtXY $x $y
|
|
510
508
|
global tkPriv
|
|
511
509
|
set tkPriv(x) $x
|
|
512
510
|
set tkPriv(y) $y
|
|
513
511
|
tkIconList_SelectAtXY $x $y
|
|
514
512
|
global data
|
|
515
513
|
if {$data(curItem) != {}} {
|
|
516
514
|
}
|
|
517
515
|
tkIconList_Invoke
|
|
518
516
|
global tkPriv
|
|
519
517
|
set tkPriv(x) $x
|
|
520
518
|
set tkPriv(y) $y
|
|
521
519
|
tkIconList_AutoScan
|
|
522
520
|
global data
|
|
523
521
|
if ![info exists data(list)] {
|
|
524
522
|
}
|
|
525
523
|
if {$data(curItem) == {}} {
|
|
526
524
|
}
|
|
527
525
|
global data
|
|
528
526
|
if ![info exists data(list)] {
|
|
529
527
|
}
|
|
530
528
|
if {$data(curItem) == {}} {
|
|
531
529
|
} else {
|
|
532
530
|
}
|
|
533
531
|
if [string compare $rTag ""] {
|
|
534
532
|
}
|
|
535
533
|
global data
|
|
536
534
|
if ![info exists data(list)] {
|
|
537
535
|
}
|
|
538
536
|
if {$data(curItem) == {}} {
|
|
539
537
|
} else {
|
|
540
538
|
}
|
|
541
539
|
if [string compare $rTag ""] {
|
|
542
540
|
}
|
|
543
541
|
global tkPriv
|
|
544
542
|
set w .tkfd.icons
|
|
545
543
|
append tkPriv(ILAccel,$w) $key
|
|
546
544
|
tkIconList_Goto $tkPriv(ILAccel,$w)
|
|
547
545
|
catch {
|
|
548
546
|
}
|
|
549
547
|
set tkPriv(ILAccel,$w,afterId) [after 500 tkIconList_Reset]
|
|
550
548
|
global data textList tkPriv
|
|
551
549
|
|
|
552
550
|
if ![info exists data(list)] {
|
|
553
551
|
}
|
|
554
552
|
if {[string length $text] == 0} {
|
|
555
553
|
}
|
|
556
554
|
if {$data(curItem) == {} || $data(curItem) == 0} {
|
|
557
555
|
} else {
|
|
558
556
|
}
|
|
559
557
|
set text [string tolower $text]
|
|
560
558
|
set theIndex -1
|
|
561
559
|
set less 0
|
|
562
560
|
set len [string length $text]
|
|
563
561
|
set len0 [expr $len-1]
|
|
564
562
|
set i $start
|
|
565
563
|
# Search forward until we find a filename whose prefix is an exact match
|
|
566
564
|
# with $text
|
|
567
565
|
while 1 {
|
|
568
566
|
}
|
|
569
567
|
if {$theIndex > -1} {
|
|
570
568
|
}
|
|
571
569
|
global tkPriv
|
|
572
570
|
set w .tkfd.icons
|
|
573
571
|
catch {unset tkPriv(ILAccel,$w)}
|
|
574
572
|
global data
|
|
575
573
|
mtkFDialog_SetPath $data(selectDrive)
|
|
576
574
|
global data tkPriv tcl_platform
|
|
577
575
|
# Turn on the busy cursor. BUG?? We haven't disabled X events, though,
|
|
578
576
|
# so the user may still click and cause havoc ...
|
|
579
577
|
#
|
|
580
578
|
set entCursor [.tkfd.f2.ent cget -cursor]
|
|
581
579
|
set dlgCursor [.tkfd cget -cursor]
|
|
582
580
|
.tkfd.f2.ent config -cursor watch
|
|
583
581
|
.tkfd config -cursor watch
|
|
584
582
|
update idletasks
|
|
585
583
|
|
|
586
584
|
tkIconList_DeleteAll
|
|
587
585
|
# Make the dir list
|
|
588
586
|
#
|
|
589
587
|
foreach drv [file volume] {
|
|
590
588
|
}
|
|
591
589
|
tkIconList_Arrange
|
|
592
590
|
# Update the Directory: option menu
|
|
593
591
|
#
|
|
594
592
|
.tkfd.f1.menu.menu delete 0 end
|
|
595
593
|
set var data(selectPath)
|
|
596
594
|
switch -- $tcl_platform(platform) {
|
|
597
595
|
windows {set label "My Computer"}
|
|
598
596
|
macintosh {set label "Desktop"}
|
|
599
597
|
}
|
|
600
598
|
|
|
601
599
|
.tkfd.f1.menu.menu add command -label $label -command [list set $var $label]
|
|
602
600
|
# turn off the busy cursor.
|
|
603
601
|
.tkfd.f2.ent config -cursor $entCursor
|
|
604
602
|
.tkfd config -cursor $dlgCursor
|
|
605
603
|
global tcl_platform
|
|
606
604
|
|
|
607
605
|
if {[lindex $path 1] != ""} {
|
|
608
606
|
}
|
|
609
607
|
if { $tcl_platform(platform) == "macintosh" && $path == "Desktop" } {return}
|
|
610
608
|
|
|
611
609
|
cd "$path"
|
|
612
610
|
global mtkfCURRDIR
|
|
613
611
|
if ![info exists mtkfCURRDIR] {set mtkfCURRDIR [pwd]}
|
|
614
612
|
return $mtkfCURRDIR
|
|
615
613
|
set oldgrab [grab current]
|
|
616
614
|
if { $oldgrab != {}} {grab release $oldgrab}
|
|
617
615
|
if {$parent != {}} {
|
|
618
616
|
} else {
|
|
619
617
|
}
|
|
620
618
|
if { $oldgrab != {}} {grab -global $oldgrab}
|
|
621
619
|
upvar $var list
|
|
622
620
|
set ix [lsearch -exact $list $value]
|
|
623
621
|
|
|
624
622
|
if {$ix >= 0} {
|
|
625
623
|
}
|
|
626
624
|
return $list
|