Update of /cvsroot/audacity/audacity-src/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5114
Modified Files: Menus.cpp Log Message: Rework from Vidyashankar of patch to fix P5 "Pressing OK in Preferences removes action-specific text in last Undo menu item". Index: Menus.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v retrieving revision 1.532 retrieving revision 1.533 diff -u -d -r1.532 -r1.533 --- Menus.cpp 31 Oct 2009 15:24:21 -0000 1.532 +++ Menus.cpp 1 Nov 2009 21:10:38 -0000 1.533 @@ -332,18 +332,7 @@ c->SetDefaultFlags(AudioIONotBusyFlag | TimeSelectedFlag | TracksSelectedFlag, AudioIONotBusyFlag | TimeSelectedFlag | TracksSelectedFlag); - wxString undoStr = _(""); - UndoManager *undoMgr = GetUndoManager(); - if(undoMgr->UndoAvailable()) - { - wxString undoDescription = _(""); - unsigned int state = undoMgr->GetCurrentState(); - undoMgr->GetShortDescription(state, &undoDescription); - undoStr = _("&Undo " + undoDescription); - } - else - undoStr = _("Can't Undo"); - c->AddItem(wxT("Undo"), undoStr, FN(OnUndo), wxT("Ctrl+Z"), + c->AddItem(wxT("Undo"), _("&Undo"), FN(OnUndo), wxT("Ctrl+Z"), AudioIONotBusyFlag | UndoAvailableFlag, AudioIONotBusyFlag | UndoAvailableFlag); @@ -355,19 +344,11 @@ wxT("Ctrl+Shift+Z"); #endif - wxString redoStr = _(""); - if(undoMgr->RedoAvailable()) - { - wxString redoDescription = _(""); - unsigned int state = undoMgr->GetCurrentState(); - undoMgr->GetShortDescription(state + 1, &redoDescription); // redo state is current state + 1 - redoStr = _("&Redo " + redoDescription); - } - else - redoStr = _("Can't Redo"); - c->AddItem(wxT("Redo"), redoStr, FN(OnRedo), key, + c->AddItem(wxT("Redo"), _("&Redo"), FN(OnRedo), key, AudioIONotBusyFlag | RedoAvailableFlag, AudioIONotBusyFlag | RedoAvailableFlag); + + ModifyUndoMenus(); c->AddSeparator(); @@ -1255,7 +1236,7 @@ } else { mCommandManager.Modify(wxT("Undo"), - wxString::Format(_("Can't Undo"))); + wxString::Format(_("&Undo"))); // LL: See above mCommandManager.Enable(wxT("Undo"), true); mCommandManager.Enable(wxT("Undo"), false); @@ -1270,7 +1251,7 @@ } else { mCommandManager.Modify(wxT("Redo"), - wxString::Format(_("Can't Redo"))); + wxString::Format(_("&Redo"))); mCommandManager.Enable(wxT("Redo"), false); } } ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs