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/themes/vistaTheme.tcl
DELETED
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Settings for Microsoft Windows Vista and Server 2008
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
# The Vista theme can only be defined on Windows Vista and above. The theme
|
|
6
|
-
# is created in C due to the need to assign a theme-enabled function for
|
|
7
|
-
# detecting when themeing is disabled. On systems that cannot support the
|
|
8
|
-
# Vista theme, there will be no such theme created and we must not
|
|
9
|
-
# evaluate this script.
|
|
10
|
-
|
|
11
|
-
if {"vista" ni [ttk::style theme names]} {
|
|
12
|
-
return
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
namespace eval ttk::theme::vista {
|
|
16
|
-
|
|
17
|
-
ttk::style theme settings vista {
|
|
18
|
-
|
|
19
|
-
ttk::style configure . \
|
|
20
|
-
-background SystemButtonFace \
|
|
21
|
-
-foreground SystemWindowText \
|
|
22
|
-
-selectforeground SystemHighlightText \
|
|
23
|
-
-selectbackground SystemHighlight \
|
|
24
|
-
-font TkDefaultFont \
|
|
25
|
-
;
|
|
26
|
-
|
|
27
|
-
ttk::style map "." \
|
|
28
|
-
-foreground [list disabled SystemGrayText] \
|
|
29
|
-
;
|
|
30
|
-
|
|
31
|
-
ttk::style configure TButton -anchor center -padding {1 1} -width -11
|
|
32
|
-
ttk::style configure TRadiobutton -padding 2
|
|
33
|
-
ttk::style configure TCheckbutton -padding 2
|
|
34
|
-
ttk::style configure TMenubutton -padding {8 4}
|
|
35
|
-
|
|
36
|
-
ttk::style element create Menubutton.dropdown vsapi \
|
|
37
|
-
TOOLBAR 4 {{selected active} 6 {selected !active} 5
|
|
38
|
-
disabled 4 pressed 3 active 2 {} 1} \
|
|
39
|
-
-syssize {SM_CXVSCROLL SM_CYVSCROLL}
|
|
40
|
-
|
|
41
|
-
ttk::style configure TNotebook -tabmargins {2 2 2 0}
|
|
42
|
-
ttk::style map TNotebook.Tab \
|
|
43
|
-
-expand [list selected {2 2 2 2}]
|
|
44
|
-
|
|
45
|
-
# Treeview:
|
|
46
|
-
ttk::style configure Heading -font TkHeadingFont
|
|
47
|
-
ttk::style configure Treeview -background SystemWindow
|
|
48
|
-
ttk::style map Treeview \
|
|
49
|
-
-background [list selected SystemHighlight] \
|
|
50
|
-
-foreground [list selected SystemHighlightText] ;
|
|
51
|
-
|
|
52
|
-
# Label and Toolbutton
|
|
53
|
-
ttk::style configure TLabelframe.Label -foreground "#0046d5"
|
|
54
|
-
|
|
55
|
-
ttk::style configure Toolbutton -padding {4 4}
|
|
56
|
-
|
|
57
|
-
# Combobox
|
|
58
|
-
ttk::style configure TCombobox -padding 2
|
|
59
|
-
ttk::style element create Combobox.field vsapi \
|
|
60
|
-
COMBOBOX 2 {{} 1}
|
|
61
|
-
ttk::style element create Combobox.border vsapi \
|
|
62
|
-
COMBOBOX 4 {disabled 4 focus 3 active 2 hover 2 {} 1}
|
|
63
|
-
ttk::style element create Combobox.rightdownarrow vsapi \
|
|
64
|
-
COMBOBOX 6 {disabled 4 pressed 3 active 2 {} 1} \
|
|
65
|
-
-syssize {SM_CXVSCROLL SM_CYVSCROLL}
|
|
66
|
-
ttk::style layout TCombobox {
|
|
67
|
-
Combobox.border -sticky nswe -border 0 -children {
|
|
68
|
-
Combobox.rightdownarrow -side right -sticky ns
|
|
69
|
-
Combobox.padding -expand 1 -sticky nswe -children {
|
|
70
|
-
Combobox.focus -expand 1 -sticky nswe -children {
|
|
71
|
-
Combobox.textarea -sticky nswe
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
# Vista.Combobox droplist frame
|
|
77
|
-
ttk::style element create ComboboxPopdownFrame.background vsapi\
|
|
78
|
-
LISTBOX 3 {disabled 4 active 3 focus 2 {} 1}
|
|
79
|
-
ttk::style layout ComboboxPopdownFrame {
|
|
80
|
-
ComboboxPopdownFrame.background -sticky news -border 1 -children {
|
|
81
|
-
ComboboxPopdownFrame.padding -sticky news
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
ttk::style map TCombobox \
|
|
85
|
-
-selectbackground [list !focus SystemWindow] \
|
|
86
|
-
-selectforeground [list !focus SystemWindowText] \
|
|
87
|
-
-foreground [list \
|
|
88
|
-
disabled SystemGrayText \
|
|
89
|
-
{readonly focus} SystemHighlightText \
|
|
90
|
-
] \
|
|
91
|
-
-focusfill [list {readonly focus} SystemHighlight] \
|
|
92
|
-
;
|
|
93
|
-
|
|
94
|
-
# Entry
|
|
95
|
-
ttk::style configure TEntry -padding {1 1 1 1} ;# Needs lookup
|
|
96
|
-
ttk::style element create Entry.field vsapi \
|
|
97
|
-
EDIT 6 {disabled 4 focus 3 hover 2 {} 1} -padding {2 2 2 2}
|
|
98
|
-
ttk::style element create Entry.background vsapi \
|
|
99
|
-
EDIT 3 {disabled 3 readonly 3 focus 4 hover 2 {} 1}
|
|
100
|
-
ttk::style layout TEntry {
|
|
101
|
-
Entry.field -sticky news -border 0 -children {
|
|
102
|
-
Entry.background -sticky news -children {
|
|
103
|
-
Entry.padding -sticky news -children {
|
|
104
|
-
Entry.textarea -sticky news
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
ttk::style map TEntry \
|
|
110
|
-
-selectbackground [list !focus SystemWindow] \
|
|
111
|
-
-selectforeground [list !focus SystemWindowText] \
|
|
112
|
-
;
|
|
113
|
-
|
|
114
|
-
# Spinbox
|
|
115
|
-
ttk::style configure TSpinbox -padding 0
|
|
116
|
-
ttk::style element create Spinbox.field vsapi \
|
|
117
|
-
EDIT 9 {disabled 4 focus 3 hover 2 {} 1} -padding {1 1 1 2}
|
|
118
|
-
ttk::style element create Spinbox.background vsapi \
|
|
119
|
-
EDIT 3 {disabled 3 readonly 3 focus 4 hover 2 {} 1}
|
|
120
|
-
ttk::style element create Spinbox.innerbg vsapi \
|
|
121
|
-
EDIT 3 {disabled 3 readonly 3 focus 4 hover 2 {} 1}\
|
|
122
|
-
-padding {2 0 15 2}
|
|
123
|
-
ttk::style element create Spinbox.uparrow vsapi \
|
|
124
|
-
SPIN 1 {disabled 4 pressed 3 active 2 {} 1} \
|
|
125
|
-
-padding 1 -halfheight 1 \
|
|
126
|
-
-syssize { SM_CXVSCROLL SM_CYVSCROLL }
|
|
127
|
-
ttk::style element create Spinbox.downarrow vsapi \
|
|
128
|
-
SPIN 2 {disabled 4 pressed 3 active 2 {} 1} \
|
|
129
|
-
-padding 1 -halfheight 1 \
|
|
130
|
-
-syssize { SM_CXVSCROLL SM_CYVSCROLL }
|
|
131
|
-
ttk::style layout TSpinbox {
|
|
132
|
-
Spinbox.field -sticky nswe -children {
|
|
133
|
-
Spinbox.background -sticky news -children {
|
|
134
|
-
Spinbox.padding -sticky news -children {
|
|
135
|
-
Spinbox.innerbg -sticky news -children {
|
|
136
|
-
Spinbox.textarea -expand 1 -sticky {}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
Spinbox.uparrow -side top -sticky ens
|
|
140
|
-
Spinbox.downarrow -side bottom -sticky ens
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
ttk::style map TSpinbox \
|
|
145
|
-
-selectbackground [list !focus SystemWindow] \
|
|
146
|
-
-selectforeground [list !focus SystemWindowText] \
|
|
147
|
-
;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
# SCROLLBAR elements (Vista includes a state for 'hover')
|
|
151
|
-
ttk::style element create Vertical.Scrollbar.uparrow vsapi \
|
|
152
|
-
SCROLLBAR 1 {disabled 4 pressed 3 active 2 hover 17 {} 1} \
|
|
153
|
-
-syssize {SM_CXVSCROLL SM_CYVSCROLL}
|
|
154
|
-
ttk::style element create Vertical.Scrollbar.downarrow vsapi \
|
|
155
|
-
SCROLLBAR 1 {disabled 8 pressed 7 active 6 hover 18 {} 5} \
|
|
156
|
-
-syssize {SM_CXVSCROLL SM_CYVSCROLL}
|
|
157
|
-
ttk::style element create Vertical.Scrollbar.trough vsapi \
|
|
158
|
-
SCROLLBAR 7 {disabled 4 pressed 3 active 2 hover 5 {} 1}
|
|
159
|
-
ttk::style element create Vertical.Scrollbar.thumb vsapi \
|
|
160
|
-
SCROLLBAR 3 {disabled 4 pressed 3 active 2 hover 5 {} 1} \
|
|
161
|
-
-syssize {SM_CXVSCROLL SM_CYVSCROLL}
|
|
162
|
-
ttk::style element create Vertical.Scrollbar.grip vsapi \
|
|
163
|
-
SCROLLBAR 9 {disabled 4 pressed 3 active 2 hover 5 {} 1} \
|
|
164
|
-
-syssize {SM_CXVSCROLL SM_CYVSCROLL}
|
|
165
|
-
ttk::style element create Horizontal.Scrollbar.leftarrow vsapi \
|
|
166
|
-
SCROLLBAR 1 {disabled 12 pressed 11 active 10 hover 19 {} 9} \
|
|
167
|
-
-syssize {SM_CXHSCROLL SM_CYHSCROLL}
|
|
168
|
-
ttk::style element create Horizontal.Scrollbar.rightarrow vsapi \
|
|
169
|
-
SCROLLBAR 1 {disabled 16 pressed 15 active 14 hover 20 {} 13} \
|
|
170
|
-
-syssize {SM_CXHSCROLL SM_CYHSCROLL}
|
|
171
|
-
ttk::style element create Horizontal.Scrollbar.trough vsapi \
|
|
172
|
-
SCROLLBAR 5 {disabled 4 pressed 3 active 2 hover 5 {} 1}
|
|
173
|
-
ttk::style element create Horizontal.Scrollbar.thumb vsapi \
|
|
174
|
-
SCROLLBAR 2 {disabled 4 pressed 3 active 2 hover 5 {} 1} \
|
|
175
|
-
-syssize {SM_CXHSCROLL SM_CYHSCROLL}
|
|
176
|
-
ttk::style element create Horizontal.Scrollbar.grip vsapi \
|
|
177
|
-
SCROLLBAR 8 {disabled 4 pressed 3 active 2 hover 5 {} 1}
|
|
178
|
-
|
|
179
|
-
# Progressbar
|
|
180
|
-
ttk::style element create Horizontal.Progressbar.pbar vsapi \
|
|
181
|
-
PROGRESS 3 {{} 1} -padding 8
|
|
182
|
-
ttk::style layout Horizontal.TProgressbar {
|
|
183
|
-
Horizontal.Progressbar.trough -sticky nswe -children {
|
|
184
|
-
Horizontal.Progressbar.pbar -side left -sticky ns
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
ttk::style element create Vertical.Progressbar.pbar vsapi \
|
|
188
|
-
PROGRESS 3 {{} 1} -padding 8
|
|
189
|
-
ttk::style layout Vertical.TProgressbar {
|
|
190
|
-
Vertical.Progressbar.trough -sticky nswe -children {
|
|
191
|
-
Vertical.Progressbar.pbar -side bottom -sticky we
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
# Scale
|
|
196
|
-
ttk::style element create Horizontal.Scale.slider vsapi \
|
|
197
|
-
TRACKBAR 3 {disabled 5 focus 4 pressed 3 active 2 {} 1} \
|
|
198
|
-
-width 6 -height 12
|
|
199
|
-
ttk::style layout Horizontal.TScale {
|
|
200
|
-
Scale.focus -expand 1 -sticky nswe -children {
|
|
201
|
-
Horizontal.Scale.trough -expand 1 -sticky nswe -children {
|
|
202
|
-
Horizontal.Scale.track -sticky we
|
|
203
|
-
Horizontal.Scale.slider -side left -sticky {}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
ttk::style element create Vertical.Scale.slider vsapi \
|
|
208
|
-
TRACKBAR 6 {disabled 5 focus 4 pressed 3 active 2 {} 1} \
|
|
209
|
-
-width 12 -height 6
|
|
210
|
-
ttk::style layout Vertical.TScale {
|
|
211
|
-
Scale.focus -expand 1 -sticky nswe -children {
|
|
212
|
-
Vertical.Scale.trough -expand 1 -sticky nswe -children {
|
|
213
|
-
Vertical.Scale.track -sticky ns
|
|
214
|
-
Vertical.Scale.slider -side top -sticky {}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
# Treeview
|
|
220
|
-
ttk::style configure Item -padding {4 0 0 0}
|
|
221
|
-
|
|
222
|
-
package provide ttk::theme::vista 1.0
|
|
223
|
-
}
|
|
224
|
-
}
|
data/tcl/themes/winTheme.tcl
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Settings for 'winnative' theme.
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
namespace eval ttk::theme::winnative {
|
|
6
|
-
ttk::style theme settings winnative {
|
|
7
|
-
|
|
8
|
-
ttk::style configure "." \
|
|
9
|
-
-background SystemButtonFace \
|
|
10
|
-
-foreground SystemWindowText \
|
|
11
|
-
-selectforeground SystemHighlightText \
|
|
12
|
-
-selectbackground SystemHighlight \
|
|
13
|
-
-troughcolor SystemScrollbar \
|
|
14
|
-
-font TkDefaultFont \
|
|
15
|
-
;
|
|
16
|
-
|
|
17
|
-
ttk::style map "." -foreground [list disabled SystemGrayText] ;
|
|
18
|
-
ttk::style map "." -embossed [list disabled 1] ;
|
|
19
|
-
|
|
20
|
-
ttk::style configure TButton \
|
|
21
|
-
-anchor center -width -11 -relief raised -shiftrelief 1
|
|
22
|
-
ttk::style configure TCheckbutton -padding "2 4"
|
|
23
|
-
ttk::style configure TRadiobutton -padding "2 4"
|
|
24
|
-
ttk::style configure TMenubutton \
|
|
25
|
-
-padding "8 4" -arrowsize 3 -relief raised
|
|
26
|
-
|
|
27
|
-
ttk::style map TButton -relief {{!disabled pressed} sunken}
|
|
28
|
-
|
|
29
|
-
ttk::style configure TEntry \
|
|
30
|
-
-padding 2 -selectborderwidth 0 -insertwidth 1
|
|
31
|
-
ttk::style map TEntry \
|
|
32
|
-
-fieldbackground \
|
|
33
|
-
[list readonly SystemButtonFace disabled SystemButtonFace] \
|
|
34
|
-
-selectbackground [list !focus SystemWindow] \
|
|
35
|
-
-selectforeground [list !focus SystemWindowText] \
|
|
36
|
-
;
|
|
37
|
-
|
|
38
|
-
ttk::style configure TCombobox -padding 2
|
|
39
|
-
ttk::style map TCombobox \
|
|
40
|
-
-selectbackground [list !focus SystemWindow] \
|
|
41
|
-
-selectforeground [list !focus SystemWindowText] \
|
|
42
|
-
-fieldbackground [list \
|
|
43
|
-
readonly SystemButtonFace \
|
|
44
|
-
disabled SystemButtonFace] \
|
|
45
|
-
-foreground [list \
|
|
46
|
-
disabled SystemGrayText \
|
|
47
|
-
{readonly focus} SystemHighlightText \
|
|
48
|
-
] \
|
|
49
|
-
-focusfill [list {readonly focus} SystemHighlight] \
|
|
50
|
-
;
|
|
51
|
-
|
|
52
|
-
ttk::style element create ComboboxPopdownFrame.border from default
|
|
53
|
-
ttk::style configure ComboboxPopdownFrame \
|
|
54
|
-
-borderwidth 1 -relief solid
|
|
55
|
-
|
|
56
|
-
ttk::style configure TSpinbox -padding {2 0 16 0}
|
|
57
|
-
|
|
58
|
-
ttk::style configure TLabelframe -borderwidth 2 -relief groove
|
|
59
|
-
|
|
60
|
-
ttk::style configure Toolbutton -relief flat -padding {8 4}
|
|
61
|
-
ttk::style map Toolbutton -relief \
|
|
62
|
-
{disabled flat selected sunken pressed sunken active raised}
|
|
63
|
-
|
|
64
|
-
ttk::style configure TScale -groovewidth 4
|
|
65
|
-
|
|
66
|
-
ttk::style configure TNotebook -tabmargins {2 2 2 0}
|
|
67
|
-
ttk::style configure TNotebook.Tab -padding {3 1} -borderwidth 1
|
|
68
|
-
ttk::style map TNotebook.Tab -expand [list selected {2 2 2 0}]
|
|
69
|
-
|
|
70
|
-
# Treeview:
|
|
71
|
-
ttk::style configure Heading -font TkHeadingFont -relief raised
|
|
72
|
-
ttk::style configure Treeview -background SystemWindow
|
|
73
|
-
ttk::style map Treeview \
|
|
74
|
-
-background [list selected SystemHighlight] \
|
|
75
|
-
-foreground [list selected SystemHighlightText] ;
|
|
76
|
-
|
|
77
|
-
ttk::style configure TProgressbar \
|
|
78
|
-
-background SystemHighlight -borderwidth 0 ;
|
|
79
|
-
}
|
|
80
|
-
}
|
data/tcl/themes/xpTheme.tcl
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Settings for 'xpnative' theme
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
namespace eval ttk::theme::xpnative {
|
|
6
|
-
|
|
7
|
-
ttk::style theme settings xpnative {
|
|
8
|
-
|
|
9
|
-
ttk::style configure . \
|
|
10
|
-
-background SystemButtonFace \
|
|
11
|
-
-foreground SystemWindowText \
|
|
12
|
-
-selectforeground SystemHighlightText \
|
|
13
|
-
-selectbackground SystemHighlight \
|
|
14
|
-
-font TkDefaultFont \
|
|
15
|
-
;
|
|
16
|
-
|
|
17
|
-
ttk::style map "." \
|
|
18
|
-
-foreground [list disabled SystemGrayText] \
|
|
19
|
-
;
|
|
20
|
-
|
|
21
|
-
ttk::style configure TButton -anchor center -padding {1 1} -width -11
|
|
22
|
-
ttk::style configure TRadiobutton -padding 2
|
|
23
|
-
ttk::style configure TCheckbutton -padding 2
|
|
24
|
-
ttk::style configure TMenubutton -padding {8 4}
|
|
25
|
-
|
|
26
|
-
ttk::style configure TNotebook -tabmargins {2 2 2 0}
|
|
27
|
-
ttk::style map TNotebook.Tab \
|
|
28
|
-
-expand [list selected {2 2 2 2}]
|
|
29
|
-
|
|
30
|
-
# Treeview:
|
|
31
|
-
ttk::style configure Heading -font TkHeadingFont
|
|
32
|
-
ttk::style configure Treeview -background SystemWindow
|
|
33
|
-
ttk::style map Treeview \
|
|
34
|
-
-background [list selected SystemHighlight] \
|
|
35
|
-
-foreground [list selected SystemHighlightText] ;
|
|
36
|
-
|
|
37
|
-
ttk::style configure TLabelframe.Label -foreground "#0046d5"
|
|
38
|
-
|
|
39
|
-
# OR: -padding {3 3 3 6}, which some apps seem to use.
|
|
40
|
-
ttk::style configure TEntry -padding {2 2 2 4}
|
|
41
|
-
ttk::style map TEntry \
|
|
42
|
-
-selectbackground [list !focus SystemWindow] \
|
|
43
|
-
-selectforeground [list !focus SystemWindowText] \
|
|
44
|
-
;
|
|
45
|
-
ttk::style configure TCombobox -padding 2
|
|
46
|
-
ttk::style map TCombobox \
|
|
47
|
-
-selectbackground [list !focus SystemWindow] \
|
|
48
|
-
-selectforeground [list !focus SystemWindowText] \
|
|
49
|
-
-foreground [list \
|
|
50
|
-
disabled SystemGrayText \
|
|
51
|
-
{readonly focus} SystemHighlightText \
|
|
52
|
-
] \
|
|
53
|
-
-focusfill [list {readonly focus} SystemHighlight] \
|
|
54
|
-
;
|
|
55
|
-
|
|
56
|
-
ttk::style configure TSpinbox -padding {2 0 14 0}
|
|
57
|
-
ttk::style map TSpinbox \
|
|
58
|
-
-selectbackground [list !focus SystemWindow] \
|
|
59
|
-
-selectforeground [list !focus SystemWindowText] \
|
|
60
|
-
;
|
|
61
|
-
|
|
62
|
-
ttk::style configure Toolbutton -padding {4 4}
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
}
|
data/tcl/tkfbox/folder.gif
DELETED
|
Binary file
|
data/tcl/tkfbox/textfile.gif
DELETED
|
Binary file
|
data/tcl/tkfbox/tkfbox.tcl
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# tkfbox.tcl --
|
|
2
|
global TKF_IMGDIR
|
|
3
1
|
set TKF_IMGDIR [file nativename [pwd]]
|
|
4
2
|
tk_messageBox -message "[tk_getOpenFile -initialfile "[pwd]/untitled.fred"\
|
|
5
3
|
return [mtkFDialog open $args]
|
|
6
4
|
|
|
7
5
|
return [mtkFDialog save $args]
|
|
8
6
|
global tkPriv data
|
|
9
7
|
|
|
10
8
|
if [info exists data] {unset data}
|
|
11
9
|
create-file-dialog
|
|
12
10
|
mtkFDialog_Config $type $argList
|
|
13
11
|
mtkFDialog_SetPath $data(selectPath)
|
|
14
12
|
# 6. Withdraw the window, then update all the geometry information
|
|
15
13
|
# so we know how big it wants to be, then center the window in the
|
|
16
14
|
# display and de-iconify it.
|
|
17
15
|
wm withdraw .tkfd
|
|
18
16
|
update idletasks
|
|
19
17
|
set x [expr [winfo screenwidth .tkfd]/2 - [winfo reqwidth .tkfd]/2 \
|
|
20
18
|
set y [expr [winfo screenheight .tkfd]/2 - [winfo reqheight .tkfd]/2 \
|
|
21
19
|
wm geom .tkfd [winfo reqwidth .tkfd]x[winfo reqheight .tkfd]+$x+$y
|
|
22
20
|
wm deiconify .tkfd
|
|
23
21
|
wm title .tkfd $data(-title)
|
|
24
22
|
# 7. Set a grab and claim the focus too.
|
|
25
23
|
set oldFocus [focus]
|
|
26
24
|
set oldGrab [grab current .tkfd]
|
|
27
25
|
if {$oldGrab != ""} {
|
|
28
26
|
}
|
|
29
27
|
#Mick: changed to grab global
|
|
30
28
|
grab .tkfd
|
|
31
29
|
wm transient .tkfd .
|
|
32
30
|
focus .tkfd.f2.ent
|
|
33
31
|
.tkfd.f2.ent delete 0 end
|
|
34
32
|
.tkfd.f2.ent insert 0 $data(selectFile)
|
|
35
33
|
.tkfd.f2.ent select from 0
|
|
36
34
|
.tkfd.f2.ent select to end
|
|
37
35
|
.tkfd.f2.ent icursor end
|
|
38
36
|
# Ensure the window is fronted
|
|
39
37
|
raise .tkfd
|
|
40
38
|
|
|
41
39
|
# 8. Wait for the user to respond, then restore the focus and
|
|
42
40
|
# return the index of the selected button. Restore the focus
|
|
43
41
|
# before deleting the window, since otherwise the window manager
|
|
44
42
|
# may take the focus away so we can't redirect it. Finally,
|
|
45
43
|
# restore any grab that was in effect.
|
|
46
44
|
tkwait variable tkPriv(selectFilePath)
|
|
47
45
|
catch {focus $oldFocus}
|
|
48
46
|
grab release .tkfd
|
|
49
47
|
wm withdraw .tkfd
|
|
50
48
|
if {$oldGrab != ""} {
|
|
51
49
|
}
|
|
52
50
|
update
|
|
53
51
|
return $tkPriv(selectFilePath)
|
|
54
52
|
global TKF_IMGDIR data tkPriv
|
|
55
53
|
if [winfo exists .tkfd] {destroy .tkfd}
|
|
56
54
|
toplevel .tkfd -class mtkFDialog
|
|
57
55
|
wm protocol .tkfd WM_DELETE_WINDOW "mtkFDialog_CancelCmd"
|
|
58
56
|
# f1: the frame with the directory option menu
|
|
59
57
|
#
|
|
60
58
|
set f1 [frame .tkfd.f1]
|
|
61
59
|
label .tkfd.f1.lab -text "Directory:" -under 0
|
|
62
60
|
tk_optionMenu .tkfd.f1.menu data(selectPath) ""
|
|
63
61
|
.tkfd.f1.menu config -takefocus 1 -highlightthickness 2
|
|
64
62
|
button .tkfd.f1.up -bitmap @[file join $TKF_IMGDIR updir.xbm]
|
|
65
63
|
|
|
66
64
|
pack .tkfd.f1.up -side right -padx 4 -fill both
|
|
67
65
|
pack .tkfd.f1.lab -side left -padx 4 -fill both
|
|
68
66
|
pack .tkfd.f1.menu -expand yes -fill both -padx 4
|
|
69
67
|
# .tkfd.icons: the IconList that list the files and directories.
|
|
70
68
|
#
|
|
71
69
|
tkIconList .tkfd.icons\
|
|
72
70
|
# f2: the frame with the OK button and the "file name" field
|
|
73
71
|
#
|
|
74
72
|
frame .tkfd.f2
|
|
75
73
|
label .tkfd.f2.lab -text "File name:" -anchor e -width 14 -under 6
|
|
76
74
|
entry .tkfd.f2.ent -bg white
|
|
77
75
|
# f3: the frame with the cancel button and the file types field
|
|
78
76
|
#
|
|
79
77
|
frame .tkfd.f3
|
|
80
78
|
label .tkfd.f3.lab -text "Files of type:" \
|
|
81
79
|
menubutton .tkfd.f3.menu -indicatoron 1 -menu .tkfd.f3.menu.m
|
|
82
80
|
menu .tkfd.f3.menu.m -tearoff 0
|
|
83
81
|
.tkfd.f3.menu config -takefocus 1 -highlightthickness 2 \
|
|
84
82
|
# the okBtn is created after the typeMenu so that the keyboard traversal
|
|
85
83
|
# is in the right order
|
|
86
84
|
button .tkfd.f2.ok -text OK -under 0 -width 6
|
|
87
85
|
button .tkfd.f3.cancel -text Cancel -under 0 -width 6
|
|
88
86
|
# pack the widgets in f2 and f3
|
|
89
87
|
#
|
|
90
88
|
pack .tkfd.f2.ok -side right -padx 4 -anchor e
|
|
91
89
|
pack .tkfd.f2.lab -side left -padx 4
|
|
92
90
|
pack .tkfd.f2.ent -expand yes -fill both -padx 2 -pady 2
|
|
93
91
|
|
|
94
92
|
pack .tkfd.f3.cancel -side right -padx 4 -anchor w
|
|
95
93
|
pack .tkfd.f3.lab -side left -padx 4
|
|
96
94
|
pack .tkfd.f3.menu -expand yes -fill x -side right
|
|
97
95
|
# Pack all the frames together. We are done with widget construction.
|
|
98
96
|
#
|
|
99
97
|
pack .tkfd.f1 -side top -fill x -pady 4
|
|
100
98
|
pack .tkfd.f3 -side bottom -fill x
|
|
101
99
|
pack .tkfd.f2 -side bottom -fill x
|
|
102
100
|
pack .tkfd.icons -expand yes -fill both -padx 4 -pady 2
|
|
103
101
|
# Set up the event handlers
|
|
104
102
|
#
|
|
105
103
|
bind .tkfd.f2.ent <Return> "mtkFDialog_ActivateEnt"
|
|
106
104
|
|
|
107
105
|
.tkfd.f1.up config -command "mtkFDialog_UpDirCmd"
|
|
108
106
|
.tkfd.f2.ok config -command "mtkFDialog_OkCmd"
|
|
109
107
|
.tkfd.f3.cancel config -command "mtkFDialog_CancelCmd"
|
|
110
108
|
bind .tkfd <Alt-d> "focus .tkfd.f1.menu"
|
|
111
109
|
bind .tkfd <Alt-t> "focus .tkfd.f3.menu"
|
|
112
110
|
bind .tkfd <Alt-n> "focus .tkfd.f2.ent"
|
|
113
111
|
bind .tkfd <KeyPress-Escape> "tkButtonInvoke .tkfd.f3.cancel"
|
|
114
112
|
bind .tkfd <Alt-o> "mtkFDialog_InvokeBtn Open"
|
|
115
113
|
bind .tkfd <Alt-s> "mtkFDialog_InvokeBtn Save"
|
|
116
114
|
# Build the focus group for all the entries
|
|
117
115
|
#
|
|
118
116
|
tkFocusGroup_Create .tkfd
|
|
119
117
|
tkFocusGroup_BindIn .tkfd .tkfd.f2.ent "mtkFDialog_EntFocusIn"
|
|
120
118
|
tkFocusGroup_BindOut .tkfd .tkfd.f2.ent "mtkFDialog_EntFocusOut"
|
|
121
119
|
# Create images for use in directory lists
|
|
122
120
|
if ![info exists tkPriv(folderImage)] {
|
|
123
121
|
}
|
|
124
122
|
global data
|
|
125
123
|
set data(type) $type
|
|
126
124
|
|
|
127
125
|
# 1: the configuration specs
|
|
128
126
|
#
|
|
129
127
|
set specs {
|
|
130
128
|
}
|
|
131
129
|
|
|
132
130
|
# 3: parse the arguments
|
|
133
131
|
#
|
|
134
132
|
tclParseConfigSpec data $specs "" $argList
|
|
135
133
|
|
|
136
134
|
if {$data(-title) == ""} {
|
|
137
135
|
}
|
|
138
136
|
|
|
139
137
|
# Mick Changes: Sets the initialdir to the path of initialfile
|
|
140
138
|
# if initialdir not set.
|
|
141
139
|
# Always wipes the dir path of initialfile
|
|
142
140
|
if { $data(-initialfile) != {} } {
|
|
143
141
|
}
|
|
144
142
|
|
|
145
143
|
# 4: set the default directory and selection according to the -initial
|
|
146
144
|
# settings
|
|
147
145
|
#
|
|
148
146
|
if { $data(-initialdir) == ""} {
|
|
149
147
|
} else {
|
|
150
148
|
}
|
|
151
149
|
# 5. Parse the -filetypes option
|
|
152
150
|
#
|
|
153
151
|
set data(-filetypes) [tkFDGetFileTypes $data(-filetypes)]
|
|
154
152
|
if {$data(-filetypes) == {}} {
|
|
155
153
|
} else {
|
|
156
154
|
}
|
|
157
155
|
wm transient .tkfd $data(-parent)
|
|
158
156
|
if ![winfo exists $data(-parent)] {
|
|
159
157
|
}
|
|
160
158
|
global data tcl_platform
|
|
161
159
|
set data(selectPath) $path
|
|
162
160
|
set appPWD [pwd]
|
|
163
161
|
if { $tcl_platform(platform) == "windows" && $data(selectPath) == "My Computer"} {
|
|
164
162
|
mtkFDialog_Update
|
|
165
163
|
my-cd "$appPWD"
|
|
166
164
|
return
|
|
167
165
|
}
|
|
168
166
|
mtkFDialog_Update
|
|
169
167
|
my-cd "$appPWD"
|
|
170
168
|
return
|
|
171
169
|
}
|
|
172
170
|
|
|
173
171
|
|
|
174
172
|
if [catch "my-cd \"$data(selectPath)\""] {
|
|
175
173
|
}
|
|
176
174
|
# Update the Directory: option menu
|
|
177
175
|
#
|
|
178
176
|
set list ""
|
|
179
177
|
# Mick: allow PCs to select other drives
|
|
180
178
|
global tcl_platform
|
|
181
179
|
switch -- $tcl_platform(platform) {
|
|
182
180
|
"windows" {set list [list "My Computer"]}
|
|
183
181
|
"macintosh" {set list [list "Desktop"]}
|
|
184
182
|
}
|
|
185
183
|
set dir ""
|
|
186
184
|
foreach subdir [file split $data(selectPath)] {
|
|
187
185
|
}
|
|
188
186
|
.tkfd.f1.menu.menu delete 0 end
|
|
189
187
|
foreach path $list {
|
|
190
188
|
}
|
|
191
189
|
# Restore the PWD to the application's PWD
|
|
192
190
|
#
|
|
193
191
|
my-cd "$appPWD"
|
|
194
192
|
# Change the displayed directory
|
|
195
193
|
mtkFDialog_Update
|
|
196
194
|
global data tkPriv tcl_platform
|
|
197
195
|
# If this is the Mac Desktop or PC "My Computer", just show the lists
|
|
198
196
|
tkf_show-toplevel
|
|
199
197
|
return
|
|
200
198
|
}
|
|
201
199
|
tkf_show-toplevel
|
|
202
200
|
return
|
|
203
201
|
}
|
|
204
202
|
# if the flter isnt set yet, delay the update
|
|
205
203
|
if {$data(-filetypes) != {}} {
|
|
206
204
|
}
|
|
207
205
|
|
|
208
206
|
set folder $tkPriv(folderImage)
|
|
209
207
|
set file $tkPriv(fileImage)
|
|
210
208
|
# Turn on the busy cursor. BUG?? We haven't disabled X events, though,
|
|
211
209
|
# so the user may still click and cause havoc ...
|
|
212
210
|
#
|
|
213
211
|
set entCursor [.tkfd.f2.ent cget -cursor]
|
|
214
212
|
set dlgCursor [.tkfd cget -cursor]
|
|
215
213
|
.tkfd.f2.ent config -cursor watch
|
|
216
214
|
.tkfd config -cursor watch
|
|
217
215
|
update idletasks
|
|
218
216
|
|
|
219
217
|
tkIconList_DeleteAll
|
|
220
218
|
my-cd "$data(selectPath)"
|
|
221
219
|
set globlist [lsort -dictionary [glob -nocomplain .* *]]
|
|
222
220
|
delete globlist "."
|
|
223
221
|
delete globlist ".."
|
|
224
222
|
# Make the dir list
|
|
225
223
|
#
|
|
226
224
|
foreach f $globlist {
|
|
227
225
|
}
|
|
228
226
|
# Make the file list
|
|
229
227
|
#
|
|
230
228
|
if { $data(filter)!= "*"} {
|
|
231
229
|
}
|
|
232
230
|
set top 0
|
|
233
231
|
foreach f $globlist {
|
|
234
232
|
}
|
|
235
233
|
tkIconList_Arrange
|
|
236
234
|
# turn off the busy cursor.
|
|
237
235
|
#
|
|
238
236
|
.tkfd.f2.ent config -cursor $entCursor
|
|
239
237
|
.tkfd config -cursor $dlgCursor
|
|
240
238
|
global data
|
|
241
239
|
set data(filter) [lindex $type 1]
|
|
242
240
|
.tkfd.f3.menu config -text [lindex $type 0] -indicatoron 1
|
|
243
241
|
.tkfd.icons.sbar set 0.0 0.0
|
|
244
242
|
# mick
|
|
245
243
|
set oldfile [eval ".tkfd.f2.ent get"]
|
|
246
244
|
if { $oldfile == {}} {set oldfile $data(selectFile)}
|
|
247
245
|
set data(selectFile) [file rootname $oldfile][file extension [lindex $type 1]]
|
|
248
246
|
.tkfd.f2.ent delete 0 end
|
|
249
247
|
.tkfd.f2.ent insert 0 $data(selectFile)
|
|
250
248
|
.tkfd.f2.ent select from 0
|
|
251
249
|
.tkfd.f2.ent select to end
|
|
252
250
|
.tkfd.f2.ent icursor end
|
|
253
251
|
mtkFDialog_Update
|
|
254
252
|
set appPWD [pwd]
|
|
255
253
|
set path [file join $context $text]
|
|
256
254
|
if [catch {file exists $path}] {
|
|
257
255
|
}
|
|
258
256
|
if [file exists $path] {
|
|
259
257
|
} else {
|
|
260
258
|
}
|
|
261
259
|
return [list $flag $directory $file]
|
|
262
260
|
global data
|
|
263
261
|
if { [.tkfd.f2.ent get] != ""} {
|
|
264
262
|
} else {
|
|
265
263
|
}
|
|
266
264
|
tkIconList_Unselect
|
|
267
265
|
if {$data(type) == "open"} {
|
|
268
266
|
} else {
|
|
269
267
|
}
|
|
270
268
|
.tkfd.f2.ent selection clear
|
|
271
269
|
global data
|
|
272
270
|
set text [string trim [.tkfd.f2.ent get]]
|
|
273
271
|
set list [mtkFDialogResolveFile $data(selectPath) $text]
|
|
274
272
|
set flag [lindex $list 0]
|
|
275
273
|
set path [lindex $list 1]
|
|
276
274
|
set file [lindex $list 2]
|
|
277
275
|
|
|
278
276
|
case $flag {
|
|
279
277
|
}
|
|
280
278
|
if ![string compare [.tkfd.f2.ok cget -text] $key] {
|
|
281
279
|
}
|
|
282
280
|
global data tcl_platform
|
|
283
281
|
switch -- $tcl_platform(platform) {
|
|
284
282
|
if { $data(selectPath) != "Desktop"} {
|
|
285
283
|
}
|
|
286
284
|
global data
|
|
287
285
|
set text [tkIconList_Get]
|
|
288
286
|
if { $text != ""} {
|
|
289
287
|
}
|
|
290
288
|
mtkFDialog_ActivateEnt
|
|
291
289
|
global tkPriv
|
|
292
290
|
set tkPriv(selectFilePath) ""
|
|
293
291
|
global data
|
|
294
292
|
if {$text == ""} {
|
|
295
293
|
}
|
|
296
294
|
set file [file join $data(selectPath) $text]
|
|
297
295
|
if ![file isdirectory $file] {
|
|
298
296
|
} else {
|
|
299
297
|
}
|
|
300
298
|
global data
|
|
301
299
|
if {$text == ""} {
|
|
302
300
|
}
|
|
303
301
|
set file [file join $data(selectPath) $text]
|
|
304
302
|
if [file isdirectory $file] {
|
|
305
303
|
} else {
|
|
306
304
|
}
|
|
307
305
|
global data tkPriv
|
|
308
306
|
if ![string compare $selectFilePath ""] {
|
|
309
307
|
}
|
|
310
308
|
set tkPriv(selectFilePath) $selectFilePath
|
|
311
309
|
global data
|
|
312
310
|
# Configure the widget variables of IconList, according to the command
|
|
313
311
|
# line arguments.
|
|
314
312
|
#
|
|
315
313
|
# 1: the configuration specs
|
|
316
314
|
#
|
|
317
315
|
set specs {
|
|
318
316
|
}
|
|
319
317
|
|
|
320
318
|
# 2: parse the arguments
|
|
321
319
|
#
|
|
322
320
|
tclParseConfigSpec data $specs "" $args
|
|
323
321
|
|
|
324
322
|
# Creates an IconList widget by assembling a canvas widget and a
|
|
325
323
|
# scrollbar widget. Sets all the bindings necessary for the IconList's
|
|
326
324
|
# operations.
|
|
327
325
|
|
|
328
326
|
frame $w
|
|
329
327
|
scrollbar $w.sbar -orient horizontal -highlightthickness 0 -takefocus 0
|
|
330
328
|
canvas $w.canvas -bd 2 -relief sunken -width 400 -height 120 -takefocus 1 -bg white
|
|
331
329
|
pack $w.sbar -side bottom -fill x -padx 2
|
|
332
330
|
pack $w.canvas -expand yes -fill both
|
|
333
331
|
|
|
334
332
|
$w.sbar config -command "$w.canvas xview"
|
|
335
333
|
$w.canvas config -xscrollcommand "$w.sbar set"
|
|
336
334
|
# Initializes the max icon/text width and height and other variables
|
|
337
335
|
#
|
|
338
336
|
set data(maxIW) 1
|
|
339
337
|
set data(maxIH) 1
|
|
340
338
|
set data(maxTW) 1
|
|
341
339
|
set data(maxTH) 1
|
|
342
340
|
set data(numItems) 0
|
|
343
341
|
set data(curItem) {}
|
|
344
342
|
set data(noScroll) 1
|
|
345
343
|
# Creates the event bindings.
|
|
346
344
|
#
|
|
347
345
|
bind $w.canvas <Configure> "tkIconList_Arrange"
|
|
348
346
|
bind $w.canvas <1> "tkIconList_Btn1 %x %y"
|
|
349
347
|
bind $w.canvas <B1-Motion> "tkIconList_Motion1 %x %y"
|
|
350
348
|
bind $w.canvas <Double-1> "tkIconList_Double1 %x %y"
|
|
351
349
|
bind $w.canvas <ButtonRelease-1> "tkCancelRepeat"
|
|
352
350
|
bind $w.canvas <B1-Leave> "tkIconList_Leave1 %x %y"
|
|
353
351
|
bind $w.canvas <B1-Enter> "tkCancelRepeat"
|
|
354
352
|
bind $w.canvas <Up> "tkIconList_UpDown -1"
|
|
355
353
|
bind $w.canvas <Down> "tkIconList_UpDown 1"
|
|
356
354
|
bind $w.canvas <Left> "tkIconList_LeftRight -1"
|
|
357
355
|
bind $w.canvas <Right> "tkIconList_LeftRight 1"
|
|
358
356
|
bind $w.canvas <Return> "tkIconList_ReturnKey"
|
|
359
357
|
bind $w.canvas <KeyPress> "tkIconList_KeyPress %A"
|
|
360
358
|
bind $w.canvas <Control-KeyPress> ";"
|
|
361
359
|
bind $w.canvas <Alt-KeyPress> ";"
|
|
362
360
|
bind $w.canvas <FocusIn> "tkIconList_FocusIn"
|
|
363
361
|
return $w
|
|
364
362
|
global tkPriv data
|
|
365
363
|
set w .tkfd.icons
|
|
366
364
|
if {![winfo exists $w]} return
|
|
367
365
|
set x $tkPriv(x)
|
|
368
366
|
set y $tkPriv(y)
|
|
369
367
|
if $data(noScroll) {
|
|
370
368
|
}
|
|
371
369
|
if {$x >= [winfo width $w.canvas]} {
|
|
372
370
|
} elseif {$x < 0} {
|
|
373
371
|
} elseif {$y >= [winfo height $w.canvas]} {
|
|
374
372
|
} elseif {$y < 0} {
|
|
375
373
|
} else {
|
|
376
374
|
}
|
|
377
375
|
tkIconList_Motion1 $x $y
|
|
378
376
|
set tkPriv(afterId) [after 50 tkIconList_AutoScan]
|
|
379
377
|
global data itemList
|
|
380
378
|
.tkfd.icons.canvas delete all
|
|
381
379
|
catch {unset data(selected)}
|
|
382
380
|
catch {unset data(rect)}
|
|
383
381
|
catch {unset data(list)}
|
|
384
382
|
catch {unset itemList}
|
|
385
383
|
set data(numItems) 0
|
|
386
384
|
set data(curItem) {}
|
|
387
385
|
global data itemList textList
|
|
388
386
|
set w .tkfd.icons
|
|
389
387
|
set iTag [$w.canvas create image 0 0 -image $image -anchor nw]
|
|
390
388
|
set tTag [$w.canvas create text 0 0 -text $text -anchor nw]
|
|
391
389
|
set rTag [$w.canvas create rect 0 0 0 0 -fill "" -outline ""]
|
|
392
390
|
|
|
393
391
|
set b [$w.canvas bbox $iTag]
|
|
394
392
|
set iW [expr [lindex $b 2]-[lindex $b 0]]
|
|
395
393
|
set iH [expr [lindex $b 3]-[lindex $b 1]]
|
|
396
394
|
if {$data(maxIW) < $iW} {
|
|
397
395
|
}
|
|
398
396
|
if {$data(maxIH) < $iH} {
|
|
399
397
|
}
|
|
400
398
|
|
|
401
399
|
set b [$w.canvas bbox $tTag]
|
|
402
400
|
set tW [expr [lindex $b 2]-[lindex $b 0]]
|
|
403
401
|
set tH [expr [lindex $b 3]-[lindex $b 1]]
|
|
404
402
|
if {$data(maxTW) < $tW} {
|
|
405
403
|
}
|
|
406
404
|
if {$data(maxTH) < $tH} {
|
|
407
405
|
}
|
|
408
406
|
|
|
409
407
|
lappend data(list) [list $iTag $tTag $rTag $iW $iH $tW $tH $data(numItems)]
|
|
410
408
|
set itemList($rTag) [list $iTag $tTag $text $data(numItems)]
|
|
411
409
|
set textList($data(numItems)) [string tolower $text]
|
|
412
410
|
incr data(numItems)
|
|
413
411
|
global data
|
|
414
412
|
set w .tkfd.icons
|
|
415
413
|
if ![info exists data(list)] {
|
|
416
414
|
}
|
|
417
415
|
set W [winfo width $w.canvas]
|
|
418
416
|
set H [winfo height $w.canvas]
|
|
419
417
|
set pad [expr [$w.canvas cget -highlightthickness] + \
|
|
420
418
|
incr W -[expr $pad*2]
|
|
421
419
|
incr H -[expr $pad*2]
|
|
422
420
|
set dx [expr $data(maxIW) + $data(maxTW) + 4]
|
|
423
421
|
if {$data(maxTH) > $data(maxIH)} {
|
|
424
422
|
} else {
|
|
425
423
|
}
|
|
426
424
|
set shift [expr $data(maxIW) + 4]
|
|
427
425
|
set x [expr $pad * 2]
|
|
428
426
|
set y [expr $pad * 1]
|
|
429
427
|
set usedColumn 0
|
|
430
428
|
foreach pair $data(list) {
|
|
431
429
|
}
|
|
432
430
|
if {$usedColumn} {
|
|
433
431
|
} else {
|
|
434
432
|
}
|
|
435
433
|
if {$sW < $W} {
|
|
436
434
|
} else {
|
|
437
435
|
}
|
|
438
436
|
set data(itemsPerColumn) [expr ($H-$pad)/$dy]
|
|
439
437
|
if {$data(itemsPerColumn) < 1} {
|
|
440
438
|
}
|
|
441
439
|
if {$data(curItem) != {}} {
|
|
442
440
|
}
|
|
443
441
|
global data
|
|
444
442
|
set w .tkfd.icons
|
|
445
443
|
if {$data(-command) != "" && [info exists data(selected)]} {
|
|
446
444
|
}
|
|
447
445
|
global data itemList
|
|
448
446
|
set w .tkfd.icons
|
|
449
447
|
if $data(noScroll) {
|
|
450
448
|
}
|
|
451
449
|
set sRegion [$w.canvas cget -scrollregion]
|
|
452
450
|
if ![string compare $sRegion {}] {
|
|
453
451
|
}
|
|
454
452
|
if ![info exists itemList($rTag)] {
|
|
455
453
|
}
|
|
456
454
|
set bbox [$w.canvas bbox $rTag]
|
|
457
455
|
set pad [expr [$w.canvas cget -highlightthickness] + \
|
|
458
456
|
set x1 [lindex $bbox 0]
|
|
459
457
|
set x2 [lindex $bbox 2]
|
|
460
458
|
incr x1 -[expr $pad * 2]
|
|
461
459
|
incr x2 -[expr $pad * 1]
|
|
462
460
|
set cW [expr [winfo width $w.canvas] - $pad*2]
|
|
463
461
|
set scrollW [expr [lindex $sRegion 2]-[lindex $sRegion 0]+1]
|
|
464
462
|
set dispX [expr int([lindex [$w.canvas xview] 0]*$scrollW)]
|
|
465
463
|
set oldDispX $dispX
|
|
466
464
|
# check if out of the right edge
|
|
467
465
|
#
|
|
468
466
|
if {[expr $x2 - $dispX] >= $cW} {
|
|
469
467
|
}
|
|
470
468
|
# check if out of the left edge
|
|
471
469
|
#
|
|
472
470
|
if {[expr $x1 - $dispX] < 0} {
|
|
473
471
|
}
|
|
474
472
|
if {$oldDispX != $dispX} {
|
|
475
473
|
}
|
|
476
474
|
global data
|
|
477
475
|
set w .tkfd.icons
|
|
478
476
|
tkIconList_Select [$w.canvas find closest \
|
|
479
477
|
global data itemList
|
|
480
478
|
set w .tkfd.icons
|
|
481
479
|
if ![info exists itemList($rTag)] {
|
|
482
480
|
}
|
|
483
481
|
set iTag [lindex $itemList($rTag) 0]
|
|
484
482
|
set tTag [lindex $itemList($rTag) 1]
|
|
485
483
|
set text [lindex $itemList($rTag) 2]
|
|
486
484
|
set serial [lindex $itemList($rTag) 3]
|
|
487
485
|
if ![info exists data(rect)] {
|
|
488
486
|
set data(rect) [$w.canvas create rect 0 0 0 0 \
|
|
489
487
|
}
|
|
490
488
|
$w.canvas lower $data(rect)
|
|
491
489
|
set bbox [$w.canvas bbox $tTag]
|
|
492
490
|
eval $w.canvas coords $data(rect) $bbox
|
|
493
491
|
set data(curItem) $serial
|
|
494
492
|
set data(selected) $text
|
|
495
493
|
|
|
496
494
|
if {$callBrowse} {
|
|
497
495
|
}
|
|
498
496
|
global data
|
|
499
497
|
set w .tkfd.icons
|
|
500
498
|
if [info exists data(rect)] {
|
|
501
499
|
}
|
|
502
500
|
if [info exists data(selected)] {
|
|
503
501
|
}
|
|
504
502
|
set data(curItem) {}
|
|
505
503
|
global data
|
|
506
504
|
set w .tkfd.icons
|
|
507
505
|
if [info exists data(selected)] {
|
|
508
506
|
} else {
|
|
509
507
|
}
|
|
510
508
|
global data
|
|
511
509
|
focus .tkfd.icons.canvas
|
|
512
510
|
tkIconList_SelectAtXY $x $y
|
|
513
511
|
global tkPriv
|
|
514
512
|
set tkPriv(x) $x
|
|
515
513
|
set tkPriv(y) $y
|
|
516
514
|
tkIconList_SelectAtXY $x $y
|
|
517
515
|
global data
|
|
518
516
|
if {$data(curItem) != {}} {
|
|
519
517
|
}
|
|
520
518
|
tkIconList_Invoke
|
|
521
519
|
global tkPriv
|
|
522
520
|
set tkPriv(x) $x
|
|
523
521
|
set tkPriv(y) $y
|
|
524
522
|
tkIconList_AutoScan
|
|
525
523
|
global data
|
|
526
524
|
if ![info exists data(list)] {
|
|
527
525
|
}
|
|
528
526
|
if {$data(curItem) == {}} {
|
|
529
527
|
}
|
|
530
528
|
global data
|
|
531
529
|
if ![info exists data(list)] {
|
|
532
530
|
}
|
|
533
531
|
if {$data(curItem) == {}} {
|
|
534
532
|
} else {
|
|
535
533
|
}
|
|
536
534
|
if [string compare $rTag ""] {
|
|
537
535
|
}
|
|
538
536
|
global data
|
|
539
537
|
if ![info exists data(list)] {
|
|
540
538
|
}
|
|
541
539
|
if {$data(curItem) == {}} {
|
|
542
540
|
} else {
|
|
543
541
|
}
|
|
544
542
|
if [string compare $rTag ""] {
|
|
545
543
|
}
|
|
546
544
|
global tkPriv
|
|
547
545
|
set w .tkfd.icons
|
|
548
546
|
append tkPriv(ILAccel,$w) $key
|
|
549
547
|
tkIconList_Goto $tkPriv(ILAccel,$w)
|
|
550
548
|
catch {
|
|
551
549
|
}
|
|
552
550
|
set tkPriv(ILAccel,$w,afterId) [after 500 tkIconList_Reset]
|
|
553
551
|
global data textList tkPriv
|
|
554
552
|
|
|
555
553
|
if ![info exists data(list)] {
|
|
556
554
|
}
|
|
557
555
|
if {[string length $text] == 0} {
|
|
558
556
|
}
|
|
559
557
|
if {$data(curItem) == {} || $data(curItem) == 0} {
|
|
560
558
|
} else {
|
|
561
559
|
}
|
|
562
560
|
set text [string tolower $text]
|
|
563
561
|
set theIndex -1
|
|
564
562
|
set less 0
|
|
565
563
|
set len [string length $text]
|
|
566
564
|
set len0 [expr $len-1]
|
|
567
565
|
set i $start
|
|
568
566
|
# Search forward until we find a filename whose prefix is an exact match
|
|
569
567
|
# with $text
|
|
570
568
|
while 1 {
|
|
571
569
|
}
|
|
572
570
|
if {$theIndex > -1} {
|
|
573
571
|
}
|
|
574
572
|
global tkPriv
|
|
575
573
|
set w .tkfd.icons
|
|
576
574
|
catch {unset tkPriv(ILAccel,$w)}
|
|
577
575
|
global data
|
|
578
576
|
mtkFDialog_SetPath $data(selectDrive)
|
|
579
577
|
global data tkPriv tcl_platform
|
|
580
578
|
# Turn on the busy cursor. BUG?? We haven't disabled X events, though,
|
|
581
579
|
# so the user may still click and cause havoc ...
|
|
582
580
|
#
|
|
583
581
|
set entCursor [.tkfd.f2.ent cget -cursor]
|
|
584
582
|
set dlgCursor [.tkfd cget -cursor]
|
|
585
583
|
.tkfd.f2.ent config -cursor watch
|
|
586
584
|
.tkfd config -cursor watch
|
|
587
585
|
update idletasks
|
|
588
586
|
|
|
589
587
|
tkIconList_DeleteAll
|
|
590
588
|
# Make the dir list
|
|
591
589
|
#
|
|
592
590
|
foreach drv [file volume] {
|
|
593
591
|
}
|
|
594
592
|
tkIconList_Arrange
|
|
595
593
|
# Update the Directory: option menu
|
|
596
594
|
#
|
|
597
595
|
.tkfd.f1.menu.menu delete 0 end
|
|
598
596
|
set var data(selectPath)
|
|
599
597
|
switch -- $tcl_platform(platform) {
|
|
600
598
|
windows {set label "My Computer"}
|
|
601
599
|
macintosh {set label "Desktop"}
|
|
602
600
|
}
|
|
603
601
|
|
|
604
602
|
.tkfd.f1.menu.menu add command -label $label -command [list set $var $label]
|
|
605
603
|
# turn off the busy cursor.
|
|
606
604
|
.tkfd.f2.ent config -cursor $entCursor
|
|
607
605
|
.tkfd config -cursor $dlgCursor
|
|
608
606
|
global tcl_platform
|
|
609
607
|
|
|
610
608
|
if {[lindex $path 1] != ""} {
|
|
611
609
|
}
|
|
612
610
|
if { $tcl_platform(platform) == "macintosh" && $path == "Desktop" } {return}
|
|
613
611
|
|
|
614
612
|
cd "$path"
|
|
615
613
|
global mtkfCURRDIR
|
|
616
614
|
if ![info exists mtkfCURRDIR] {set mtkfCURRDIR [pwd]}
|
|
617
615
|
return $mtkfCURRDIR
|
|
618
616
|
set oldgrab [grab current]
|
|
619
617
|
if { $oldgrab != {}} {grab release $oldgrab}
|
|
620
618
|
if {$parent != {}} {
|
|
621
619
|
} else {
|
|
622
620
|
}
|
|
623
621
|
if { $oldgrab != {}} {grab -global $oldgrab}
|
|
624
622
|
upvar $var list
|
|
625
623
|
set ix [lsearch -exact $list $value]
|
|
626
624
|
|
|
627
625
|
if {$ix >= 0} {
|
|
628
626
|
}
|
|
629
627
|
return $list
|