<jar destfile="${jar.dir}/${ant.project.name}.jar"
basedir="${classes.dir}">
<fileset dir="${resources.dir}"/>
+
+ <!-- Include properties files. -->
+ <fileset dir="${src.dir}" includes="**/*.properties"/>
+
<!-- Include source by default. -->
<fileset dir="${src.dir}"/>
+
<manifest>
<attribute name="Main-Class" value="jexer.demos.Demo1"/>
<attribute name="Implementation-Version" value="${version}"/>
windowtitle="Jexer - Java Text User Interface - API docs">
<fileset dir="${src.dir}" defaultexcludes="yes">
- <include name="jexer/**"/>
+ <include name="jexer/**/*.java"/>
</fileset>
<doctitle>
0.0.6
-#18 Rework TApplication run loop:
- - Reduce thread spinlocks
- - Eliminate unnecessary screen redraws
- - No activity means no CPU usage
-
-- TSpinner
-- TComboBox
-- TCalendar
+- New widgets:
+ - TSpinner
+ - TComboBox
+ - TCalendar
- TEditor
- Horizontal scrollbar integration
import java.io.PrintWriter;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
+import java.text.MessageFormat;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.ResourceBundle;
import jexer.bits.CellAttributes;
import jexer.bits.ColorTheme;
*/
public class TApplication implements Runnable {
+ /**
+ * Translated strings.
+ */
+ private static final ResourceBundle i18n = ResourceBundle.getBundle(TApplication.class.getName());
+
// ------------------------------------------------------------------------
// Public constants -------------------------------------------------------
// ------------------------------------------------------------------------
* Display the about dialog.
*/
protected void showAboutDialog() {
- messageBox("About", "Jexer Version " +
- this.getClass().getPackage().getImplementationVersion(),
+ messageBox(i18n.getString("aboutDialogTitle"),
+ MessageFormat.format(i18n.getString("aboutDialogText"),
+ this.getClass().getPackage().getImplementationVersion()),
TMessageBox.Type.OK);
}
* Draw everything.
*/
private void drawAll() {
+ boolean menuIsActive = false;
+
if (debugThreads) {
System.err.printf("%d %s drawAll() enter\n",
System.currentTimeMillis(), Thread.currentThread());
CellAttributes menuColor;
CellAttributes menuMnemonicColor;
if (menu.isActive()) {
+ menuIsActive = true;
menuColor = theme.getColor("tmenu.highlighted");
menuMnemonicColor = theme.getColor("tmenu.mnemonic.highlighted");
topLevel = menu;
oldMouseY = mouseY;
// Place the cursor if it is visible
- TWidget activeWidget = null;
- if (sorted.size() > 0) {
- activeWidget = sorted.get(sorted.size() - 1).getActiveChild();
- if (activeWidget.isCursorVisible()) {
- if ((activeWidget.getCursorAbsoluteY() < desktopBottom)
- && (activeWidget.getCursorAbsoluteY() > desktopTop)
- ) {
- getScreen().putCursor(true,
- activeWidget.getCursorAbsoluteX(),
- activeWidget.getCursorAbsoluteY());
- cursor = true;
- } else {
- getScreen().putCursor(false,
- activeWidget.getCursorAbsoluteX(),
- activeWidget.getCursorAbsoluteY());
- cursor = false;
+ if (!menuIsActive) {
+ TWidget activeWidget = null;
+ if (sorted.size() > 0) {
+ activeWidget = sorted.get(sorted.size() - 1).getActiveChild();
+ if (activeWidget.isCursorVisible()) {
+ if ((activeWidget.getCursorAbsoluteY() < desktopBottom)
+ && (activeWidget.getCursorAbsoluteY() > desktopTop)
+ ) {
+ getScreen().putCursor(true,
+ activeWidget.getCursorAbsoluteX(),
+ activeWidget.getCursorAbsoluteY());
+ cursor = true;
+ } else {
+ getScreen().putCursor(false,
+ activeWidget.getCursorAbsoluteX(),
+ activeWidget.getCursorAbsoluteY());
+ cursor = false;
+ }
}
}
}
* @return the new menu
*/
public final TMenu addFileMenu() {
- TMenu fileMenu = addMenu("&File");
+ TMenu fileMenu = addMenu(i18n.getString("fileMenuTitle"));
fileMenu.addDefaultItem(TMenu.MID_OPEN_FILE);
fileMenu.addSeparator();
fileMenu.addDefaultItem(TMenu.MID_SHELL);
fileMenu.addDefaultItem(TMenu.MID_EXIT);
- TStatusBar statusBar = fileMenu.newStatusBar("File-management " +
- "commands (Open, Save, Print, etc.)");
- statusBar.addShortcutKeypress(kbF1, cmHelp, "Help");
+ TStatusBar statusBar = fileMenu.newStatusBar(i18n.
+ getString("fileMenuStatus"));
+ statusBar.addShortcutKeypress(kbF1, cmHelp, i18n.getString("Help"));
return fileMenu;
}
* @return the new menu
*/
public final TMenu addEditMenu() {
- TMenu editMenu = addMenu("&Edit");
+ TMenu editMenu = addMenu(i18n.getString("editMenuTitle"));
editMenu.addDefaultItem(TMenu.MID_CUT);
editMenu.addDefaultItem(TMenu.MID_COPY);
editMenu.addDefaultItem(TMenu.MID_PASTE);
editMenu.addDefaultItem(TMenu.MID_CLEAR);
- TStatusBar statusBar = editMenu.newStatusBar("Editor operations, " +
- "undo, and Clipboard access");
- statusBar.addShortcutKeypress(kbF1, cmHelp, "Help");
+ TStatusBar statusBar = editMenu.newStatusBar(i18n.
+ getString("editMenuStatus"));
+ statusBar.addShortcutKeypress(kbF1, cmHelp, i18n.getString("Help"));
return editMenu;
}
* @return the new menu
*/
public final TMenu addWindowMenu() {
- TMenu windowMenu = addMenu("&Window");
+ TMenu windowMenu = addMenu(i18n.getString("windowMenuTitle"));
windowMenu.addDefaultItem(TMenu.MID_TILE);
windowMenu.addDefaultItem(TMenu.MID_CASCADE);
windowMenu.addDefaultItem(TMenu.MID_CLOSE_ALL);
windowMenu.addDefaultItem(TMenu.MID_WINDOW_NEXT);
windowMenu.addDefaultItem(TMenu.MID_WINDOW_PREVIOUS);
windowMenu.addDefaultItem(TMenu.MID_WINDOW_CLOSE);
- TStatusBar statusBar = windowMenu.newStatusBar("Open, arrange, and " +
- "list windows");
- statusBar.addShortcutKeypress(kbF1, cmHelp, "Help");
+ TStatusBar statusBar = windowMenu.newStatusBar(i18n.
+ getString("windowMenuStatus"));
+ statusBar.addShortcutKeypress(kbF1, cmHelp, i18n.getString("Help"));
return windowMenu;
}
* @return the new menu
*/
public final TMenu addHelpMenu() {
- TMenu helpMenu = addMenu("&Help");
+ TMenu helpMenu = addMenu(i18n.getString("helpMenuTitle"));
helpMenu.addDefaultItem(TMenu.MID_HELP_CONTENTS);
helpMenu.addDefaultItem(TMenu.MID_HELP_INDEX);
helpMenu.addDefaultItem(TMenu.MID_HELP_SEARCH);
helpMenu.addDefaultItem(TMenu.MID_HELP_ACTIVE_FILE);
helpMenu.addSeparator();
helpMenu.addDefaultItem(TMenu.MID_ABOUT);
- TStatusBar statusBar = helpMenu.newStatusBar("Access online help");
- statusBar.addShortcutKeypress(kbF1, cmHelp, "Help");
+ TStatusBar statusBar = helpMenu.newStatusBar(i18n.
+ getString("helpMenuStatus"));
+ statusBar.addShortcutKeypress(kbF1, cmHelp, i18n.getString("Help"));
return helpMenu;
}
protected boolean onCommand(final TCommandEvent command) {
// Default: handle cmExit
if (command.equals(cmExit)) {
- if (messageBox("Confirmation", "Exit application?",
+ if (messageBox(i18n.getString("exitDialogTitle"),
+ i18n.getString("exitDialogText"),
TMessageBox.Type.YESNO).getResult() == TMessageBox.Result.YES) {
exit();
}
// Default: handle MID_EXIT
if (menu.getId() == TMenu.MID_EXIT) {
- if (messageBox("Confirmation", "Exit application?",
+ if (messageBox(i18n.getString("exitDialogTitle"),
+ i18n.getString("exitDialogText"),
TMessageBox.Type.YESNO).getResult() == TMessageBox.Result.YES) {
exit();
}
--- /dev/null
+Help=Help
+fileMenuTitle=&File
+fileMenuStatus=File-management commands (Open, Save, Print, etc.)
+editMenuTitle=&Edit
+editMenuStatus=Editor operations, undo, and Clipboard access
+windowMenuTitle=&Window
+windowMenuStatus=Open, arrange, and list windows
+helpMenuTitle=&Help
+helpMenuStatus=Access online help
+
+exitDialogTitle=Confirmation
+exitDialogText=Exit application?
+
+aboutDialogTitle=About
+aboutDialogText=Jexer Version {0}
*/
private TAction action;
- /**
- * The time at which dispatch() was called.
- */
- private long dispatchTime;
-
/**
* How long to animate dispatch of the event in millis.
*/
*/
public void dispatch() {
if (action != null) {
- long now = System.currentTimeMillis();
- if (now - dispatchTime > DISPATCH_TIME) {
- action.DO();
- dispatchTime = now;
- }
+ action.DO();
+ inButtonPress = false;
}
}
shadowColor.setForeColor(Color.BLACK);
shadowColor.setBold(false);
- long now = System.currentTimeMillis();
- boolean inDispatch = false;
- if (now - dispatchTime < DISPATCH_TIME) {
- inDispatch = true;
- }
-
if (!isEnabled()) {
buttonColor = getTheme().getColor("tbutton.disabled");
menuMnemonicColor = getTheme().getColor("tbutton.disabled");
menuMnemonicColor = getTheme().getColor("tbutton.mnemonic");
}
- if (inButtonPress || inDispatch) {
+ if (inButtonPress) {
getScreen().putCharXY(1, 0, ' ', buttonColor);
getScreen().putStringXY(2, 0, mnemonic.getRawLabel(), buttonColor);
getScreen().putCharXY(getWidth() - 1, 0, ' ', buttonColor);
GraphicsChars.CP437[0xDF], shadowColor);
}
if (mnemonic.getShortcutIdx() >= 0) {
- if (inButtonPress || inDispatch) {
+ if (inButtonPress) {
getScreen().putCharXY(2 + mnemonic.getShortcutIdx(), 0,
mnemonic.getShortcut(), menuMnemonicColor);
} else {
this.mouse = mouse;
if (inButtonPress && mouse.isMouse1()) {
- inButtonPress = false;
// Dispatch the event
dispatch();
}
package jexer;
import java.util.List;
+import java.util.ResourceBundle;
import jexer.bits.Color;
import jexer.bits.ColorTheme;
*/
public final class TEditColorThemeWindow extends TWindow {
+ /**
+ * Translated strings.
+ */
+ private static final ResourceBundle i18n = ResourceBundle.getBundle(TEditColorThemeWindow.class.getName());
+
/**
* The foreground color picker.
*/
attr.setForeColor(getTheme().getColor("tlabel").getForeColor());
attr.setBold(getTheme().getColor("tlabel").isBold());
}
- getScreen().putStringXY(1, 0, " Foreground ", attr);
+ getScreen().putStringXY(1, 0, i18n.getString("foregroundLabel"),
+ attr);
// Have to draw the colors manually because the int value matches
// SGR, not CGA.
attr.setForeColor(getTheme().getColor("tlabel").getForeColor());
attr.setBold(getTheme().getColor("tlabel").isBold());
}
- getScreen().putStringXY(1, 0, " Background ", attr);
+ getScreen().putStringXY(1, 0, i18n.getString("backgroundLabel"),
+ attr);
// Have to draw the colors manually because the int value matches
// SGR, not CGA.
public TEditColorThemeWindow(final TApplication application) {
// Register with the TApplication
- super(application, "Colors", 0, 0, 60, 18, MODAL);
+ super(application, i18n.getString("windowTitle"), 0, 0, 60, 18, MODAL);
// Initialize with the first color
List<String> colors = getTheme().getColorNames();
refreshFromTheme(colors.get(0));
colorNames.setSelectedIndex(0);
- addButton(" &OK ", getWidth() - 37, getHeight() - 4,
+ addButton(i18n.getString("okButton"), getWidth() - 37, getHeight() - 4,
new TAction() {
public void DO() {
ColorTheme global = getTheme();
}
);
- addButton("&Cancel", getWidth() - 25, getHeight() - 4,
+ addButton(i18n.getString("cancelButton"), getWidth() - 25,
+ getHeight() - 4,
new TAction() {
public void DO() {
getApplication().closeWindow(TEditColorThemeWindow.this);
activate(colorNames);
// Add shortcut text
- newStatusBar("Select Colors");
+ newStatusBar(i18n.getString("statusBar"));
}
/**
attr.setForeColor(getTheme().getColor("tlabel").getForeColor());
attr.setBold(getTheme().getColor("tlabel").isBold());
}
- getScreen().putStringXY(3, 2, "Color Name", attr);
+ getScreen().putStringXY(3, 2, i18n.getString("colorName"), attr);
// Draw the sample text box
attr.reset();
attr.setBold(foreground.bold);
attr.setBackColor(background.color);
getScreen().putStringXY(getWidth() - 17, getHeight() - 6,
- "Text Text Text", attr);
+ i18n.getString("textTextText"), attr);
getScreen().putStringXY(getWidth() - 17, getHeight() - 5,
- "Text Text Text", attr);
+ i18n.getString("textTextText"), attr);
}
/**
--- /dev/null
+foregroundLabel=\ Foreground\
+backgroundLabel=\ Background\
+windowTitle=Colors
+okButton=\ \ &OK\ \
+cancelButton=&Cancel
+statusBar=Select Colors
+colorName=Color Name
+textTextText=Text Text Text
import java.io.File;
import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.ResourceBundle;
import java.util.Scanner;
import jexer.TApplication;
*/
public class TEditorWindow extends TScrollableWindow {
+ /**
+ * Translated strings.
+ */
+ private static final ResourceBundle i18n = ResourceBundle.getBundle(TEditorWindow.class.getName());
+
/**
* Hang onto my TEditor so I can resize it with the window.
*/
setLeftValue(1);
setRightValue(editField.getMaximumColumnNumber());
- statusBar = newStatusBar("Editor");
- statusBar.addShortcutKeypress(kbF1, cmHelp, "Help");
- statusBar.addShortcutKeypress(kbF2, cmSave, "Save");
- statusBar.addShortcutKeypress(kbF3, cmOpen, "Open");
- statusBar.addShortcutKeypress(kbF10, cmMenu, "Menu");
+ statusBar = newStatusBar(i18n.getString("statusBar"));
+ statusBar.addShortcutKeypress(kbF1, cmHelp,
+ i18n.getString("statusBarHelp"));
+ statusBar.addShortcutKeypress(kbF2, cmSave,
+ i18n.getString("statusBarSave"));
+ statusBar.addShortcutKeypress(kbF3, cmOpen,
+ i18n.getString("statusBarOpen"));
+ statusBar.addShortcutKeypress(kbF10, cmMenu,
+ i18n.getString("statusBarMenu"));
}
/**
* @param parent the main application
*/
public TEditorWindow(final TApplication parent) {
- this(parent, "New Text Document");
+ this(parent, i18n.getString("newTextDocument"));
}
/**
String contents = readFileData(filename);
new TEditorWindow(getApplication(), filename, contents);
} catch (IOException e) {
- messageBox("Error", "Error reading file: " +
- e.getMessage());
+ messageBox(i18n.getString("errorDialogTitle"),
+ MessageFormat.format(i18n.
+ getString("errorReadingFile"), e.getMessage()));
}
}
} catch (IOException e) {
- messageBox("Error", "Error opening file dialog: " +
- e.getMessage());
+ messageBox(i18n.getString("errorDialogTitle"),
+ MessageFormat.format(i18n.
+ getString("errorOpeningFileDialog"), e.getMessage()));
}
return;
}
try {
editField.saveToFilename(filename);
} catch (IOException e) {
- messageBox("Error", "Error saving file: " + e.getMessage());
+ messageBox(i18n.getString("errorDialogTitle"),
+ MessageFormat.format(i18n.
+ getString("errorSavingFile"), e.getMessage()));
}
}
return;
--- /dev/null
+statusBar=Editor
+statusBarHelp=Help
+statusBarSave=Save
+statusBarOpen=Open
+statusBarMenu=Menu
+newTextDocument=New Text Document
+errorDialogTitle=Error
+errorReadingFile=Error reading file: {0}
+errorOpeningFileDialog=Error opening file dialog: {0}
+errorSavingFile=Error saving file: {0}
import java.io.File;
import java.io.IOException;
+import java.util.ResourceBundle;
import jexer.bits.GraphicsChars;
import jexer.event.TKeypressEvent;
*/
public final class TFileOpenBox extends TWindow {
+ /**
+ * Translated strings.
+ */
+ private static final ResourceBundle i18n = ResourceBundle.getBundle(TFileOpenBox.class.getName());
+
/**
* TFileOpenBox can be called for either Open or Save actions.
*/
String openLabel = "";
switch (type) {
case OPEN:
- openLabel = " &Open ";
- setTitle("Open File...");
+ openLabel = i18n.getString("openButton");
+ setTitle(i18n.getString("openTitle"));
break;
case SAVE:
- openLabel = " &Save ";
- setTitle("Save File...");
+ openLabel = i18n.getString("saveButton");
+ setTitle(i18n.getString("saveTitle"));
break;
default:
throw new IllegalArgumentException("Invalid type: " + type);
);
openButton.setEnabled(false);
- addButton("&Cancel", getWidth() - 12, 5,
+ addButton(i18n.getString("cancelButton"), getWidth() - 12, 5,
new TAction() {
public void DO() {
filename = null;
--- /dev/null
+openButton=\ &Open\
+openTitle=Open File...
+saveButton=\ &Save\
+saveTitle=Save File...
+cancelButton=&Cancel
import java.util.ArrayList;
import java.util.List;
+import java.util.ResourceBundle;
import jexer.event.TKeypressEvent;
import static jexer.TKeypress.*;
*/
public class TMessageBox extends TWindow {
+ /**
+ * Translated strings.
+ */
+ private static final ResourceBundle i18n = ResourceBundle.getBundle(TMessageBox.class.getName());
+
/**
* Message boxes have these supported types.
*/
setWidth(15);
}
buttonX = (getWidth() - 11) / 2;
- buttons.add(addButton(" &OK ", buttonX, lineI,
+ buttons.add(addButton(i18n.getString("okButton"), buttonX, lineI,
new TAction() {
public void DO() {
result = Result.OK;
setWidth(26);
}
buttonX = (getWidth() - 22) / 2;
- buttons.add(addButton(" &OK ", buttonX, lineI,
+ buttons.add(addButton(i18n.getString("okButton"), buttonX, lineI,
new TAction() {
public void DO() {
result = Result.OK;
)
);
buttonX += 8 + 4;
- buttons.add(addButton("&Cancel", buttonX, lineI,
+ buttons.add(addButton(i18n.getString("cancelButton"), buttonX, lineI,
new TAction() {
public void DO() {
result = Result.CANCEL;
setWidth(20);
}
buttonX = (getWidth() - 16) / 2;
- buttons.add(addButton("&Yes", buttonX, lineI,
+ buttons.add(addButton(i18n.getString("yesButton"), buttonX, lineI,
new TAction() {
public void DO() {
result = Result.YES;
)
);
buttonX += 5 + 4;
- buttons.add(addButton("&No", buttonX, lineI,
+ buttons.add(addButton(i18n.getString("noButton"), buttonX, lineI,
new TAction() {
public void DO() {
result = Result.NO;
setWidth(31);
}
buttonX = (getWidth() - 27) / 2;
- buttons.add(addButton("&Yes", buttonX, lineI,
+ buttons.add(addButton(i18n.getString("yesButton"), buttonX, lineI,
new TAction() {
public void DO() {
result = Result.YES;
)
);
buttonX += 5 + 4;
- buttons.add(addButton("&No", buttonX, lineI,
+ buttons.add(addButton(i18n.getString("noButton"), buttonX, lineI,
new TAction() {
public void DO() {
result = Result.NO;
)
);
buttonX += 4 + 4;
- buttons.add(addButton("&Cancel", buttonX, lineI,
+ buttons.add(addButton(i18n.getString("cancelButton"), buttonX,
+ lineI,
new TAction() {
public void DO() {
result = Result.CANCEL;
--- /dev/null
+okButton=\ \ &OK\ \
+cancelButton=&Cancel
+yesButton=&Yes
+noButton=&No
import java.io.IOException;
import java.lang.reflect.Field;
+import java.text.MessageFormat;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.ResourceBundle;
import jexer.bits.Cell;
import jexer.bits.CellAttributes;
public class TTerminalWindow extends TScrollableWindow
implements DisplayListener {
+
+ /**
+ * Translated strings.
+ */
+ private static final ResourceBundle i18n = ResourceBundle.getBundle(TTerminalWindow.class.getName());
+
/**
* The emulator.
*/
public TTerminalWindow(final TApplication application, final int x,
final int y, final int flags) {
- super(application, "Terminal", x, y, 80 + 2, 24 + 2, flags);
+ super(application, i18n.getString("windowTitle"), x, y,
+ 80 + 2, 24 + 2, flags);
vScroller = new TVScroller(this, getWidth() - 2, 0, getHeight() - 2);
setBottomValue(0);
emulator = new ECMA48(deviceType, shell.getInputStream(),
shell.getOutputStream(), this);
} catch (IOException e) {
- messageBox("Error", "Error launching shell: " + e.getMessage());
+ messageBox(i18n.getString("errorLaunchingShellTitle"),
+ MessageFormat.format(i18n.getString("errorLaunchingShellText"),
+ e.getMessage()));
}
// Setup the scroll bars
addShortcutKeys();
// Add shortcut text
- newStatusBar("Terminal session executing...");
+ newStatusBar(i18n.getString("statusBarRunning"));
}
/**
try {
int rc = shell.exitValue();
// The emulator exited on its own, all is fine
- setTitle(String.format("%s [Completed - %d]",
- getTitle(), rc));
+ setTitle(MessageFormat.format(i18n.
+ getString("windowTitleCompleted"), getTitle(), rc));
shell = null;
emulator.close();
clearShortcutKeypresses();
- statusBar.setText("Terminal session completed, exit " +
- "code " + rc + ".");
+ statusBar.setText(MessageFormat.format(i18n.
+ getString("statusBarCompleted"), rc));
} catch (IllegalThreadStateException e) {
// The emulator thread has exited, but the shell Process
// hasn't figured that out yet. Do nothing, we will see
try {
int rc = shell.exitValue();
// If we got here, the shell died.
- setTitle(String.format("%s [Completed - %d]",
- getTitle(), rc));
+ setTitle(MessageFormat.format(i18n.
+ getString("windowTitleCompleted"), getTitle(), rc));
shell = null;
emulator.close();
clearShortcutKeypresses();
- statusBar.setText("Terminal session completed, exit " +
- "code " + rc + ".");
+ statusBar.setText(MessageFormat.format(i18n.
+ getString("statusBarCompleted"), rc));
} catch (IllegalThreadStateException e) {
// The shell is still running, do nothing.
}
--- /dev/null
+windowTitle=Terminal
+errorLaunchingShellTitle=Error
+errorLaunchingShellText=Error launching shell: {0}
+statusBarRunning=Terminal session executing...
+windowTitleCompleted={0} [Completed - {1}]
+statusBarCompleted=Terminal session completed, exit code {0}.
*/
package jexer.menu;
+import java.util.ResourceBundle;
+
import jexer.TApplication;
import jexer.TKeypress;
import jexer.TWidget;
*/
public final class TMenu extends TWindow {
+ /**
+ * Translated strings.
+ */
+ private static final ResourceBundle i18n = ResourceBundle.getBundle(TMenu.class.getName());
+
/**
* If true, this is a sub-menu. Note package private access.
*/
switch (id) {
case MID_EXIT:
- label = "E&xit";
+ label = i18n.getString("menuExit");
key = kbAltX;
break;
case MID_SHELL:
- label = "O&S Shell";
+ label = i18n.getString("menuShell");
break;
case MID_OPEN_FILE:
- label = "&Open";
+ label = i18n.getString("menuOpen");
key = kbAltO;
break;
case MID_CUT:
- label = "Cu&t";
+ label = i18n.getString("menuCut");
key = kbCtrlX;
break;
case MID_COPY:
- label = "&Copy";
+ label = i18n.getString("menuCopy");
key = kbCtrlC;
break;
case MID_PASTE:
- label = "&Paste";
+ label = i18n.getString("menuPaste");
key = kbCtrlV;
break;
case MID_CLEAR:
- label = "C&lear";
+ label = i18n.getString("menuClear");
// key = kbDel;
break;
case MID_TILE:
- label = "&Tile";
+ label = i18n.getString("menuWindowTile");
break;
case MID_CASCADE:
- label = "C&ascade";
+ label = i18n.getString("menuWindowCascade");
break;
case MID_CLOSE_ALL:
- label = "Cl&ose All";
+ label = i18n.getString("menuWindowCloseAll");
break;
case MID_WINDOW_MOVE:
- label = "&Size/Move";
+ label = i18n.getString("menuWindowMove");
key = kbCtrlF5;
break;
case MID_WINDOW_ZOOM:
- label = "&Zoom";
+ label = i18n.getString("menuWindowZoom");
key = kbF5;
break;
case MID_WINDOW_NEXT:
- label = "&Next";
+ label = i18n.getString("menuWindowNext");
key = kbF6;
break;
case MID_WINDOW_PREVIOUS:
- label = "&Previous";
+ label = i18n.getString("menuWindowPrevious");
key = kbShiftF6;
break;
case MID_WINDOW_CLOSE:
- label = "&Close";
+ label = i18n.getString("menuWindowClose");
key = kbCtrlW;
break;
case MID_HELP_CONTENTS:
- label = "&Contents";
+ label = i18n.getString("menuHelpContents");
break;
case MID_HELP_INDEX:
- label = "&Index";
+ label = i18n.getString("menuHelpIndex");
key = kbShiftF1;
break;
case MID_HELP_SEARCH:
- label = "&Topic search";
+ label = i18n.getString("menuHelpSearch");
key = kbCtrlF1;
break;
case MID_HELP_PREVIOUS:
- label = "&Previous topic";
+ label = i18n.getString("menuHelpPrevious");
key = kbAltF1;
break;
case MID_HELP_HELP:
- label = "&Help on help";
+ label = i18n.getString("menuHelpHelp");
break;
case MID_HELP_ACTIVE_FILE:
- label = "Active &file...";
+ label = i18n.getString("menuHelpActive");
break;
case MID_ABOUT:
- label = "&About...";
+ label = i18n.getString("menuHelpAbout");
break;
default:
--- /dev/null
+menuExit=E&xit
+menuShell=O&S Shell
+menuOpen=&Open
+menuCut=Cu&t
+menuCopy=&Copy
+menuPaste=&Paste
+menuClear=C&lear
+menuWindowTile=&Tile
+menuWindowCascade=C&ascade
+menuWindowCloseAll=Cl&ose All
+menuWindowMove=&Size/Move
+menuWindowZoom=&Zoom
+menuWindowNext=&Next
+menuWindowPrevious=&Previous
+menuWindowClose=&Close
+menuHelpContents=&Contents
+menuHelpIndex=&Index
+menuHelpSearch=&Topic search
+menuHelpPrevious=&Previous topic
+menuHelpHelp=&Help on help
+menuHelpActive=Active &file...
+menuHelpAbout=&About...