[GRASS-SVN] r35024 - grass/branches/develbranch_6/lib/gtcltk
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Dec 26 01:43:53 EST 2008
Author: cmbarton
Date: 2008-12-26 01:43:53 -0500 (Fri, 26 Dec 2008)
New Revision: 35024
Modified:
grass/branches/develbranch_6/lib/gtcltk/gronsole.tcl
grass/branches/develbranch_6/lib/gtcltk/select.tcl
Log:
select.tcl: fixed mouse wheel scrolling, dictionary sorting (PERMANENT at top)
gronsole.tcl: switched to cut icon for cutting text
Modified: grass/branches/develbranch_6/lib/gtcltk/gronsole.tcl
===================================================================
--- grass/branches/develbranch_6/lib/gtcltk/gronsole.tcl 2008-12-26 06:41:43 UTC (rev 35023)
+++ grass/branches/develbranch_6/lib/gtcltk/gronsole.tcl 2008-12-26 06:43:53 UTC (rev 35024)
@@ -187,7 +187,9 @@
}
proc Gronsole::create_command {path cmd} {
+ global iconpath
variable _data
+
set textarea $path.text
incr _data($path,count)
@@ -208,7 +210,7 @@
bind $cmdlabel <Button-1> "Gronsole::do_click $path $ci"
# set cmdlabel [text $frame.cmdline.cmd -height 1 -width 10]
# $cmdlabel insert end $cmd
- set ex [button $frame.cmdline.eX -text "X" -command "Gronsole::destroy_command $path $ci"]
+ set ex [button $frame.cmdline.eX -image [image create photo -file "$iconpath/edit-cut.gif"] -command "Gronsole::destroy_command $path $ci"]
pack $ex -side right
pack $frame.cmdline.tags -side right
set iconwidth ""
Modified: grass/branches/develbranch_6/lib/gtcltk/select.tcl
===================================================================
--- grass/branches/develbranch_6/lib/gtcltk/select.tcl 2008-12-26 06:41:43 UTC (rev 35023)
+++ grass/branches/develbranch_6/lib/gtcltk/select.tcl 2008-12-26 06:43:53 UTC (rev 35024)
@@ -26,7 +26,7 @@
set bind_scroll_list {}
-proc handle_scroll {ammount} {
+proc handle_scroll {amount} {
global bind_scroll_list
foreach {x y} {-1 -1} {}
@@ -46,7 +46,7 @@
set l [string length $parent]
if {[string equal -length $l $parent $keyboard_focus] || \
[string equal -length $l $parent $mouse_focus]} {
- $window yview scroll [expr {-$ammount/120}] units
+ $window yview scroll [expr -1 * $amount] units
}
}
@@ -176,7 +176,7 @@
-image [Bitmap::get folder] -drawcross auto
}
set path "$location_path/$dir/$element/"
- foreach fp [ lsort [glob -nocomplain $path/*] ] {
+ foreach fp [ lsort -dictionary [glob -nocomplain $path/*] ] {
set file [file tail $fp]
$tree insert end ms_$dir $file@$dir -text $file -data $file \
-image [Bitmap::get file] -drawcross never
@@ -189,12 +189,12 @@
$tree insert end root ms_$sympath -text SYMBOLS -data $sympath -open 1 \
-image [Bitmap::get openfold] -drawcross auto
- foreach ic_dir [ lsort [glob -nocomplain $sympath/*] ] {
+ foreach ic_dir [ lsort -dictionary [glob -nocomplain $sympath/*] ] {
set dir_tail [file tail $ic_dir]
$tree insert end ms_$sympath ms_$dir_tail -text $dir_tail -data $dir_tail \
-image [Bitmap::get folder] -drawcross auto
- foreach ic_file [ lsort [glob -nocomplain $sympath/$dir_tail/*] ] {
+ foreach ic_file [ lsort -dictionary [glob -nocomplain $sympath/$dir_tail/*] ] {
set file [file tail $ic_file]
$tree insert end ms_$dir_tail $dir_tail/$file -text $file -data $file \
-image [Bitmap::get file] -drawcross never
More information about the grass-commit
mailing list