Commit 6a0d5494 authored by Ivica Ico Bukvic's avatar Ivica Ico Bukvic
Browse files

fixed buggy selection of alternative audio devices

parent 336e0f74
......@@ -3246,9 +3246,6 @@ proc pdtk_canvas_ctrlkey {name key shift} {
if {$key == "4"} {menu_symbolatom $topname 1}
if {$key == "5"} {menu_comment $topname 1}
if {$key == "Return"} {menu_reselect $topname}
if {$shift == 1} {
if {$key == "E"} {menu_tooltips $topname}
}
}
if {$key == "slash"} {menu_audio 1}
if {$key == "period"} {menu_audio 0}
......@@ -3256,6 +3253,7 @@ proc pdtk_canvas_ctrlkey {name key shift} {
if {$key == "q" || $key == "Q"} {menu_really_quit}
if {$key == "l" || $key == "L"} {menu_clear_console}
if {$key == "r" || $key == "R"} {menu_toggle_console}
if {$key == "E"} {menu_tooltips $topname}
if {$key == "Return"} {pdtk_zoom_reset $topname}
if {!$ignore} {
if {$key == "w" || $key == "W"} {menu_really_close $topname}
......@@ -5768,17 +5766,11 @@ proc pdtk_audio_dialog {id indev1 indev2 indev3 indev4 \
match_linux_wm [list checkbutton $id.in1f.x0 -variable audio_inenable1 \
-text {input device 1 }]
if {[info tclversion] >= 8.5 && $pd_nt == 0} {
match_linux_wm [list ttk::combobox $id.in1f.x1 \
-state readonly \
-values $audio_indevlist]
$id.in1f.x1 current 0
} else {
button $id.in1f.x1 -text \
[lindex $audio_indevlist $audio_indev1] \
-command [list audio_popup $id $id.in1f.x1 \
audio_indev1 $audio_indevlist]
}
match_linux_wm [list button $id.in1f.x1 -text \
[lindex $audio_indevlist $audio_indev1] \
-command [list audio_popup $id $id.in1f.x1 \
audio_indev1 $audio_indevlist]]
match_linux_wm [list label $id.in1f.l2 -text "channels:"]
match_linux_wm [list entry $id.in1f.x2 -textvariable audio_inchan1 -width 3]
pack $id.in1f.x0 $id.in1f.x1 $id.in1f.l2 $id.in1f.x2 -side left -pady 3
......@@ -5790,17 +5782,12 @@ proc pdtk_audio_dialog {id indev1 indev2 indev3 indev4 \
match_linux_wm [list checkbutton $id.in2f.x0 -variable audio_inenable2 \
-text {input device 2 }]
if {[info tclversion] >= 8.5 && $pd_nt == 0} {
match_linux_wm [list ttk::combobox $id.in2f.x1 \
-state readonly \
-values $audio_indevlist]
$id.in2f.x1 current 1
} else {
button $id.in2f.x1 -text \
[lindex $audio_indevlist $audio_indev2] \
-command [list audio_popup $id $id.in2f.x1 \
audio_indev2 $audio_indevlist]
}
match_linux_wm [list button $id.in2f.x1 -text \
[lindex $audio_indevlist $audio_indev2] \
-command [list audio_popup $id $id.in2f.x1 \
audio_indev2 $audio_indevlist]]
match_linux_wm [list label $id.in2f.l2 -text "channels:"]
match_linux_wm [list entry $id.in2f.x2 -textvariable audio_inchan2 -width 3]
pack $id.in2f.x0 $id.in2f.x1 $id.in2f.l2 $id.in2f.x2 -side left -pady 3
......@@ -5813,17 +5800,12 @@ proc pdtk_audio_dialog {id indev1 indev2 indev3 indev4 \
match_linux_wm [list checkbutton $id.in3f.x0 -variable audio_inenable3 \
-text {input device 3 }]
if {[info tclversion] >= 8.5 && $pd_nt == 0} {
match_linux_wm [list ttk::combobox $id.in3f.x1 \
-state readonly \
-values $audio_indevlist]
$id.in3f.x1 current 2
} else {
button $id.in3f.x1 -text \
[lindex $audio_indevlist $audio_indev3] \
-command [list audio_popup $id $id.in3f.x1 \
audio_indev3 $audio_indevlist]
}
match_linux_wm [list button $id.in3f.x1 -text \
[lindex $audio_indevlist $audio_indev3] \
-command [list audio_popup $id $id.in3f.x1 \
audio_indev3 $audio_indevlist]]
match_linux_wm [list label $id.in3f.l2 -text "channels:"]
match_linux_wm [list entry $id.in3f.x2 -textvariable audio_inchan3 -width 3]
pack $id.in3f.x0 $id.in3f.x1 $id.in3f.l2 $id.in3f.x2 -side left -pady 3
......@@ -5836,17 +5818,12 @@ proc pdtk_audio_dialog {id indev1 indev2 indev3 indev4 \
match_linux_wm [list checkbutton $id.in4f.x0 -variable audio_inenable4 \
-text {input device 4 }]
if {[info tclversion] >= 8.5 && $pd_nt == 0} {
match_linux_wm [list ttk::combobox $id.in4f.x1 \
-state readonly \
-values $audio_indevlist]
$id.in4f.x1 current 3
} else {
button $id.in4f.x1 -text \
[lindex $audio_indevlist $audio_indev4] \
-command [list audio_popup $id $id.in4f.x1 \
audio_indev4 $audio_indevlist]
}
match_linux_wm [list button $id.in4f.x1 -text \
[lindex $audio_indevlist $audio_indev4] \
-command [list audio_popup $id $id.in4f.x1 \
audio_indev4 $audio_indevlist]]
match_linux_wm [list label $id.in4f.l2 -text "channels:"]
match_linux_wm [list entry $id.in4f.x2 -textvariable audio_inchan4 -width 3]
pack $id.in4f.x0 $id.in4f.x1 $id.in4f.l2 $id.in4f.x2 -side left -pady 3
......@@ -5861,18 +5838,11 @@ proc pdtk_audio_dialog {id indev1 indev2 indev3 indev4 \
if {$multi == 0} {
match_linux_wm [list label $id.out1f.l1 \
-text "(same as input device) ........................"]
} else {
if {[info tclversion] >= 8.5 && $pd_nt == 0} {
match_linux_wm [list ttk::combobox $id.out1f.x1 \
-state readonly \
-values $audio_outdevlist]
$id.out1f.x1 current 0
} else {
button $id.out1f.x1 -text \
[lindex $audio_outdevlist $audio_outdev1] \
-command [list audio_popup $id $id.out1f.x1 \
audio_outdev1 $audio_outdevlist]
}
} else {
match_linux_wm [list button $id.out1f.x1 -text \
[lindex $audio_outdevlist $audio_outdev1] \
-command [list audio_popup $id $id.out1f.x1 \
audio_outdev1 $audio_outdevlist]]
}
match_linux_wm [list label $id.out1f.l2 -text "channels:"]
match_linux_wm [list entry $id.out1f.x2 -textvariable audio_outchan1 -width 3]
......@@ -5890,17 +5860,11 @@ proc pdtk_audio_dialog {id indev1 indev2 indev3 indev4 \
match_linux_wm [list checkbutton $id.out2f.x0 -variable audio_outenable2 \
-text {output device 2}]
if {[info tclversion] >= 8.5 && $pd_nt == 0} {
match_linux_wm [list ttk::combobox $id.out2f.x1 \
-state readonly \
-values $audio_outdevlist]
$id.out2f.x1 current 1
} else {
button $id.out2f.x1 -text \
[lindex $audio_outdevlist $audio_outdev2] \
-command [list audio_popup $id $id.out2f.x1 \
audio_outdev2 $audio_outdevlist]
}
match_linux_wm [list button $id.out2f.x1 -text \
[lindex $audio_outdevlist $audio_outdev2] \
-command [list audio_popup $id $id.out2f.x1 \
audio_outdev2 $audio_outdevlist]]
match_linux_wm [list label $id.out2f.l2 -text "channels:"]
match_linux_wm [list entry $id.out2f.x2 -textvariable audio_outchan2 -width 3]
pack $id.out2f.x0 $id.out2f.x1 $id.out2f.l2 $id.out2f.x2 -side left -pady 3
......@@ -5913,17 +5877,12 @@ proc pdtk_audio_dialog {id indev1 indev2 indev3 indev4 \
match_linux_wm [list checkbutton $id.out3f.x0 -variable audio_outenable3 \
-text {output device 3}]
if {[info tclversion] >= 8.5 && $pd_nt == 0} {
match_linux_wm [list ttk::combobox $id.out3f.x1 \
-state readonly \
-values $audio_outdevlist]
$id.out3f.x1 current 2
} else {
button $id.out3f.x1 -text \
[lindex $audio_outdevlist $audio_outdev3] \
-command [list audio_popup $id $id.out3f.x1 \
audio_outdev3 $audio_outdevlist]
}
match_linux_wm [list button $id.out3f.x1 -text \
[lindex $audio_outdevlist $audio_outdev3] \
-command [list audio_popup $id $id.out3f.x1 \
audio_outdev3 $audio_outdevlist]]
match_linux_wm [list label $id.out3f.l2 -text "channels:"]
match_linux_wm [list entry $id.out3f.x2 -textvariable audio_outchan3 -width 3]
pack $id.out3f.x0 $id.out3f.x1 $id.out3f.l2 $id.out3f.x2 -side left -pady 3
......@@ -5936,17 +5895,12 @@ proc pdtk_audio_dialog {id indev1 indev2 indev3 indev4 \
match_linux_wm [list checkbutton $id.out4f.x0 -variable audio_outenable4 \
-text {output device 4}]
if {[info tclversion] >= 8.5 && $pd_nt == 0} {
match_linux_wm [list ttk::combobox $id.out4f.x1 \
-state readonly \
-values $audio_outdevlist]
$id.out4f.x1 current 3
} else {
button $id.out4f.x1 -text \
[lindex $audio_outdevlist $audio_outdev4] \
-command [list audio_popup $id $id.out4f.x1 \
audio_outdev4 $audio_outdevlist]
}
match_linux_wm [list button $id.out4f.x1 -text \
[lindex $audio_outdevlist $audio_outdev4] \
-command [list audio_popup $id $id.out4f.x1 \
audio_outdev4 $audio_outdevlist]]
match_linux_wm [list label $id.out4f.l2 -text "channels:"]
match_linux_wm [list entry $id.out4f.x2 -textvariable audio_outchan4 -width 3]
pack $id.out4f.x0 $id.out4f.x1 $id.out4f.l2 $id.out4f.x2 -side left -pady 3
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment