chiark / gitweb /
where-vessels: Tidy up ship size icon displays 6.3.3
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Mon, 14 Dec 2009 02:18:24 +0000 (02:18 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Mon, 14 Dec 2009 02:18:53 +0000 (02:18 +0000)
43 files changed:
yarrg/icons.ceb/ct.xbm [deleted file]
yarrg/icons.ceb/dh.xbm [deleted file]
yarrg/icons.ceb/gf.xbm [deleted file]
yarrg/icons.ceb/ls.xbm [deleted file]
yarrg/icons.ceb/mb.xbm [deleted file]
yarrg/icons.ceb/mg.xbm [deleted file]
yarrg/icons.ceb/sl.xbm [deleted file]
yarrg/icons.ceb/wb.xbm [deleted file]
yarrg/icons.ceb/wf.xbm [deleted file]
yarrg/icons.ceb/xe.xbm [deleted file]
yarrg/icons.iwj/bg.xbm [deleted file]
yarrg/icons.iwj/ct.xbm [deleted file]
yarrg/icons.iwj/dh.xbm [deleted file]
yarrg/icons.iwj/gf.xbm [deleted file]
yarrg/icons.iwj/ls.xbm [deleted file]
yarrg/icons.iwj/mb.xbm [deleted file]
yarrg/icons.iwj/sl.xbm [deleted file]
yarrg/icons.iwj/wb.xbm [deleted file]
yarrg/icons.iwj/wf.xbm [deleted file]
yarrg/icons.iwj/xe.xbm [deleted file]
yarrg/icons/battle.xbm [moved from yarrg/iconsdir/battle.xbm with 59% similarity]
yarrg/icons/bg.xbm [moved from yarrg/icons.ceb/bg.xbm with 100% similarity]
yarrg/icons/ct.xbm [moved from yarrg/iconsdir/ct.xbm with 100% similarity]
yarrg/icons/dh.xbm [moved from yarrg/iconsdir/dh.xbm with 100% similarity]
yarrg/icons/gf.xbm [moved from yarrg/iconsdir/gf.xbm with 100% similarity]
yarrg/icons/locked.xbm [moved from yarrg/iconsdir/locked.xbm with 100% similarity]
yarrg/icons/ls.xbm [moved from yarrg/iconsdir/ls.xbm with 100% similarity]
yarrg/icons/mb.xbm [moved from yarrg/iconsdir/mb.xbm with 100% similarity]
yarrg/icons/mg.xbm [moved from yarrg/icons.iwj/mg.xbm with 100% similarity]
yarrg/icons/ours.xbm [new file with mode: 0644]
yarrg/icons/query.xbm [new file with mode: 0644]
yarrg/icons/sl.xbm [moved from yarrg/iconsdir/sl.xbm with 100% similarity]
yarrg/icons/unlocked.xbm [moved from yarrg/iconsdir/unlocked.xbm with 61% similarity]
yarrg/icons/wb.xbm [moved from yarrg/iconsdir/wb.xbm with 100% similarity]
yarrg/icons/wf.xbm [moved from yarrg/iconsdir/wf.xbm with 100% similarity]
yarrg/icons/xe.xbm [moved from yarrg/iconsdir/xe.xbm with 100% similarity]
yarrg/iconsdir/backup/ct.xbm [deleted file]
yarrg/iconsdir/backup/ls.xbm [deleted file]
yarrg/iconsdir/backup/mb.xbm [deleted file]
yarrg/iconsdir/backup/mg.xbm [deleted file]
yarrg/iconsdir/bg.xbm [deleted file]
yarrg/iconsdir/mg.xbm [deleted file]
yarrg/where-vessels

diff --git a/yarrg/icons.ceb/ct.xbm b/yarrg/icons.ceb/ct.xbm
deleted file mode 100644 (file)
index 94f926a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define ct_width 12
-#define ct_height 10
-static unsigned char ct_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x05, 0x00, 0x09,
-   0xe0, 0x09, 0x20, 0x09, 0x20, 0x05, 0xe0, 0x03 };
diff --git a/yarrg/icons.ceb/dh.xbm b/yarrg/icons.ceb/dh.xbm
deleted file mode 100644 (file)
index 1536867..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define dh_width 12
-#define dh_height 10
-static unsigned char dh_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x18, 0x00, 0x28, 0x00,
-   0x48, 0x00, 0x88, 0x00, 0x08, 0x01, 0xf8, 0x03 };
diff --git a/yarrg/icons.ceb/gf.xbm b/yarrg/icons.ceb/gf.xbm
deleted file mode 100644 (file)
index a3d1f64..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define gf_width 12
-#define gf_height 10
-static unsigned char gf_bits[] = {
-   0x00, 0x00, 0x10, 0x00, 0x92, 0x00, 0x92, 0x00, 0x92, 0x00, 0x92, 0x04,
-   0x92, 0x04, 0x92, 0x04, 0x92, 0x04, 0xff, 0x0f };
diff --git a/yarrg/icons.ceb/ls.xbm b/yarrg/icons.ceb/ls.xbm
deleted file mode 100644 (file)
index 2b48fe4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define lg_width 12
-#define lg_height 10
-static unsigned char lg_bits[] = {
-   0xfe, 0x03, 0x54, 0x05, 0xa8, 0x0a, 0xa8, 0x0a, 0xa8, 0x0a, 0xa8, 0x0a,
-   0xa8, 0x0a, 0xa8, 0x0a, 0x54, 0x05, 0xfe, 0x03 };
diff --git a/yarrg/icons.ceb/mb.xbm b/yarrg/icons.ceb/mb.xbm
deleted file mode 100644 (file)
index 4f21353..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define mb_width 12
-#define mb_height 10
-static unsigned char mb_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x60, 0x03, 0xa0, 0x05, 0x20, 0x09,
-   0x3c, 0x09, 0x24, 0x09, 0xa4, 0x05, 0x7c, 0x03 };
diff --git a/yarrg/icons.ceb/mg.xbm b/yarrg/icons.ceb/mg.xbm
deleted file mode 100644 (file)
index 9238d43..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define mf_width 12
-#define mf_height 10
-static unsigned char mf_bits[] = {
-   0x20, 0x00, 0x60, 0x00, 0xa4, 0x02, 0x2c, 0x05, 0x34, 0x09, 0x24, 0x09,
-   0x24, 0x09, 0x27, 0x09, 0xb5, 0x0d, 0x6f, 0x07 };
diff --git a/yarrg/icons.ceb/sl.xbm b/yarrg/icons.ceb/sl.xbm
deleted file mode 100644 (file)
index d08f9cb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define sl_width 12
-#define sl_height 10
-static unsigned char sl_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
-   0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xff, 0x0f };
diff --git a/yarrg/icons.ceb/wb.xbm b/yarrg/icons.ceb/wb.xbm
deleted file mode 100644 (file)
index 11ddb0e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define wb_width 12
-#define wb_height 10
-static unsigned char wb_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01,
-   0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xff, 0x0f };
diff --git a/yarrg/icons.ceb/wf.xbm b/yarrg/icons.ceb/wf.xbm
deleted file mode 100644 (file)
index 4eadf62..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define wf_width 12
-#define wf_height 10
-static unsigned char wf_bits[] = {
-   0x00, 0x00, 0x20, 0x00, 0x22, 0x02, 0x22, 0x02, 0x22, 0x02, 0x22, 0x02,
-   0x22, 0x02, 0x22, 0x02, 0x22, 0x02, 0xff, 0x0f };
diff --git a/yarrg/icons.ceb/xe.xbm b/yarrg/icons.ceb/xe.xbm
deleted file mode 100644 (file)
index 1359144..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define xe_width 12
-#define xe_height 10
-static unsigned char xe_bits[] = {
-   0x44, 0x00, 0xcc, 0x00, 0x54, 0x01, 0x64, 0x02, 0x45, 0x04, 0x87, 0x0f,
-   0x05, 0x01, 0x09, 0x02, 0xf1, 0x07, 0x3f, 0x00 };
diff --git a/yarrg/icons.iwj/bg.xbm b/yarrg/icons.iwj/bg.xbm
deleted file mode 100644 (file)
index 583f3a1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define bg_width 12
-#define bg_height 10
-static unsigned char bg_bits[] = {
-   0x10, 0x00, 0x30, 0x00, 0x50, 0x00, 0x92, 0x00, 0x16, 0x01, 0x1a, 0x02,
-   0x12, 0x04, 0xe2, 0x0f, 0x42, 0x00, 0xfe, 0x00 };
diff --git a/yarrg/icons.iwj/ct.xbm b/yarrg/icons.iwj/ct.xbm
deleted file mode 100644 (file)
index 94f926a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define ct_width 12
-#define ct_height 10
-static unsigned char ct_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x05, 0x00, 0x09,
-   0xe0, 0x09, 0x20, 0x09, 0x20, 0x05, 0xe0, 0x03 };
diff --git a/yarrg/icons.iwj/dh.xbm b/yarrg/icons.iwj/dh.xbm
deleted file mode 100644 (file)
index 1536867..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define dh_width 12
-#define dh_height 10
-static unsigned char dh_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x18, 0x00, 0x28, 0x00,
-   0x48, 0x00, 0x88, 0x00, 0x08, 0x01, 0xf8, 0x03 };
diff --git a/yarrg/icons.iwj/gf.xbm b/yarrg/icons.iwj/gf.xbm
deleted file mode 100644 (file)
index a3d1f64..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define gf_width 12
-#define gf_height 10
-static unsigned char gf_bits[] = {
-   0x00, 0x00, 0x10, 0x00, 0x92, 0x00, 0x92, 0x00, 0x92, 0x00, 0x92, 0x04,
-   0x92, 0x04, 0x92, 0x04, 0x92, 0x04, 0xff, 0x0f };
diff --git a/yarrg/icons.iwj/ls.xbm b/yarrg/icons.iwj/ls.xbm
deleted file mode 100644 (file)
index 2b48fe4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define lg_width 12
-#define lg_height 10
-static unsigned char lg_bits[] = {
-   0xfe, 0x03, 0x54, 0x05, 0xa8, 0x0a, 0xa8, 0x0a, 0xa8, 0x0a, 0xa8, 0x0a,
-   0xa8, 0x0a, 0xa8, 0x0a, 0x54, 0x05, 0xfe, 0x03 };
diff --git a/yarrg/icons.iwj/mb.xbm b/yarrg/icons.iwj/mb.xbm
deleted file mode 100644 (file)
index fdc07cf..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define mb_width 12
-#define mb_height 10
-static unsigned char mb_bits[] = {
-   0x00, 0x00, 0x90, 0x00, 0xb0, 0x01, 0xd0, 0x02, 0x98, 0x04, 0x94, 0x04,
-   0xd2, 0x02, 0xbe, 0x01, 0x90, 0x00, 0xfe, 0x07};
diff --git a/yarrg/icons.iwj/sl.xbm b/yarrg/icons.iwj/sl.xbm
deleted file mode 100644 (file)
index 2c7a4f2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define sl_width 12
-#define sl_height 10
-static unsigned char sl_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01,
-   0x10, 0x01, 0xf0, 0x01, 0x40, 0x00, 0xf8, 0x03};
diff --git a/yarrg/icons.iwj/wb.xbm b/yarrg/icons.iwj/wb.xbm
deleted file mode 100644 (file)
index 8de4857..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define wb_width 12
-#define wb_height 10
-static unsigned char wb_bits[] = {
-   0x00, 0x00, 0xfc, 0x03, 0x24, 0x02, 0x24, 0x02, 0x24, 0x02, 0x24, 0x02,
-   0x24, 0x02, 0xfc, 0x03, 0x90, 0x00, 0xfe, 0x07};
diff --git a/yarrg/icons.iwj/wf.xbm b/yarrg/icons.iwj/wf.xbm
deleted file mode 100644 (file)
index 69b6ba1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define wf_width 12
-#define wf_height 10
-static unsigned char wf_bits[] = {
-   0xf8, 0x00, 0xce, 0x07, 0x4a, 0x04, 0x4a, 0x04, 0x4a, 0x04, 0x4a, 0x04,
-   0x4a, 0x04, 0xfe, 0x07, 0x28, 0x01, 0xff, 0x0f};
diff --git a/yarrg/icons.iwj/xe.xbm b/yarrg/icons.iwj/xe.xbm
deleted file mode 100644 (file)
index d3f5f32..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define xe_width 12
-#define xe_height 10
-static unsigned char xe_bits[] = {
-   0x00, 0x00, 0x48, 0x00, 0x5a, 0x00, 0xee, 0x00, 0x4a, 0x01, 0x4a, 0x02,
-   0x4a, 0x04, 0xfe, 0x0f, 0x24, 0x01, 0xff, 0x0f};
similarity index 59%
rename from yarrg/iconsdir/battle.xbm
rename to yarrg/icons/battle.xbm
index 34a70eeef8b25283e16cf2ec7534a421c96caa78..c9b20cc6443661d7e26426775164418e66aa4833 100644 (file)
@@ -1,4 +1,4 @@
 #define battle_width 5
 #define battle_height 9
 static unsigned char battle_bits[] = {
 #define battle_width 5
 #define battle_height 9
 static unsigned char battle_bits[] = {
-   0x0e, 0x0e, 0x0e, 0x04, 0x11, 0x0a, 0x04, 0x0a, 0x11};
+   0x0e, 0x0a, 0x0e, 0x04, 0x11, 0x0a, 0x04, 0x0a, 0x11};
similarity index 100%
rename from yarrg/icons.ceb/bg.xbm
rename to yarrg/icons/bg.xbm
similarity index 100%
rename from yarrg/iconsdir/ct.xbm
rename to yarrg/icons/ct.xbm
similarity index 100%
rename from yarrg/iconsdir/dh.xbm
rename to yarrg/icons/dh.xbm
similarity index 100%
rename from yarrg/iconsdir/gf.xbm
rename to yarrg/icons/gf.xbm
similarity index 100%
rename from yarrg/iconsdir/ls.xbm
rename to yarrg/icons/ls.xbm
similarity index 100%
rename from yarrg/iconsdir/mb.xbm
rename to yarrg/icons/mb.xbm
similarity index 100%
rename from yarrg/icons.iwj/mg.xbm
rename to yarrg/icons/mg.xbm
diff --git a/yarrg/icons/ours.xbm b/yarrg/icons/ours.xbm
new file mode 100644 (file)
index 0000000..6471fca
--- /dev/null
@@ -0,0 +1,4 @@
+#define ours_width 5
+#define ours_height 9
+static unsigned char ours_bits[] = {
+   0x07, 0x04, 0x07, 0x04, 0x04, 0x0e, 0x11, 0x11, 0x0e};
diff --git a/yarrg/icons/query.xbm b/yarrg/icons/query.xbm
new file mode 100644 (file)
index 0000000..1281460
--- /dev/null
@@ -0,0 +1,4 @@
+#define no-owner_width 5
+#define no-owner_height 9
+static unsigned char no-owner_bits[] = {
+   0x0e, 0x11, 0x10, 0x10, 0x08, 0x04, 0x04, 0x00, 0x04};
similarity index 100%
rename from yarrg/iconsdir/sl.xbm
rename to yarrg/icons/sl.xbm
similarity index 61%
rename from yarrg/iconsdir/unlocked.xbm
rename to yarrg/icons/unlocked.xbm
index 545fc0bd100de2665112d16884deb483eb99c7b0..b98cc0714b1b18d14e3eefded10a0ffc04b5ac87 100644 (file)
@@ -1,4 +1,4 @@
 #define unlocked_width 5
 #define unlocked_height 9
 static unsigned char unlocked_bits[] = {
 #define unlocked_width 5
 #define unlocked_height 9
 static unsigned char unlocked_bits[] = {
-   0x00, 0x02, 0x05, 0x05, 0x04, 0x1c, 0x1c, 0x14, 0x1c};
+   0x06, 0x09, 0x10, 0x10, 0x08, 0x1f, 0x11, 0x11, 0x1f};
similarity index 100%
rename from yarrg/iconsdir/wb.xbm
rename to yarrg/icons/wb.xbm
similarity index 100%
rename from yarrg/iconsdir/wf.xbm
rename to yarrg/icons/wf.xbm
similarity index 100%
rename from yarrg/iconsdir/xe.xbm
rename to yarrg/icons/xe.xbm
diff --git a/yarrg/iconsdir/backup/ct.xbm b/yarrg/iconsdir/backup/ct.xbm
deleted file mode 100644 (file)
index 9e0256b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define ct_width 12
-#define ct_height 10
-static unsigned char ct_bits[] = {
-   0x00, 0x00, 0x20, 0x00, 0x60, 0x00, 0xa0, 0x00, 0x60, 0x01, 0xb8, 0x01,
-   0x68, 0x01, 0xb8, 0x00, 0x60, 0x00, 0x00, 0x00};
diff --git a/yarrg/iconsdir/backup/ls.xbm b/yarrg/iconsdir/backup/ls.xbm
deleted file mode 100644 (file)
index ba462f0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define ls_width 12
-#define ls_height 10
-static unsigned char ls_bits[] = {
-   0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x54, 0x05, 0xa8, 0x0a, 0xa8, 0x0a,
-   0xa8, 0x0a, 0x54, 0x05, 0xfe, 0x03, 0x00, 0x00};
diff --git a/yarrg/iconsdir/backup/mb.xbm b/yarrg/iconsdir/backup/mb.xbm
deleted file mode 100644 (file)
index 4873d27..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define mb_width 12
-#define mb_height 10
-static unsigned char mb_bits[] = {
-   0x00, 0x00, 0x40, 0x00, 0xc8, 0x00, 0x58, 0x01, 0xe8, 0x02, 0x4e, 0x03,
-   0xca, 0x02, 0x6e, 0x01, 0xd8, 0x00, 0x00, 0x00};
diff --git a/yarrg/iconsdir/backup/mg.xbm b/yarrg/iconsdir/backup/mg.xbm
deleted file mode 100644 (file)
index 5e3afeb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define mg_width 12
-#define mg_height 10
-static unsigned char mg_bits[] = {
-   0x20, 0x00, 0x60, 0x00, 0xa4, 0x02, 0x6c, 0x05, 0xb4, 0x09, 0x64, 0x09,
-   0xa7, 0x09, 0x65, 0x09, 0xb7, 0x0d, 0x6c, 0x07};
diff --git a/yarrg/iconsdir/bg.xbm b/yarrg/iconsdir/bg.xbm
deleted file mode 100644 (file)
index 583f3a1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define bg_width 12
-#define bg_height 10
-static unsigned char bg_bits[] = {
-   0x10, 0x00, 0x30, 0x00, 0x50, 0x00, 0x92, 0x00, 0x16, 0x01, 0x1a, 0x02,
-   0x12, 0x04, 0xe2, 0x0f, 0x42, 0x00, 0xfe, 0x00 };
diff --git a/yarrg/iconsdir/mg.xbm b/yarrg/iconsdir/mg.xbm
deleted file mode 100644 (file)
index e4c457d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#define mf_width 12
-#define mf_height 10
-static unsigned char mf_bits[] = {
-   0x20, 0x00, 0x68, 0x01, 0xb8, 0x03, 0x28, 0x05, 0x2c, 0x09, 0x2a, 0x09,
-   0xb9, 0x05, 0x6f, 0x03, 0x28, 0x01, 0xff, 0x0f};
index adf76eb4d23af50e9ed0102106638aaa46c2aba0..ec4394b1e2aaef66b8b10c0fc1ecab1e6caa521e 100755 (executable)
@@ -193,15 +193,6 @@ proc note-info {lno vid name island description} {
     lappend note_infos [list $lno $vid $name $island $description]
 }
 
     lappend note_infos [list $lno $vid $name $island $description]
 }
 
-proc canvas-horiz-stack {xvar y type args} {
-    upvar 1 $xvar x
-    global canvas
-    set id [eval $canvas create $type $x $y $args]
-    set bbox [$canvas bbox $id]
-    set x [lindex $bbox 2]
-    return $id
-}
-
 proc display-note-infos {} {
     global note_infos note_missings notes
 
 proc display-note-infos {} {
     global note_infos note_missings notes
 
@@ -273,7 +264,7 @@ proc vesselclasses-init {} {
        set vc_game2code($game) $code
        set vc_code2abbrev($code) $abbrev
        set vc_code2full($code) $full
        set vc_game2code($game) $code
        set vc_code2abbrev($code) $abbrev
        set vc_code2full($code) $full
-       image create bitmap ship-icon/$abbrev -file iconsdir/$abbrev.xbm
+       image create bitmap ship-icon/$abbrev -file icons/$abbrev.xbm
     }
 }
 
     }
 }
 
@@ -283,20 +274,50 @@ proc code2abbrev-lock {lockown} {
     append abbrev [lindex {= - ?} [regsub {\D} $notown 2]]
 }    
 
     append abbrev [lindex {= - ?} [regsub {\D} $notown 2]]
 }    
 
-proc code2abbrev {code} {
+proc canvas-horiz-stack {xvar y bind type args} {
+    upvar 1 $xvar x
+    upvar 1 canvas canvas
+    set id [eval $canvas create $type $x $y $args]
+    set bbox [$canvas bbox $id]
+    set x [lindex $bbox 2]
+    $canvas bind $id <ButtonPress> $bind
+    return $id
+}
+
+proc code2canvas {code canvas x yvar qty qtylen bind} {
     global vc_code2abbrev
     global vc_code2abbrev
+    upvar 1 $yvar y
 
     manyset [split $code _] inport class subclass lockown xabbrev
 
 
     manyset [split $code _] inport class subclass lockown xabbrev
 
-    set abbrev {}
-    append abbrev [lindex {? {}} $inport]
-    append abbrev $vc_code2abbrev($class)
-    append abbrev $subclass
-    append abbrev [code2abbrev-lock $lockown]
-    append abbrev $xabbrev
+    set stackx $x
+    incr stackx 2
+
+    append qty [lindex {? {}} $inport]
+    set qty [format "%${qtylen}s" $qty]
+
+    set qtyid [canvas-horiz-stack stackx $y $bind \
+                  text -anchor nw -font fixed -text $qty]
 
 
-    debug "CODE2ABBREV $code $abbrev"
-    return $abbrev
+    incr stackx -1
+    canvas-horiz-stack stackx [expr {$y+2}] $bind \
+           image -anchor nw -image ship-icon/$vc_code2abbrev($class)
+    incr stackx
+
+    canvas-horiz-stack stackx $y $bind \
+       text -anchor nw -font fixed -text \
+       "$subclass[code2abbrev-lock $lockown]$xabbrev"
+
+    set bbox [$canvas bbox $qtyid]
+    set ny [lindex $bbox 3]
+    set bid [$canvas create rectangle \
+                $x $y $stackx $ny \
+                -fill white]
+
+    set y $ny
+    $canvas lower $bid $qtyid
+
+    $canvas bind $bid <ButtonPress> $bind
 }
 
 proc show-report-decode {code} {
 }
 
 proc show-report-decode {code} {
@@ -338,7 +359,10 @@ proc show-report-decode {code} {
 set filters {}
 
 proc filter-values/size {} { global vc_codes; return $vc_codes }
 set filters {}
 
 proc filter-values/size {} { global vc_codes; return $vc_codes }
-proc filter-map/size {code} { upvar #0 vc_code2abbrev($code) abb; return $abb }
+proc filter-icon/size {code} {
+    upvar #0 vc_code2abbrev($code) abb
+    return ship-icon/$abb
+}
 proc filter-default/size {code} { return 1 }
 proc filter-says-yes/size {codel} {
     set sizecode [lindex $codel 1]
 proc filter-default/size {code} { return 1 }
 proc filter-says-yes/size {codel} {
     set sizecode [lindex $codel 1]
@@ -398,13 +422,17 @@ proc make-tickbox-filter {fil label rows inrow} {
     if {!$inrow} {
        set inrow [expr {($nvalues + $rows) / $rows}]
     }
     if {!$inrow} {
        set inrow [expr {($nvalues + $rows) / $rows}]
     }
-
+    set noicons [catch { info args filter-icon/$fil }]
     for {set ix 0} {$ix < $nvalues} {incr ix} {
        set val [lindex $values $ix]
        set vars($val) [filter-default/$fil $val]
        checkbutton $fw.$ix -variable filter_${fil}($val) \
     for {set ix 0} {$ix < $nvalues} {incr ix} {
        set val [lindex $values $ix]
        set vars($val) [filter-default/$fil $val]
        checkbutton $fw.$ix -variable filter_${fil}($val) \
-           -text [filter-map/$fil $val] -font fixed \
-           -command redraw-needed
+           -font fixed -command redraw-needed
+       if {!$noicons} {
+           $fw.$ix configure -image [filter-icon/$fil $val] -height 16
+       } else {
+           $fw.$ix configure -text [filter-map/$fil $val]
+       }
        grid configure $fw.$ix -sticky sw \
            -row [expr {$ix / $inrow}] \
            -column [expr {$ix % $inrow}]
        grid configure $fw.$ix -sticky sw \
            -row [expr {$ix / $inrow}] \
            -column [expr {$ix % $inrow}]
@@ -657,7 +685,6 @@ proc redraw-needed {} {
 
 proc draw {} {
     global chart found isleloc canvas redraw_after
 
 proc draw {} {
     global chart found isleloc canvas redraw_after
-    global vc_code2abbrev
 
     catch { after cancel $redraw_after }
     catch { unset redraw_after }
 
     catch { after cancel $redraw_after }
     catch { unset redraw_after }
@@ -678,8 +705,6 @@ proc draw {} {
 
        if {![filters-say-yes $code]} continue
 
 
        if {![filters-say-yes $code]} continue
 
-       set abbrev [code2abbrev $code]
-       
        if {[string compare $lastislandname $islandname]} {
                manyset $isleloc($islandname) x y
                set x [coord $x]
        if {[string compare $lastislandname $islandname]} {
                manyset $isleloc($islandname) x y
                set x [coord $x]
@@ -687,40 +712,10 @@ proc draw {} {
                set lastislandname $islandname
 #              debug "START Y $y"
        }
                set lastislandname $islandname
 #              debug "START Y $y"
        }
-       set text $abbrev
-       regsub -all {[0-9]} $text {} text
-       if {$c > 1} {
-           set qty [format "%2d" $c]
-       } else {
-           set qty [format "  " $c]
-       }
 
 
-       regsub {[a-z][a-z]} $text {} text
-
-       set stackx $x
-       incr stackx 2
-       set tid [canvas-horiz-stack stackx $y \
-                text -anchor nw -font fixed -text $qty]
-       incr stackx -1
-       canvas-horiz-stack stackx [expr {$y+2}] \
-           image -anchor nw -image ship-icon/$vc_code2abbrev([lindex [split $code _] 1])
-       incr stackx
-       canvas-horiz-stack stackx $y \
-           text -anchor nw -font fixed -text $text
-               
-       set bbox [$canvas bbox $tid]
-       set ny [lindex $bbox 3]
-       puts "$tid $bbox"
-       set bid [$canvas create rectangle \
-                    $x $y $stackx $ny \
-                    -fill white]
-
-       set y $ny
-       $canvas lower $bid $tid
-
-       $canvas bind $tid <ButtonPress> [list show-report $islandname $code]
-       $canvas bind $bid <ButtonPress> [list show-report $islandname $code]
-       manyset $bbox dummy dummy dummy y
+       if {$c > 1} { set qty [format %d $c] } else { set qty {} }
+       code2canvas $code $canvas $x y $qty 2 \
+           [list show-report $islandname $code]
 #      debug "NEW Y $y"
     }
 
 #      debug "NEW Y $y"
     }
 
@@ -929,14 +924,7 @@ proc widgets-setup {} {
 
     label .cp.report.island -text { }
 
 
     label .cp.report.island -text { }
 
-    frame .cp.report.abbrev -background black
-    glset report_abbrev {         }
-    entry .cp.report.abbrev.abbrev -state readonly \
-       -textvariable report_abbrev \
-       -borderwidth 0 -relief flat -width 0 \
-       -highlightbackground white \
-       -readonlybackground white -foreground black
-    pack .cp.report.abbrev.abbrev -side left -padx 1 -pady 1
+    canvas .cp.report.abbrev -width 1 -height 15
 
     frame .cp.report.code
     label .cp.report.code.lab -text Code:
 
     frame .cp.report.code
     label .cp.report.code.lab -text Code:
@@ -962,9 +950,14 @@ proc report-set {sw val} { .cp.report.details.$sw configure -text $val }
 
 proc show-report {islandname code} {
     .cp.report.island configure -text $islandname
 
 proc show-report {islandname code} {
     .cp.report.island configure -text $islandname
-    glset report_code $code
-    glset report_abbrev [code2abbrev $code]
 
 
+    .cp.report.abbrev delete all
+    set y 2
+    code2canvas $code .cp.report.abbrev 5 y {} 0 {}
+    manyset [.cp.report.abbrev bbox all] minx dummy maxx dummy
+    .cp.report.abbrev configure -width [expr {$maxx-$minx+4}]
+
+    glset report_code $code
     show-report-decode $code
 
     set kk "$islandname $code"
     show-report-decode $code
 
     set kk "$islandname $code"