From 67f15fe08307bf44a919b96c0472e7521bbd2c88 Mon Sep 17 00:00:00 2001 From: plyatov Date: Sun, 9 Sep 2007 19:11:15 +0000 Subject: [PATCH] Added menu Edit and Undo, Redo submenus with keyboard accelerators. --- eeschema/menubar.cpp | 19 +++++++++++++++++++ todo.txt | 2 ++ 2 files changed, 21 insertions(+) diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index a6cbf18fd7..e12e4d21f0 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -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") ); diff --git a/todo.txt b/todo.txt index bcdb46cf22..54b8be6f2f 100644 --- a/todo.txt +++ b/todo.txt @@ -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.