forked from qt-creator/qt-creator
EditorManager: Reset save/save as/revert action texts
The old file name was still hanging around after all files were closed. Also reduce number of translated strings. Task-number: QTCREATORBUG-14800 Change-Id: I437072be0f7dcd26f55a7895d20cf8fe6e3cd8b5 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -1536,6 +1536,10 @@ void EditorManagerPrivate::setupSaveActions(IDocument *document, QAction *saveAc
|
|||||||
revertToSavedAction->setText(document->isModified()
|
revertToSavedAction->setText(document->isModified()
|
||||||
? tr("Revert %1 to Saved").arg(quotedName)
|
? tr("Revert %1 to Saved").arg(quotedName)
|
||||||
: tr("Reload %1").arg(quotedName));
|
: tr("Reload %1").arg(quotedName));
|
||||||
|
} else {
|
||||||
|
saveAction->setText(EditorManager::tr("&Save"));
|
||||||
|
saveAsAction->setText(EditorManager::tr("Save &As..."));
|
||||||
|
revertToSavedAction->setText(EditorManager::tr("Revert to Saved"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -538,7 +538,7 @@ void MainWindow::registerDefaultActions()
|
|||||||
|
|
||||||
// Save Action
|
// Save Action
|
||||||
icon = QIcon::fromTheme(QLatin1String("document-save"), Icons::SAVEFILE.icon());
|
icon = QIcon::fromTheme(QLatin1String("document-save"), Icons::SAVEFILE.icon());
|
||||||
QAction *tmpaction = new QAction(icon, tr("&Save"), this);
|
QAction *tmpaction = new QAction(icon, EditorManager::tr("&Save"), this);
|
||||||
tmpaction->setEnabled(false);
|
tmpaction->setEnabled(false);
|
||||||
cmd = ActionManager::registerAction(tmpaction, Constants::SAVE);
|
cmd = ActionManager::registerAction(tmpaction, Constants::SAVE);
|
||||||
cmd->setDefaultKeySequence(QKeySequence::Save);
|
cmd->setDefaultKeySequence(QKeySequence::Save);
|
||||||
@@ -548,7 +548,7 @@ void MainWindow::registerDefaultActions()
|
|||||||
|
|
||||||
// Save As Action
|
// Save As Action
|
||||||
icon = QIcon::fromTheme(QLatin1String("document-save-as"));
|
icon = QIcon::fromTheme(QLatin1String("document-save-as"));
|
||||||
tmpaction = new QAction(icon, tr("Save &As..."), this);
|
tmpaction = new QAction(icon, EditorManager::tr("Save &As..."), this);
|
||||||
tmpaction->setEnabled(false);
|
tmpaction->setEnabled(false);
|
||||||
cmd = ActionManager::registerAction(tmpaction, Constants::SAVEAS);
|
cmd = ActionManager::registerAction(tmpaction, Constants::SAVEAS);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+S") : QString()));
|
cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+S") : QString()));
|
||||||
|
Reference in New Issue
Block a user