merge r3983,r4002 (more string fixes.)

Originally committed to SVN as r4019.
This commit is contained in:
Amar Takhar 2010-01-21 00:24:59 +00:00
parent 79c1716ccd
commit 4221919d4f
2 changed files with 14 additions and 5 deletions

View file

@ -434,13 +434,17 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
// Undo state // Undo state
editMenu->Remove(Menu_Edit_Undo); editMenu->Remove(Menu_Edit_Undo);
editMenu->Remove(Menu_Edit_Redo); editMenu->Remove(Menu_Edit_Redo);
AppendBitmapMenuItem(editMenu,Menu_Edit_Undo, wxString::Format(_T("%s %s\t%s"), _("&Undo"), AssFile::GetUndoDescription().c_str(), Hotkeys.GetText(_T("Undo")).c_str()), _("Undoes last action"),GETIMAGE(undo_button_16),0)->Enable(!AssFile::IsUndoStackEmpty());
AppendBitmapMenuItem(editMenu,Menu_Edit_Redo, wxString::Format(_T("%s %s\t%s"), _("&Redo"), AssFile::GetRedoDescription().c_str(), Hotkeys.GetText(_T("Redo")).c_str()), _("Redoes last action"),GETIMAGE(redo_button_16),1)->Enable(!AssFile::IsRedoStackEmpty()); wxString undo_text = _("&Undo") + wxString(_T(" ")) + AssFile::GetUndoDescription() + wxString(_T("\t")) + Hotkeys.GetText(_T("Undo"));
AppendBitmapMenuItem(editMenu,Menu_Edit_Undo, undo_text, _("Undoes last action"),GETIMAGE(undo_button_16),0)->Enable(!AssFile::IsUndoStackEmpty());
wxString redo_text = _("&Redo") + wxString(_T(" ")) + AssFile::GetRedoDescription() + wxString(_T("\t")) + Hotkeys.GetText(_T("Redo"));
AppendBitmapMenuItem(editMenu,Menu_Edit_Redo, redo_text, _("Redoes last action"),GETIMAGE(redo_button_16),1)->Enable(!AssFile::IsRedoStackEmpty());
// Copy/cut/paste // Copy/cut/paste
wxArrayInt sels = SubsBox->GetSelection(); wxArrayInt sels = SubsBox->GetSelection();
bool can_copy = (sels.Count() > 0); bool can_copy = (sels.Count() > 0);
bool can_paste = true; bool can_paste = true;
if (wxTheClipboard->Open()) { if (wxTheClipboard->Open()) {
can_paste = wxTheClipboard->IsSupported(wxDF_TEXT); can_paste = wxTheClipboard->IsSupported(wxDF_TEXT);

View file

@ -837,7 +837,9 @@ void SubsTextEditCtrl::ShowPopupMenu(int activePos) {
} }
// Append "add word" // Append "add word"
menu.Append(EDIT_MENU_ADD_TO_DICT,wxString::Format(_("Add \"%s\" to dictionary"),currentWord.c_str()))->Enable(spellchecker->CanAddWord(currentWord)); wxString add_to_dict_text(_("Add \"%s\" to dictionary"));
add_to_dict_text.Replace(_T("%s"), currentWord);
menu.Append(EDIT_MENU_ADD_TO_DICT,add_to_dict_text)->Enable(spellchecker->CanAddWord(currentWord));
} }
// Spelled right // Spelled right
@ -934,7 +936,10 @@ void SubsTextEditCtrl::ShowPopupMenu(int activePos) {
} }
// Thesaurus menu // Thesaurus menu
menu.Append(-1,wxString::Format(_("Thesaurus suggestions for \"%s\""),currentWord.c_str()), thesMenu); wxString thes_suggestion_text(_("Thesaurus suggestions for \"%s\""));
thes_suggestion_text.Replace(_T("%s"), currentWord);
menu.Append(-1,thes_suggestion_text,thesMenu);
} }
// No suggestions // No suggestions