From 2499a02f2f59c52ad611d93487136b1b9173af2b Mon Sep 17 00:00:00 2001 From: Daniel Richard G Date: Fri, 20 Sep 2013 14:16:38 -0400 Subject: [PATCH] Minor changes to GraphicsWindow::menu[] * Added a comment header identifying the columns * Added Ctrl-Q accelerator for "Exit", as this is standard * Replaced a Latin-1 "degree" character with an octal escape, to avoid source-file encoding issues * Undefine (some of) the convenience macros used to define the table (the method aliases are numerous and unlikely to collide with anything) --- graphicswin.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/graphicswin.cpp b/graphicswin.cpp index f49843f..c93f6a2 100644 --- a/graphicswin.cpp +++ b/graphicswin.cpp @@ -21,6 +21,8 @@ #define C CTRL_MASK #define F(k) (FUNCTION_KEY_BASE+(k)) const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = { +//level +// label id accel fn { 0, "&File", 0, 0, NULL }, { 1, "&New\tCtrl+N", MNU_NEW, 'N'|C, mFile }, { 1, "&Open...\tCtrl+O", MNU_OPEN, 'O'|C, mFile }, @@ -35,7 +37,7 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = { { 1, "Export Triangle &Mesh...", MNU_EXPORT_MESH, 0, mFile }, { 1, "Export &Surfaces...", MNU_EXPORT_SURFACES,0, mFile }, { 1, NULL, 0, 0, NULL }, -{ 1, "E&xit", MNU_EXIT, 0, mFile }, +{ 1, "E&xit\tCtrl+Q", MNU_EXIT, 'Q'|C, mFile }, { 0, "&Edit", 0, 0, NULL }, { 1, "&Undo\tCtrl+Z", MNU_UNDO, 'Z'|C, mEdit }, @@ -43,7 +45,7 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = { { 1, "Re&generate All\tSpace", MNU_REGEN_ALL, ' ', mEdit }, { 1, NULL, 0, 0, NULL }, { 1, "Snap Selection to &Grid\t.", MNU_SNAP_TO_GRID, '.', mEdit }, -{ 1, "Rotate Imported &90°\t9", MNU_ROTATE_90, '9', mEdit }, +{ 1, "Rotate Imported &90\260\t9", MNU_ROTATE_90, '9', mEdit }, { 1, NULL, 0, 0, NULL }, { 1, "Cu&t\tCtrl+X", MNU_CUT, 'X'|C, mClip }, { 1, "&Copy\tCtrl+C", MNU_COPY, 'C'|C, mClip }, @@ -145,6 +147,12 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = { { -1 }, }; +#undef DEL +#undef ESC +#undef S +#undef C +#undef F + void GraphicsWindow::Init(void) { memset(this, 0, sizeof(*this));