From 655f9c7c4e9f47b50f9c5154aa72fa294c2b01bd Mon Sep 17 00:00:00 2001 From: David Howland Date: Thu, 15 Mar 2018 17:46:57 -0400 Subject: [PATCH 1/4] Fix wxID_SAVEAS label to meet design guidelines This bug was introduced way back in Aug 2011 by 73d1308b85df21aa1d69b74a37c4f88c53fe661f This fixes the code to match the exsiting documentation in docs/doxygen/mainpages/const_stockitems.h --- src/common/stockitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/stockitem.cpp b/src/common/stockitem.cpp index 900a77eb84..763a403d87 100644 --- a/src/common/stockitem.cpp +++ b/src/common/stockitem.cpp @@ -188,7 +188,7 @@ wxString wxGetStockLabel(wxWindowID id, long flags) STOCKITEM(wxID_REPLACE, _("Rep&lace"), _("Replace")); STOCKITEM(wxID_REVERT_TO_SAVED, _("Revert to Saved"), _("Revert to Saved")); STOCKITEM(wxID_SAVE, _("&Save"), _("Save")); - STOCKITEM(wxID_SAVEAS, _("&Save as"), _("Save as")); + STOCKITEM(wxID_SAVEAS, _("Save &as..."), _("Save as...")); STOCKITEM(wxID_SELECTALL, _("Select &All"), _("Select All")); STOCKITEM(wxID_SELECT_COLOR, _("&Color"), _("Color")); STOCKITEM(wxID_SELECT_FONT, _("&Font"), _("Font")); From e733c5ce75db5a64ac3245b130e84ff23dda9a25 Mon Sep 17 00:00:00 2001 From: David Howland Date: Fri, 16 Mar 2018 08:29:45 -0400 Subject: [PATCH 2/4] Use more aesthetic "Save As..." --- src/common/stockitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/stockitem.cpp b/src/common/stockitem.cpp index 763a403d87..967b1383ed 100644 --- a/src/common/stockitem.cpp +++ b/src/common/stockitem.cpp @@ -188,7 +188,7 @@ wxString wxGetStockLabel(wxWindowID id, long flags) STOCKITEM(wxID_REPLACE, _("Rep&lace"), _("Replace")); STOCKITEM(wxID_REVERT_TO_SAVED, _("Revert to Saved"), _("Revert to Saved")); STOCKITEM(wxID_SAVE, _("&Save"), _("Save")); - STOCKITEM(wxID_SAVEAS, _("Save &as..."), _("Save as...")); + STOCKITEM(wxID_SAVEAS, _("Save &As..."), _("Save As...")); STOCKITEM(wxID_SELECTALL, _("Select &All"), _("Select All")); STOCKITEM(wxID_SELECT_COLOR, _("&Color"), _("Color")); STOCKITEM(wxID_SELECT_FONT, _("&Font"), _("Font")); From 1f30c8ccc92c1c2cb807b6d3c8edf0861f400458 Mon Sep 17 00:00:00 2001 From: David Howland Date: Fri, 16 Mar 2018 10:26:56 -0400 Subject: [PATCH 3/4] Bring stock Find and Replace in line with standards Find and Replace would typically require user input to receive the search string from the user, therefore their labels should end with an elipsis. Also, these functions operate on documents, not selections. Finally, Ctrl-H is the commonly used shortcut for Replace, rather than Help (which is usually F1) --- docs/doxygen/mainpages/const_stockitems.h | 4 ++-- src/common/stockitem.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/doxygen/mainpages/const_stockitems.h b/docs/doxygen/mainpages/const_stockitems.h index 0e3c33b6b9..0733eb03de 100644 --- a/docs/doxygen/mainpages/const_stockitems.h +++ b/docs/doxygen/mainpages/const_stockitems.h @@ -39,7 +39,7 @@ Also note that you can retrieve stock bitmaps using wxArtProvider. @stock{wxID_EXECUTE,execute,&Execute} @stock{wxID_EXIT,quit,&Quit} @stock{wxID_FILE,file,&File} -@stock{wxID_FIND,find,&Find} +@stock{wxID_FIND,find,&Find...} @stock{wxID_FIRST,goto-first-ltr,&First} @stock{wxID_FLOPPY,floppy,&Floppy} @stock{wxID_FORWARD,go-forward-ltr,&Forward} @@ -69,7 +69,7 @@ Also note that you can retrieve stock bitmaps using wxArtProvider. @stock{wxID_REDO,redo-ltr,&Redo} @stock{wxID_REFRESH,refresh,Refresh} @stock{wxID_REMOVE,remove,Remove} -@stock{wxID_REPLACE,find-and-replace,Rep&lace} +@stock{wxID_REPLACE,find-and-replace,Rep&lace...} @stock{wxID_REVERT_TO_SAVED,revert-to-saved-ltr,Revert to Saved} @stock{wxID_SAVE,save,&Save} @stock{wxID_SAVEAS,save-as,Save &As...} diff --git a/src/common/stockitem.cpp b/src/common/stockitem.cpp index 967b1383ed..0498cf3c36 100644 --- a/src/common/stockitem.cpp +++ b/src/common/stockitem.cpp @@ -155,7 +155,7 @@ wxString wxGetStockLabel(wxWindowID id, long flags) STOCKITEM(wxID_EXECUTE, _("&Execute"), _("Execute")); STOCKITEM(wxID_EXIT, _("&Quit"), _("Quit")); STOCKITEM(wxID_FILE, _("&File"), _("File")); - STOCKITEM(wxID_FIND, _("&Find"), _("Find")); + STOCKITEM(wxID_FIND, _("&Find..."), _("Find...")); STOCKITEM(wxID_FIRST, _("&First"), _("First")); STOCKITEM(wxID_FLOPPY, _("&Floppy"), _("Floppy")); STOCKITEM(wxID_FORWARD, _("&Forward"), _("Forward")); @@ -185,7 +185,7 @@ wxString wxGetStockLabel(wxWindowID id, long flags) STOCKITEM(wxID_REDO, _("&Redo"), _("Redo")); STOCKITEM(wxID_REFRESH, _("Refresh"), _("Refresh")); STOCKITEM(wxID_REMOVE, _("Remove"), _("Remove")); - STOCKITEM(wxID_REPLACE, _("Rep&lace"), _("Replace")); + STOCKITEM(wxID_REPLACE, _("Rep&lace..."), _("Replace...")); STOCKITEM(wxID_REVERT_TO_SAVED, _("Revert to Saved"), _("Revert to Saved")); STOCKITEM(wxID_SAVE, _("&Save"), _("Save")); STOCKITEM(wxID_SAVEAS, _("Save &As..."), _("Save As...")); @@ -258,7 +258,8 @@ wxString wxGetStockHelpString(wxWindowID id, wxStockHelpStringClient client) STOCKITEM(wxID_COPY, wxSTOCK_MENU, _("Copy selection")) STOCKITEM(wxID_CUT, wxSTOCK_MENU, _("Cut selection")) STOCKITEM(wxID_DELETE, wxSTOCK_MENU, _("Delete selection")) - STOCKITEM(wxID_REPLACE, wxSTOCK_MENU, _("Replace selection")) + STOCKITEM(wxID_FIND, wxSTOCK_MENU, _("Find in document")) + STOCKITEM(wxID_REPLACE, wxSTOCK_MENU, _("Find and replace in document")) STOCKITEM(wxID_PASTE, wxSTOCK_MENU, _("Paste selection")) STOCKITEM(wxID_EXIT, wxSTOCK_MENU, _("Quit this program")) STOCKITEM(wxID_REDO, wxSTOCK_MENU, _("Redo last action")) @@ -293,13 +294,12 @@ wxAcceleratorEntry wxGetStockAccelerator(wxWindowID id) STOCKITEM(wxID_COPY, wxACCEL_CTRL,'C') STOCKITEM(wxID_CUT, wxACCEL_CTRL,'X') STOCKITEM(wxID_FIND, wxACCEL_CTRL,'F') - STOCKITEM(wxID_HELP, wxACCEL_CTRL,'H') STOCKITEM(wxID_NEW, wxACCEL_CTRL,'N') STOCKITEM(wxID_OPEN, wxACCEL_CTRL,'O') STOCKITEM(wxID_PASTE, wxACCEL_CTRL,'V') STOCKITEM(wxID_PRINT, wxACCEL_CTRL,'P') STOCKITEM(wxID_REDO, wxACCEL_CTRL | wxACCEL_SHIFT,'Z') - STOCKITEM(wxID_REPLACE, wxACCEL_CTRL,'R') + STOCKITEM(wxID_REPLACE, wxACCEL_CTRL,'H') STOCKITEM(wxID_SAVE, wxACCEL_CTRL,'S') STOCKITEM(wxID_SELECTALL, wxACCEL_CTRL,'A') STOCKITEM(wxID_UNDO, wxACCEL_CTRL,'Z') From c841e78083d3ef201c7b461ddda10c5956a38f6a Mon Sep 17 00:00:00 2001 From: David Howland Date: Fri, 16 Mar 2018 10:52:28 -0400 Subject: [PATCH 4/4] Fill out help strings for menu items --- src/common/stockitem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/stockitem.cpp b/src/common/stockitem.cpp index 0498cf3c36..399e998342 100644 --- a/src/common/stockitem.cpp +++ b/src/common/stockitem.cpp @@ -264,6 +264,8 @@ wxString wxGetStockHelpString(wxWindowID id, wxStockHelpStringClient client) STOCKITEM(wxID_EXIT, wxSTOCK_MENU, _("Quit this program")) STOCKITEM(wxID_REDO, wxSTOCK_MENU, _("Redo last action")) STOCKITEM(wxID_UNDO, wxSTOCK_MENU, _("Undo last action")) + STOCKITEM(wxID_NEW, wxSTOCK_MENU, _("Create new document")) + STOCKITEM(wxID_OPEN, wxSTOCK_MENU, _("Open an existing document")) STOCKITEM(wxID_CLOSE, wxSTOCK_MENU, _("Close current document")) STOCKITEM(wxID_SAVE, wxSTOCK_MENU, _("Save current document")) STOCKITEM(wxID_SAVEAS, wxSTOCK_MENU, _("Save current document with a different filename"))