chiark / gitweb /
where-vessels: factor out make-smashers
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 8 Aug 2010 16:04:15 +0000 (17:04 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 8 Aug 2010 19:59:56 +0000 (20:59 +0100)
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]} {