Commit 67f15fe0 authored by plyatov's avatar plyatov

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

parent 50210207
...@@ -115,6 +115,24 @@ wxMenuBar * menuBar = GetMenuBar(); ...@@ -115,6 +115,24 @@ wxMenuBar * menuBar = GetMenuBar();
m_FilesMenu->Append(item); 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: // Menu Configuration:
wxMenu * configmenu = new wxMenu; wxMenu * configmenu = new wxMenu;
item = new wxMenuItem(configmenu, ID_CONFIG_REQ, item = new wxMenuItem(configmenu, ID_CONFIG_REQ,
...@@ -170,6 +188,7 @@ wxMenuBar * menuBar = GetMenuBar(); ...@@ -170,6 +188,7 @@ wxMenuBar * menuBar = GetMenuBar();
menuBar->Append(m_FilesMenu, _("&File") ); menuBar->Append(m_FilesMenu, _("&File") );
menuBar->Append(editMenu, _("&Edit") );
menuBar->Append(configmenu, _("&Preferences") ); menuBar->Append(configmenu, _("&Preferences") );
menuBar->Append(helpMenu, _("&Help") ); menuBar->Append(helpMenu, _("&Help") );
......
...@@ -36,3 +36,5 @@ compiler can help with this too. ...@@ -36,3 +36,5 @@ compiler can help with this too.
*** Translate comments that are in French to English so there can be a broader *** Translate comments that are in French to English so there can be a broader
understanding by new developers. understanding by new developers.
*** Implement the graying in/out of "Edit/Undo", "Edit/Redo" menu items,
when Undo/Redo stack is empty/filled.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment