cjk support wip
[fanfix.git] / src / jexer / menu / TMenu.java
index a92200de6077c598c767fb5b92969dca870215c4..58228f9900d1c311bf947be32410da6f0ea50427 100644 (file)
@@ -37,6 +37,7 @@ import jexer.TWindow;
 import jexer.bits.CellAttributes;
 import jexer.bits.GraphicsChars;
 import jexer.bits.MnemonicString;
+import jexer.bits.StringUtils;
 import jexer.event.TKeypressEvent;
 import jexer.event.TMouseEvent;
 import static jexer.TKeypress.*;
@@ -128,8 +129,9 @@ public class TMenu extends TWindow {
     public static final int MID_TABLE_INSERT_BELOW              = 107;
     public static final int MID_TABLE_COLUMN_NARROW             = 110;
     public static final int MID_TABLE_COLUMN_WIDEN              = 111;
-    public static final int MID_TABLE_FILE_SAVE_CSV             = 115;
-    public static final int MID_TABLE_FILE_SAVE_TEXT            = 116;
+    public static final int MID_TABLE_FILE_OPEN_CSV             = 115;
+    public static final int MID_TABLE_FILE_SAVE_CSV             = 116;
+    public static final int MID_TABLE_FILE_SAVE_TEXT            = 117;
 
     // ------------------------------------------------------------------------
     // Variables --------------------------------------------------------------
@@ -176,7 +178,7 @@ public class TMenu extends TWindow {
         assert (mnemonic.getShortcutIdx() >= 0);
 
         // Recompute width and height to reflect an empty menu
-        setWidth(getTitle().length() + 4);
+        setWidth(StringUtils.width(getTitle()) + 4);
         setHeight(2);
 
         setActive(false);
@@ -760,6 +762,9 @@ public class TMenu extends TWindow {
             label = i18n.getString("menuTableColumnWiden");
             key = kbShiftRight;
             break;
+        case MID_TABLE_FILE_OPEN_CSV:
+            label = i18n.getString("menuTableFileOpenCsv");
+            break;
         case MID_TABLE_FILE_SAVE_CSV:
             label = i18n.getString("menuTableFileSaveCsv");
             break;