Added menu Edit and Undo, Redo submenus with keyboard accelerators.

This commit is contained in:
plyatov 2007-09-09 19:11:15 +00:00
parent 50210207be
commit 67f15fe083
2 changed files with 21 additions and 0 deletions

View File

@ -115,6 +115,24 @@ wxMenuBar * menuBar = GetMenuBar();
m_FilesMenu->Append(item);
}
// Menu Edit:
wxMenu * editMenu = new wxMenu;
item = new wxMenuItem(editMenu, ID_SCHEMATIC_UNDO,
_("&Undo\tCTRL+Z"),
_("Undo last edition") );
item->SetBitmap(undo_xpm);
editMenu->Append(item);
/* if ( GetScreen()->m_UndoList )
editMenu->Enable(ID_SCHEMATIC_UNDO,TRUE);
else
editMenu->Enable(ID_SCHEMATIC_UNDO,FALSE);
*/
item = new wxMenuItem(editMenu, ID_SCHEMATIC_REDO,
_("&Redo\tCTRL+Y"),
_("Redo the last undo command") );
item->SetBitmap(redo_xpm);
editMenu->Append(item);
// Menu Configuration:
wxMenu * configmenu = new wxMenu;
item = new wxMenuItem(configmenu, ID_CONFIG_REQ,
@ -170,6 +188,7 @@ wxMenuBar * menuBar = GetMenuBar();
menuBar->Append(m_FilesMenu, _("&File") );
menuBar->Append(editMenu, _("&Edit") );
menuBar->Append(configmenu, _("&Preferences") );
menuBar->Append(helpMenu, _("&Help") );

View File

@ -36,3 +36,5 @@ compiler can help with this too.
*** Translate comments that are in French to English so there can be a broader
understanding by new developers.
*** Implement the graying in/out of "Edit/Undo", "Edit/Redo" menu items,
when Undo/Redo stack is empty/filled.