- wxCommand *command = (wxCommand *)m_currentCommand->Data();
- wxString commandName(command->GetName());
- if (commandName == wxT("")) commandName = _("Unnamed command");
- bool canUndo = command->CanUndo();
- if (canUndo)
- buf = wxString(_("&Undo ")) + commandName;
- else
- buf = wxString(_("Can't &Undo ")) + commandName;
-
- m_commandEditMenu->SetLabel(wxID_UNDO, buf);
- m_commandEditMenu->Enable(wxID_UNDO, canUndo);
-
- // We can redo, if we're not at the end of the history.
- if (m_currentCommand->Next())
- {
- wxCommand *redoCommand = (wxCommand *)m_currentCommand->Next()->Data();
- wxString redoCommandName(redoCommand->GetName());
- if (redoCommandName == wxT("")) redoCommandName = _("Unnamed command");
- buf = wxString(_("&Redo ")) + redoCommandName;
- m_commandEditMenu->SetLabel(wxID_REDO, buf);
- m_commandEditMenu->Enable(wxID_REDO, TRUE);
- }
- else
- {
- m_commandEditMenu->SetLabel(wxID_REDO, _("&Redo"));
- m_commandEditMenu->Enable(wxID_REDO, FALSE);
- }
- }
- else
- {
- m_commandEditMenu->SetLabel(wxID_UNDO, _("&Undo"));
- m_commandEditMenu->Enable(wxID_UNDO, FALSE);
-
- if (m_commands.Number() == 0)
+ // if in same directory just show the filename; otherwise the full
+ // path
+ wxString pathInMenu, path, filename, ext;
+ wxSplitPath( m_fileHistory[i], &path, &filename, &ext );
+ if ( path == pathCurrent )