[Sumover-dev] [svn commit] r4594 - vic/branches/mpeg4/tcl
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Fri Feb 5 11:34:18 GMT 2010
Author: douglask
Date: Fri Feb 5 11:34:18 2010
New Revision: 4594
Modified:
vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl
vic/branches/mpeg4/tcl/ui-main.tcl
vic/branches/mpeg4/tcl/ui-titlemaker.tcl
Log:
Tcl 8.0 doesn't support the string comparison operators where the operand types are interpreted only as strings.
Reverted to == and !=
Modified: vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl (original)
+++ vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl Fri Feb 5 11:34:18 2010
@@ -34,7 +34,7 @@
# call exists first in tk 8.4, one possible
# reason for failure)
global tcl_platform
- if {$tcl_platform(platform) eq "windows"} {
+ if {$tcl_platform(platform) == "windows"} {
set tkws win32
} else {
# default to x11 otherwise
@@ -46,7 +46,7 @@
proc fork_histtolut { } {
global V
- if { $V(dither) eq "gray" } {
+ if { $V(dither) == "gray" } {
open_dialog "cannot optimize grayscale rendering"
return
}
@@ -83,7 +83,7 @@
#
#XXX -n
set eflag ""
- if { $V(dither) eq "ed" } {
+ if { $V(dither) == "ed" } {
set eflag "-e"
}
if [catch \
@@ -149,7 +149,7 @@
[[srctab local] srcid] [$net ttl] [[srctab local] sdes name] \
[[srctab local] sdes note]
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::button $w.dismiss -text Dismiss \
-command "toggle_window $w"
} else {
@@ -171,7 +171,7 @@
proc defaultDevice {} {
set d [resource defaultDevice]
- if { $d eq "" } {
+ if { $d == "" } {
set d [resource device]
}
return $d
@@ -181,19 +181,19 @@
global videoDevice inputDeviceList
set d [defaultDevice]
foreach v $inputDeviceList {
- if { [$v nickname] eq "$d" && \
- [$v attributes] ne "disabled" } {
+ if { [$v nickname] == "$d" && \
+ [$v attributes] != "disabled" } {
set videoDevice $v
select_device $v
return
}
}
- if { [string toupper [string range $d 0 4]] eq "V4L2:" } {
+ if { [string toupper [string range $d 0 4]] == "V4L2:" } {
set d [string range $d 5 end]
foreach v $inputDeviceList {
set k [expr [string length [$v nickname]] - [string length $d]]
- if { [string range [$v nickname] 0 4] eq "V4L2-" && \
- [string range [$v nickname] $k end] eq "$d" && \
+ if { [string range [$v nickname] 0 4] == "V4L2-" && \
+ [string range [$v nickname] $k end] == "$d" && \
[$v attributes] != "disabled" } {
set videoDevice $v
select_device $v
@@ -201,12 +201,12 @@
}
}
}
- if { [string toupper [string range $d 0 3]] eq "V4L:" } {
+ if { [string toupper [string range $d 0 3]] == "V4L:" } {
set d [string range $d 4 end]
foreach v $inputDeviceList {
set k [expr [string length [$v nickname]] - [string length $d]]
- if { [string range [$v nickname] 0 3] eq "V4L-" && \
- [string range [$v nickname] $k end] eq "$d" && \
+ if { [string range [$v nickname] 0 3] == "V4L-" && \
+ [string range [$v nickname] $k end] == "$d" && \
[$v attributes] != "disabled" } {
set videoDevice $v
select_device $v
@@ -258,12 +258,12 @@
frame $w.nb.frame.b
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::button $w.nb.frame.b.stats -text "Global Stats" \
-command create_global_window
ttk::button $w.nb.frame.b.members -text Members \
-command "toggle_window .srclist"
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
button $w.nb.frame.b.stats -text "Global Stats" -padx 10 \
-anchor c -font $f -command create_global_window
button $w.nb.frame.b.members -text Members -padx 10 \
@@ -329,7 +329,7 @@
}
proc create_encoder fmt {
- if { $fmt eq "nvdct" } {
+ if { $fmt == "nvdct" } {
set encoder [new module nv]
$encoder use-dct 1
} else {
@@ -353,7 +353,7 @@
# if that doesn't work, try anything else
if { [inList $videoFormat $DF] } {
- if { $videoFormat eq "h261" || $videoFormat eq "cellb" || $videoFormat eq "jpeg"} {
+ if { $videoFormat == "h261" || $videoFormat == "cellb" || $videoFormat == "jpeg"} {
# use special hardware tag...
set encoder ""
if { $useHardwareComp } {
@@ -367,7 +367,7 @@
}
set grabtarget $encoder
set grabq ""
- } elseif { $videoFormat eq "h261" && [inList jpeg $DF] && $useJPEGforH261 } {
+ } elseif { $videoFormat == "h261" && [inList jpeg $DF] && $useJPEGforH261 } {
# just jpeg->h261 at this time
set transcoder [new transcoder jpeg/dct]
set encoder [new module h261/dct]
@@ -388,7 +388,7 @@
set ff [$grabtarget frame-format]
set V(grabber) [$videoDevice open $ff]
# special cases
- if { $V(grabber) eq "" && $ff eq "420" } {
+ if { $V(grabber) == "" && $ff == "420" } {
# try cif instead of 420
set V(grabber) [$videoDevice open cif]
}
@@ -486,7 +486,7 @@
global logoButton
set logoButton $w.logo
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::checkbutton $w.send -text "Transmit" \
-command transmit \
-variable transmitButtonState \
@@ -524,7 +524,7 @@
proc update_encoder_param { } {
global videoFormat fps_slider bps_slider
- if {$videoFormat eq "mpeg4" || $videoFormat eq "h264"} {
+ if {$videoFormat == "mpeg4" || $videoFormat == "h264"} {
encoder kbps [expr round([$bps_slider get])]
encoder fps [expr round([$fps_slider get])]
}
@@ -536,7 +536,7 @@
set value [expr round($value)]
if [have grabber] {
grabber bps $value
- if {$videoFormat eq "mpeg4" || $videoFormat eq "h264"} {
+ if {$videoFormat == "mpeg4" || $videoFormat == "h264"} {
encoder kbps $value
}
@@ -552,7 +552,7 @@
set value [expr round($value)]
if [have grabber] {
grabber fps $value
- if {$videoFormat eq "mpeg4" || $videoFormat eq "h264"} {
+ if {$videoFormat == "mpeg4" || $videoFormat == "h264"} {
encoder fps $value
}
}
@@ -577,7 +577,7 @@
pack $w.info.label -side left
pack $w.info.bps $w.info.fps -side right
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
frame $w.bps
ttk::scale $w.bps.scale -orient horizontal \
-value 0 -from 1 -to [option get . maxbw Vic] \
@@ -626,7 +626,7 @@
proc attribute_class { attr class } {
while { [llength $attr] >= 2 } {
- if { [lindex $attr 0] eq $class } {
+ if { [lindex $attr 0] == $class } {
return [lindex $attr 1]
}
set attr [lrange $attr 2 end]
@@ -654,7 +654,7 @@
proc device_supports { device class attr } {
set L [$device attributes]
set L [attribute_class $L $class]
- if { $attr eq "*" } {
+ if { $attr == "*" } {
if { $L == "" } {
return 0
} else {
@@ -705,7 +705,7 @@
set w .menu.$devname
global grabberPanel
if [info exists grabberPanel] {
- if { "$grabberPanel" eq "$w" } {
+ if { "$grabberPanel" == "$w" } {
return
}
pack forget $grabberPanel
@@ -748,7 +748,7 @@
foreach b $formatButtons {
set fmt [lindex [$b configure -value] 4]
#XXX
- if { $fmt eq "bvc" && ![yesno enableBVC] } {
+ if { $fmt == "bvc" && ![yesno enableBVC] } {
$b configure -state disabled
} elseif { [inList $fmt $fmtList] } {
$b configure -state normal
@@ -796,9 +796,9 @@
set f [smallfont]
set m $w.menu
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::menubutton $w -menu $m -text Device -width 8
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
menubutton $w -menu $m -text Device -width 8 -pady 4
} else {
menubutton $w -menu $m -text Device -indicatoron 1 \
@@ -808,13 +808,13 @@
global defaultFormat inputDeviceList videoFormat
set videoFormat [option get . defaultFormat Vic]
- if { $videoFormat eq "h.261" } {
+ if { $videoFormat == "h.261" } {
set videoFormat h261
- } elseif { $videoFormat eq "h.263plus"} {
+ } elseif { $videoFormat == "h.263plus"} {
set videoFormat h263+
- } elseif { $videoFormat eq "mpeg4"} {
+ } elseif { $videoFormat == "mpeg4"} {
set videoFormat mpeg4
- } elseif { $videoFormat eq "h264"} {
+ } elseif { $videoFormat == "h264"} {
set videoFormat h264
}
@@ -827,11 +827,11 @@
return
}
foreach d $inputDeviceList {
- if { [$d nickname] eq "still" && ![yesno stillGrabber] } {
+ if { [$d nickname] == "still" && ![yesno stillGrabber] } {
set defaultFormat($d) $videoFormat
continue
}
- if { [$d nickname] eq "filedev" && ![yesno fileGrabber] } {
+ if { [$d nickname] == "filedev" && ![yesno fileGrabber] } {
set defaultFormat($d) $videoFormat
continue
}
@@ -839,7 +839,7 @@
$m add radiobutton -label [$d nickname] \
-command "select_device $d" \
-value $d -variable videoDevice -font $f
- if { "[$d attributes]" eq "disabled" } {
+ if { "[$d attributes]" == "disabled" } {
$m entryconfigure [$d nickname] -state disabled
}
set fmtList [device_formats $d]
@@ -855,7 +855,7 @@
set f [smallfont]
frame $w
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::radiobutton $w.b0 -text $n0 \
-variable videoFormat -value $n0 \
-command "select_format $n0" -state disabled
@@ -902,7 +902,7 @@
set reliefn1 flat
}
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::radiobutton $w.b0 -text $n0 \
-variable videoFormat -value $n0 \
-command "select_format $n0" -state disabled
@@ -948,7 +948,7 @@
frame $w.tb
label $w.title -text "Layers" -font $f -anchor w
label $w.tb.value -text 0 -font $f -width 3
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::scale $w.tb.scale -orient horizontal \
-value 0 -from 0 -to $numLayers \
-variable numEncoderLayers \
@@ -1016,7 +1016,7 @@
set b $w.b
frame $b
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::radiobutton $b.b0 -text "small" -command "restart" \
-variable inputSize -value 4
ttk::radiobutton $b.b1 -text "normal" -command "restart" \
@@ -1044,10 +1044,10 @@
proc build.port w {
set f [smallfont]
# create the menubutton but don't defer the menu creation until later
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::menubutton $w -menu $w.menu -text Port -width 8 \
-state disabled
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
menubutton $w -menu $w.menu -text Port -width 8 -pady 4 \
-state disabled
} else {
@@ -1090,10 +1090,10 @@
proc build.type w {
set f [smallfont]
# create the menubutton but don't defer the menu creation until later
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::menubutton $w -menu $w.menu -text Signal -width 8 \
-state disabled
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
menubutton $w -menu $w.menu -text Signal -width 8 -pady 4 \
-state disabled
} else {
@@ -1115,13 +1115,13 @@
foreach typename $typenames {
set type [string tolower $typename]
- if { $type eq "ntsc" } {
+ if { $type == "ntsc" } {
set typename "NTSC"
- } elseif { $type eq "pal" } {
+ } elseif { $type == "pal" } {
set typename "PAL"
- } elseif { $type eq "secam" } {
+ } elseif { $type == "secam" } {
set typename "SECAM"
- } elseif { $type eq "auto" } {
+ } elseif { $type == "auto" } {
set typename "auto"
}
@@ -1160,9 +1160,9 @@
set f [smallfont]
set m $w.menu
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::menubutton $w -text Options -menu $m -width 8
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
menubutton $w -text Options -menu $m -width 8 -pady 4
} else {
menubutton $w -text Options -menu $m -relief raised -width 10 \
@@ -1175,7 +1175,7 @@
-variable useJPEGforH261 -font $f -command restart
$m add checkbutton -label "Use Hardware Encode" \
-variable useHardwareComp -font $f -command restart
- if { $tcl_platform(platform) eq "windows" || [windowingsystem] eq "aqua"} {
+ if { $tcl_platform(platform) == "windows" || [windowingsystem] == "aqua"} {
$m add checkbutton -label "Configure on Transmit" \
-variable configOnTransmit -font $f \
-command "grabber useconfig \$configOnTransmit"
@@ -1185,9 +1185,9 @@
proc build.tile w {
set f [smallfont]
set m $w.menu
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::menubutton $w -text Tile -menu $m -width 8
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
menubutton $w -text Tile -menu $m -width 8 -pady 4
} else {
menubutton $w -text Tile -menu $m -relief raised -width 10 \
@@ -1207,9 +1207,9 @@
proc build.decoder_options w {
set f [smallfont]
set m $w.menu
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::menubutton $w -text Options -menu $m -width 8
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
menubutton $w -text Options -menu $m -width 8 -pady 4
} else {
menubutton $w -text Options -menu $m -relief raised -width 10 \
@@ -1238,7 +1238,7 @@
set outputDeviceList ""
}
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
if { [llength $outputDeviceList] <= 1 } {
ttk::button $w -text External -width 10 \
-command "extout_select $outputDeviceList"
@@ -1282,7 +1282,7 @@
}
set v $w.h0
frame $v
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::radiobutton $v.b0 -text "Ordered" -command set_dither \
-variable $var -state $state \
-value od
@@ -1644,14 +1644,14 @@
proc select_format fmt {
global qscale qlabel videoDevice videoFormat qscale_val lastFmt inputSize
- if { $fmt eq "h261" || $fmt eq "pvh"} {
+ if { $fmt == "h261" || $fmt == "pvh"} {
# H.261 supports only QCIF/CIF
disable_large_button
} else {
enable_large_button
}
- if { $fmt eq "pvh"} {
+ if { $fmt == "pvh"} {
set w .menu.encoder.f.encoderLayer
if ![winfo exists $w] {
frame $w
@@ -1668,7 +1668,7 @@
set proc $fmt\_setq
if [inList $proc [info commands *_setq]] {
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
$qscale state !disabled
$qscale configure -command $proc
} else {
@@ -1676,7 +1676,7 @@
}
$qlabel configure -foreground black
} else {
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
$qscale state !active
$qscale state disabled
} else {
@@ -1706,7 +1706,7 @@
# MM
set ff [$encoder frame-format]
- if { "$ff" eq "[$V(encoder) frame-format]" && [windowingsystem] ne "aqua"} {
+ if { "$ff" == "[$V(encoder) frame-format]" && [windowingsystem] != "aqua"} {
#
# new framer has the same format as the
# old one. just replace the old one without
@@ -1743,7 +1743,7 @@
proc init_grabber { grabber } {
global V configOnTransmit tcl_platform
- if { $tcl_platform(platform) eq "windows" || [windowingsystem] eq "aqua"} {
+ if { $tcl_platform(platform) == "windows" || [windowingsystem] == "aqua"} {
$grabber useconfig $configOnTransmit
}
@@ -1775,8 +1775,8 @@
global inputPort inputType portButton typeButton
# MacOS-X requires port and input type to be set before decimate
# is called otherwise the channel device's input may be busy
- if {[windowingsystem] eq "aqua"} {
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {[windowingsystem] == "aqua"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
$portButton instate {active} {
$grabber port $inputPort
}
@@ -1784,10 +1784,10 @@
$grabber type $inputType
}
} else {
- if { [$portButton cget -state] eq "normal" } {
+ if { [$portButton cget -state] == "normal" } {
$grabber port $inputPort
}
- if { [$typeButton cget -state] eq "normal" } {
+ if { [$typeButton cget -state] == "normal" } {
$grabber type $inputType
}
}
@@ -1797,12 +1797,12 @@
$grabber bps [expr round([$bps_slider get])]
$grabber decimate $inputSize
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
$qscale instate {!disabled} {
set cmd [$qscale cget -command]
$cmd [expr round([$qscale get])]
}
- if {[windowingsystem] ne "aqua"} {
+ if {[windowingsystem] != "aqua"} {
$portButton instate {!disabled} {
$grabber port $inputPort
}
@@ -1811,15 +1811,15 @@
}
}
} else {
- if { [lindex [$qscale configure -state] 4] eq "normal" } {
+ if { [lindex [$qscale configure -state] 4] == "normal" } {
set cmd [lindex [$qscale configure -command] 4]
$cmd [$qscale get]
}
- if {[windowingsystem] ne "aqua"} {
- if { [$portButton cget -state] eq "normal" } {
+ if {[windowingsystem] != "aqua"} {
+ if { [$portButton cget -state] == "normal" } {
$grabber port $inputPort
}
- if { [$typeButton cget -state] eq "normal" } {
+ if { [$typeButton cget -state] == "normal" } {
$grabber type $inputType
}
}
@@ -1833,7 +1833,7 @@
frame $w.tb
label $w.title -text "Quality" -font $f -anchor w
label $w.tb.value -text 0 -font $f -width 3
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::scale $w.tb.scale -orient horizontal \
-value 0 -from 0 -to 99
} else {
@@ -1893,7 +1893,7 @@
proc revert_to_gray {} {
global V
- if { $V(dither) eq "gray" } {
+ if { $V(dither) == "gray" } {
#XXX
puts stderr "vic: out of colors"
exit 1
Modified: vic/branches/mpeg4/tcl/ui-main.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/ui-main.tcl (original)
+++ vic/branches/mpeg4/tcl/ui-main.tcl Fri Feb 5 11:34:18 2010
@@ -52,7 +52,7 @@
global title
frame $w.bar -borderwidth 0
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
global V
set net $V(data-net)
label $w.bar.title -text "Address: [$net addr] Port: [$net port] TTL: [$net ttl]" -font [smallfont] -justify left
@@ -64,7 +64,7 @@
-command "toggle_window .help"
ttk::button $w.bar.autoplace -text Autoplace \
-command "ag_autoplace::show_ui"
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
global V
set net $V(data-net)
label $w.bar.title -text "Address: [$net addr] Port: [$net port] TTL: [$net ttl]" -font [smallfont] -justify left
@@ -101,7 +101,7 @@
pack $w.bar.title -side left -fill both -expand 1
pack $w.bar.menu $w.bar.autoplace $w.bar.help $w.bar.quit -side left -padx 1 -pady 1
- if {[windowingsystem] eq "aqua"} {
+ if {[windowingsystem] == "aqua"} {
label $w.bar.gap -text " "
pack $w.bar.gap -side left -padx 1 -pady 1
@@ -112,7 +112,7 @@
frame $w.bar2 -relief ridge -borderwidth 0
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::button $w.bar2.autoplace -text Autoplace \
-command "ag_autoplace::show_ui"
ttk::button $w.bar2.pixrate -text Pixrate \
@@ -569,11 +569,11 @@
# disable xvideo for stamp video
attach_window $src $stamp.video false
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
pack $stamp.video -side left -padx 2 -pady 2
pack $stamp -side left -anchor nw -padx {4 2} -pady 2
frame $w.r -padx 2
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
pack $stamp.video -side left -padx 2 -pady 2
pack $stamp -side left -anchor nw -padx {4 2} -pady 2
frame $w.r -padx 2
@@ -594,12 +594,12 @@
pack $w.r.cw -side left -expand 1 -fill both -anchor w -padx 0
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
label $w.r.cw.name -textvariable src_nickname($src) -font $f \
-padx 2 -pady 1 -borderwidth 0 -anchor w
label $w.r.cw.addr -textvariable src_info($src) -font $f \
-padx 2 -pady 1 -borderwidth 0 -anchor w
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
label $w.r.cw.name -textvariable src_nickname($src) -font $f \
-padx 2 -pady 1 -borderwidth 0 -anchor w
label $w.r.cw.addr -textvariable src_info($src) -font $f \
@@ -631,7 +631,7 @@
set mutebutton($src) $V(muteNewSources)
$src mute $mutebutton($src)
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::checkbutton $w.r.ctrl.mute -text mute -width 4 \
-command "$src mute \$mutebutton($src)" \
-variable mutebutton($src)
@@ -639,7 +639,7 @@
ttk::checkbutton $w.r.ctrl.color -text color -width 4 \
-command "\[$src handler\] color \$colorbutton($src)" \
-variable colorbutton($src)
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
checkbutton $w.r.ctrl.mute -text mute -borderwidth 2 \
-font $f -width 4 \
-command "$src mute \$mutebutton($src)" \
@@ -664,9 +664,9 @@
}
set m $w.r.ctrl.info.menu$src
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::menubutton $w.r.ctrl.info -text info -menu $m
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
menubutton $w.r.ctrl.info -text info -borderwidth 2 \
-font $f -pady 4 -menu $m
} else {
@@ -677,11 +677,11 @@
}
build_info_menu $src $m
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
pack $w.r.ctrl.mute -side left -expand 1
pack $w.r.ctrl.color -side left -expand 1
pack $w.r.ctrl.info -side left -fill x -expand 1
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
pack $w.r.ctrl.mute -side left -expand 1
pack $w.r.ctrl.color -side left -expand 1
pack $w.r.ctrl.info -side left -fill x -expand 1
@@ -706,7 +706,7 @@
if {$::tk_version > 8.4} {
bind $stamp <Enter> "%W configure -background [$m cget -activebackground]"
bind $stamp <Leave> "%W configure -background [$m cget -background]"
- } elseif {[windowingsystem] eq "aqua"} {
+ } elseif {[windowingsystem] == "aqua"} {
bind $stamp <Enter> "%W configure -background CornflowerBlue"
bind $stamp <Leave> "%W configure -background [resource background]"
} else {
Modified: vic/branches/mpeg4/tcl/ui-titlemaker.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/ui-titlemaker.tcl (original)
+++ vic/branches/mpeg4/tcl/ui-titlemaker.tcl Fri Feb 5 11:34:18 2010
@@ -60,7 +60,7 @@
label $w.b.file.label -text "Overlay Image file:" -font $f -anchor w
mk.entry $w.b.file tm.update.filename $selectedFile
$w.b.file.entry configure -width 39
- if {$::tk_version > 8.4 && [windowingsystem] ne "x11"} {
+ if {$::tk_version > 8.4 && [windowingsystem] != "x11"} {
ttk::button $w.b.file.selectfile \
-compound image \
-command "logo_fileselect $w.b.file.entry" \
More information about the Sumover-dev
mailing list