chiark / gitweb /
where-vessels: factor out make-smashers
[ypp-sc-tools.main.git] / yarrg / where-vessels
index 5541749086bd683a9cc515bb4bf70e6a4366e0fb..97e5e6c0801a2119395f30a954610afa95e895cf 100755 (executable)
@@ -547,6 +547,20 @@ proc make-radio-smasher {sma label variable descs rows inrow} {
     }
 }
 
+proc make-smashers {} {
+    make-radio-smasher subclass Subclass smash_subclass \
+       {Show Normal/LE Hide} 1 0
+
+    make-radio-smasher owner Owner smash_owner \
+       {Show Yours? {For you} Lock Hide} 2 3
+
+    global vc_codes vc_code2abbrev
+
+    set cw [make-smasher size "Size\nround down" frame]
+    populate-control-grid-tickboxes $cw 2 0 smash_size $vc_codes \
+       image val { return 0 } { return $vc_code2abbrev($val) }
+}
+
 #---------- filtering ----------
 
 set filters {}
@@ -1164,15 +1178,9 @@ proc widgets-setup {} {
     frame .islands -pady 2
     pack .cp .filter .islands .smash -side top
 
-    label .smash.title -text Smash
+    label .smash.title -text {Display/combine details}
     grid .smash.title -row 0 -column 0 -columnspan 2
 
-    make-radio-smasher subclass Subclass smash_subclass \
-       {Show Normal/LE Hide} 1 0
-
-    make-radio-smasher owner Owner smash_owner \
-       {Show Yours? {For you} Lock Hide} 2 3
-
     set filterstyle 1
     trace add variable filterstyle write filterstyle-changed
 
@@ -1355,6 +1363,7 @@ vesselclasses-init
 load-chart
 widgets-setup
 make-filters
+make-smashers
 
 set notes_data {}
 if {[catch { parse-clipboard } emsg]} {