[Sumover-dev] [svn commit] r4214 - vic/branches/mpeg4/tcl
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Mon Jul 14 04:33:11 BST 2008
Author: douglask
Date: Mon Jul 14 04:32:54 2008
New Revision: 4214
Modified:
vic/branches/mpeg4/tcl/ui-windows.tcl
Log:
Enable right mouse button menu on MacOS X.
On MacOS X the right mouse button is Button-2, not Button-3.
Modified: vic/branches/mpeg4/tcl/ui-windows.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/ui-windows.tcl (original)
+++ vic/branches/mpeg4/tcl/ui-windows.tcl Mon Jul 14 04:32:54 2008
@@ -293,8 +293,8 @@
$m add radiobutton -label "Half size" \
-command "resize $v [expr $iw / 2] [expr $ih / 2]" \
-font $f -value "half" -variable size$w
- $m add radiobutton -label "Normal size" -command "resize $v $iw $ih" \
- -font $f -value "normal" -variable size$w
+ $m add radiobutton -label "Original size" -command "resize $v $iw $ih" \
+ -font $f -value "original" -variable size$w -accelerator "O"
$m add radiobutton -label "Double size" \
-command "resize $v [expr $iw * 2] [expr $ih * 2]" \
-font $f -value "double" -variable size$w
@@ -367,7 +367,7 @@
bind $w <e> "resize $v 1000 750; set size$w 1000x750"
bind $w <E> "resize $v 1024 768; set size$w 1024x768"
bind $w <x> "resize $v 640 240; set size$w 640x240"
- bind $w <o> "fit_window $v"
+ bind $w <o> "fit_window $v; set size$w original"
bind $w <z> "catch { wm overrideredirect $w 1; wm withdraw $w; wm deiconify $w}"
bind $w <Z> "catch { wm overrideredirect $w 0; wm withdraw $w; wm deiconify $w}"
@@ -397,10 +397,23 @@
set window_glue($v) 0
global button_active vtk_client
- bind $v <Button-3> {
- set w [lindex [split %W "."] 1]
- set m .$w.bar.size.menu
- tk_popup $m %X %Y
+ if {[string match [ windowingsystem] "aqua"]} {
+ bind $v <Button-2> {
+ set w [lindex [split %W "."] 1]
+ set m .$w.bar.size.menu
+ tk_popup $m %X %Y
+ }
+ bind $v <Control-1> {
+ set w [lindex [split %W "."] 1]
+ set m .$w.bar.size.menu
+ tk_popup $m %X %Y
+ }
+ } else {
+ bind $v <Button-3> {
+ set w [lindex [split %W "."] 1]
+ set m .$w.bar.size.menu
+ tk_popup $m %X %Y
+ }
}
# puts "w is $v"
More information about the Sumover-dev
mailing list