chiark / gitweb /
where-vessels: --debug implies a command loop
[ypp-sc-tools.main.git] / yarrg / where-vessels
index 57ab56a51a77d9a16971b584f5900532629112d7..5541749086bd683a9cc515bb4bf70e6a4366e0fb 100755 (executable)
@@ -536,13 +536,14 @@ proc make-smasher {sma label ekind} {
     return [make-control .smash $sma $label $ekind]
 }
 
-proc make-radio-smasher {sma label variable descs} {
+proc make-radio-smasher {sma label variable descs rows inrow} {
     set w [make-smasher $sma $label frame]
+    begin-control-grid $w [llength $descs] $rows $inrow
     for {set i 0} {$i < [llength $descs]} {incr i} {
-       radiobutton $w.v$i \
+       make-control-grid-entry $w ix $i \
+           radiobutton \
            -variable $variable -value $i -command redraw-needed \
            -text [lindex $descs $i]
-       pack $w.v$i -side left
     }
 }
 
@@ -1144,7 +1145,7 @@ proc islandnames-handler {offset maxchars} {
 proc widgets-setup {} {
     global canvas debug pirate ocean filterstyle
 
-    wm geometry . 1024x600
+    wm geometry . 1200x800
     wm title . "where-vessels - $pirate on the $ocean ocean"
 
     #----- map -----
@@ -1167,10 +1168,10 @@ proc widgets-setup {} {
     grid .smash.title -row 0 -column 0 -columnspan 2
 
     make-radio-smasher subclass Subclass smash_subclass \
-       {Show Normal/LE Hide}
+       {Show Normal/LE Hide} 1 0
 
     make-radio-smasher owner Owner smash_owner \
-       {Show Yours? You Lock Hide}
+       {Show Yours? {For you} Lock Hide} 2 3
 
     set filterstyle 1
     trace add variable filterstyle write filterstyle-changed
@@ -1364,4 +1365,11 @@ after idle invoke_notes
 
 draw
 
+if {$debug} {
+    package require Tclx
+    commandloop -async \
+       -prompt1 { return "where-vessels% " } \
+       -prompt2 { return "> " }
+}
+
 # rsync -r --exclude=\*~ yarrg/icons/. ijackson@chiark.greenend.org.uk:/home/ftp/users/ijackson/yarrg/vessel-info/.