Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add callback function from flist to set path whenever changed |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | ae02a91c0a6700f7b93a968f79717f919f09f7f4 |
User & Date: | dennis 2001-06-11 19:33:37 |
Context
2001-06-11
| ||
20:59 | Added -buffer param to all load types check-in: fbd262b600 user: dennis tags: trunk | |
19:33 | Add callback function from flist to set path whenever changed check-in: ae02a91c0a user: dennis tags: trunk | |
2001-03-03
| ||
12:30 | Preparations for release check-in: 36f2a62a82 user: dennis tags: release_0_9_10, trunk | |
Changes
Changes to lib/flist.tcl.
1
2
3
4
5
6
7
8
9
10
..
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
namespace eval flist {
namespace export Show w lasttag showdir
proc Show {w} {
global lasttag
set lasttag ""
showdir $w "*"
return $w
}
................................................................................
} else {
flist::open $file
}
}
}
proc showdir {w path} {
global current_window window
set typs ""
set openlist [win::pathnames]
set list [glob -nocomplain $path]
for {set i 0} {$i <[llength $list]} {incr i } {
set f [lindex $list $i]
if {[file isdir $f]} {
|
>
>
>
>
>
>
>
|
>
>
>
>
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
namespace eval flist { namespace export Show w lasttag showdir set callback_setpath "" proc set_callback_setpath {p} { global callback_setpath set callback_setpath $p } proc Show {w} { global lasttag set lasttag "" showdir $w "*" return $w } ................................................................................ } else { flist::open $file } } } proc showdir {w path} { global current_window window callback_setpath set typs "" set openlist [win::pathnames] if {[info exists callback_setpath]} { if {$callback_setpath!=""} { eval "callback_sp" [pwd] } } set list [glob -nocomplain $path] for {set i 0} {$i <[llength $list]} {incr i } { set f [lindex $list $i] if {[file isdir $f]} { |
Changes to lib/gui.tcl.
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 ... 245 246 247 248 249 250 251 252 253 254 255 256 257 258 ... 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
powin $dlg vwait r if {$r=="ok"} {set r [$dlg.input.entry get] } destroy $dlg return $r } #------------------------ Flist procedure ----------------- proc doflist {act} { global c flistw if {$act==1} { frame .hz -relief raised -borderwidth 1 -cursor sb_h_double_arrow -width 4 canvas .flist -background $c(color-listbg) -width $c(flist-width) -borderwidth 1 -relief sunken -xscrollcommand ".fscrollx set" -yscrollcommand ".fscrolly set" flist::Show .flist scrollbar .fscrollx -command ".flist xview" -orient horiz -background $c(color-menubg) -activebackground $c(color-menuactive) -troughcolor $c(color-menubg) scrollbar .fscrolly -command ".flist yview" -background $c(color-menubg) -activebackground $c(color-menuactive) -troughcolor $c(color-menubg) entry .path -borderwidth 1 -width 1 ................................................................................ grid columnconfigure . 0 -weight 0 grid columnconfigure . 1 -weight 0 grid columnconfigure . 2 -weight 0 grid columnconfigure . 3 -weight 1 grid columnconfigure . 4 -weight 0 set flistw "" bind .hz <Button-1> { global flistw flistow %W configure -background $c(color-menuactive) set flistw %X set flistow [expr [winfo width .flist]-4] } ................................................................................ flist::showdir .flist * } bind .flist <Button-3> {.fmnu post [winfo pointerx . ] [winfo pointery .]} bind .flist <Button-1> {.fmnu unpost} } else { destroy .flist destroy .fscrolly destroy .fscrollx destroy .path destroy .hz grid .scrollx -column 0 -row 3 -sticky ew -columnspan 3 |
> > > > > > > > > |
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 ... 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 ... 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
powin $dlg vwait r if {$r=="ok"} {set r [$dlg.input.entry get] } destroy $dlg return $r } #------------------------ Flist procedure ----------------- proc callback_sp {path} { .path delete 0 end .path insert end $path } proc doflist {act} { global c flistw if {$act==1} { frame .hz -relief raised -borderwidth 1 -cursor sb_h_double_arrow -width 4 canvas .flist -background $c(color-listbg) -width $c(flist-width) -borderwidth 1 -relief sunken -xscrollcommand ".fscrollx set" -yscrollcommand ".fscrolly set" flist::Show .flist scrollbar .fscrollx -command ".flist xview" -orient horiz -background $c(color-menubg) -activebackground $c(color-menuactive) -troughcolor $c(color-menubg) scrollbar .fscrolly -command ".flist yview" -background $c(color-menubg) -activebackground $c(color-menuactive) -troughcolor $c(color-menubg) entry .path -borderwidth 1 -width 1 ................................................................................ grid columnconfigure . 0 -weight 0 grid columnconfigure . 1 -weight 0 grid columnconfigure . 2 -weight 0 grid columnconfigure . 3 -weight 1 grid columnconfigure . 4 -weight 0 set flistw "" flist::set_callback_setpath "callback_sp" bind .hz <Button-1> { global flistw flistow %W configure -background $c(color-menuactive) set flistw %X set flistow [expr [winfo width .flist]-4] } ................................................................................ flist::showdir .flist * } bind .flist <Button-3> {.fmnu post [winfo pointerx . ] [winfo pointery .]} bind .flist <Button-1> {.fmnu unpost} } else { flist::set_callback_setpath "" destroy .flist destroy .fscrolly destroy .fscrollx destroy .path destroy .hz grid .scrollx -column 0 -row 3 -sticky ew -columnspan 3 |