2005/11/25, Jérôme Gagnon-Voyer <[EMAIL PROTECTED]>:
> A bug to fix before the release
> http://amsn.sourceforge.net/bugs/admin/index.php?bug=&submit=Go&query=camgui%3A%3Afill&date_filter=&cvs_filter=&tcl_filter=&tk_filter=&os_filter=&flag_filter=0&orderby=bug_cvsdate%20DESC#
>
> Fixed the bug with webcam properties for Windows (and Linux)
>
Hi!
This patch should fix the bug. I've tested it on linux with a single
webcam, using vloopback to "fake" others. I've not tested grabbing
from an other webcam since i don't manage to make effectv working.
So, if you have two webcams, or a TVcard, please test it.
The bug shouldn't occur on Windows.
--
Boris FAURE (billiob)
mail, msn : [EMAIL PROTECTED]
No trees were killed in the sending of this message.
However, a large number of electrons were terribly
agitated.
--- msncam.tcl 2005-11-26 15:55:16.000000000 +0100
+++ msncam.tcl 2005-11-26 16:02:28.000000000 +0100
@@ -2202,7 +2202,7 @@
button $settings -text "[trans changevideosettings]"
frame $buttons -relief sunken -borderwidth 3
- button $buttons.ok -text "[trans ok]" -command "::CAMGUI::Choose_OkLinux $window $devs.list $chans.list $img {$devices}"
+ button $buttons.ok -text "[trans ok]" -command "::CAMGUI::Choose_OkLinux $window $devs.list $chans.list $img [list $devices]"
button $buttons.cancel -text "[trans cancel]" -command "::CAMGUI::Choose_CancelLinux $window $img"
wm protocol $window WM_DELETE_WINDOW "::CAMGUI::Choose_CancelLinux $window $img"
#bind $window <Destroy> "::CAMGUI::Choose_CancelLinux $window $img $preview"
@@ -2210,9 +2210,8 @@
pack $lists $status $preview $settings $buttons -side top
- bind $devs.list <Button1-ButtonRelease> "::CAMGUI::FillChannelsLinux $devs.list $chans.list $status $devices"
- bind $chans.list <Button1-ButtonRelease> "::CAMGUI::StartPreviewLinux $devs.list $chans.list $status $preview $settings $devices"
-
+ bind $devs.list <Button1-ButtonRelease> "::CAMGUI::FillChannelsLinux $devs.list $chans.list $status [list $devices]"
+ bind $chans.list <Button1-ButtonRelease> "::CAMGUI::StartPreviewLinux $devs.list $chans.list $status $preview $settings [list $devices]"
foreach device $devices {
set dev [lindex $device 0]
@@ -2229,15 +2228,15 @@
}
proc FillChannelsLinux { device_w chan_w status devices } {
-
+
$chan_w delete 0 end
if { [$device_w curselection] == "" } {
$status configure -text "[trans choosedevice]"
return
}
+ variable dev
set dev [$device_w curselection]
-
set device [lindex $devices $dev]
set device [lindex $device 0]
@@ -2254,8 +2253,8 @@
}
- proc StartPreviewLinux { device_w chan_w status preview_w settings devices } {
-
+ proc StartPreviewLinux { device_w chan_w status preview_w settings devices} {
+ ##WARNING : [$device_w curselection] is always "" !!! That's why we use variable dev
# if { [$device_w curselection] == "" } {
# $status configure -text "Please choose a device"
# return
@@ -2270,14 +2269,13 @@
if {$img == "" } {
return
}
-
- set dev [$device_w curselection]
+
+ variable dev
set chan [$chan_w curselection]
set device [lindex $devices $dev]
set device [lindex $device 0]
-
if { [catch {set channels [::Capture::ListChannels $device]} res] } {
$status configure -text $res
return
@@ -2340,7 +2338,7 @@
}
proc Choose_OkLinux { w device_w chan_w img devices } {
-
+ ##WARNING : [$device_w curselection] is always "" !!! That's why we use variable dev
#if { [$device_w curselection] == "" } {
# ::CAMGUI::Choose_CancelLinux $w $img
# return
@@ -2350,16 +2348,12 @@
::CAMGUI::Choose_CancelLinux $w $img
return
}
-
- set dev [$device_w curselection]
+ variable dev
set chan [$chan_w curselection]
-
-
set device [lindex $devices $dev]
set device [lindex $device 0]
-
if { [catch {set channels [::Capture::ListChannels $device]} res] } {
::CAMGUI::Choose_CancelLinux $w $img
return