From 6f676af459e8774b272f41e1dea371938a3b2c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 1 Mar 2011 17:20:06 +0000 Subject: check for proper input from the kiosk.cfg svn path=/trunk/scripts/guiplugins/kiosk-plugin/; revision=14989 --- kiosk-plugin.tcl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kiosk-plugin.tcl b/kiosk-plugin.tcl index c8ace1c..cbedf59 100644 --- a/kiosk-plugin.tcl +++ b/kiosk-plugin.tcl @@ -42,8 +42,12 @@ proc ::kiosk::readconfig {{fname kiosk.cfg}} { } } while {![eof $fp]} { - set data [gets $fp] - set ::kiosk::config([lindex $data 0]) [lindex $data 1] + set data [gets $fp] + if { [string is list $data ] } { + if { [llength $data ] > 1 } { + set ::kiosk::config([lindex $data 0]) [lindex $data 1] + } + } } @@ -92,6 +96,7 @@ proc ::kiosk::makekiosk {mywin} { # remove all special key/mouse bindings from the window if { $::kiosk::config(Bindings) } { } { +puts "prevent bindigns" set mycnv [tkcanvas_name $mywin ] bindtags $mywin "" bindtags $mycnv "$mycnv" @@ -100,8 +105,6 @@ proc ::kiosk::makekiosk {mywin} { bind $mycnv {::pd_bindings::sendkey %W 0 %K %A 0} bind $mycnv {::pd_bindings::sendkey %W 1 %K %A 1} bind $mycnv {::pd_bindings::sendkey %W 0 %K %A 1} - -# TODO suppress Alt-F4 } } -- cgit v1.2.1