forked from qt-creator/qt-creator
Use some more standard icons from the theme
Added icons for Save As, Exit, Select All, Go To Line, About and Search & Replace actions.
This commit is contained in:
@@ -579,7 +579,8 @@ void MainWindow::registerDefaultActions()
|
|||||||
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
||||||
|
|
||||||
// Save As Action
|
// Save As Action
|
||||||
tmpaction = new QAction(tr("Save &As..."), this);
|
icon = QIcon::fromTheme(QLatin1String("document-save-as"));
|
||||||
|
tmpaction = new QAction(icon, tr("Save &As..."), this);
|
||||||
cmd = am->registerAction(tmpaction, Constants::SAVEAS, m_globalContext);
|
cmd = am->registerAction(tmpaction, Constants::SAVEAS, m_globalContext);
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_WS_MAC
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S")));
|
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S")));
|
||||||
@@ -604,7 +605,8 @@ void MainWindow::registerDefaultActions()
|
|||||||
mfile->addAction(cmd, Constants::G_FILE_PRINT);
|
mfile->addAction(cmd, Constants::G_FILE_PRINT);
|
||||||
|
|
||||||
// Exit Action
|
// Exit Action
|
||||||
m_exitAction = new QAction(tr("E&xit"), this);
|
icon = QIcon::fromTheme(QLatin1String("application-exit"));
|
||||||
|
m_exitAction = new QAction(icon, tr("E&xit"), this);
|
||||||
cmd = am->registerAction(m_exitAction, Constants::EXIT, m_globalContext);
|
cmd = am->registerAction(m_exitAction, Constants::EXIT, m_globalContext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Q")));
|
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Q")));
|
||||||
mfile->addAction(cmd, Constants::G_FILE_OTHER);
|
mfile->addAction(cmd, Constants::G_FILE_OTHER);
|
||||||
@@ -655,14 +657,16 @@ void MainWindow::registerDefaultActions()
|
|||||||
tmpaction->setEnabled(false);
|
tmpaction->setEnabled(false);
|
||||||
|
|
||||||
// Select All
|
// Select All
|
||||||
tmpaction = new QAction(tr("&Select All"), this);
|
icon = QIcon::fromTheme(QLatin1String("edit-select-all"));
|
||||||
|
tmpaction = new QAction(icon, tr("&Select All"), this);
|
||||||
cmd = am->registerAction(tmpaction, Constants::SELECTALL, m_globalContext);
|
cmd = am->registerAction(tmpaction, Constants::SELECTALL, m_globalContext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence::SelectAll);
|
cmd->setDefaultKeySequence(QKeySequence::SelectAll);
|
||||||
medit->addAction(cmd, Constants::G_EDIT_SELECTALL);
|
medit->addAction(cmd, Constants::G_EDIT_SELECTALL);
|
||||||
tmpaction->setEnabled(false);
|
tmpaction->setEnabled(false);
|
||||||
|
|
||||||
// Goto Action
|
// Goto Action
|
||||||
tmpaction = new QAction(tr("&Go To Line..."), this);
|
icon = QIcon::fromTheme(QLatin1String("go-jump"));
|
||||||
|
tmpaction = new QAction(icon, tr("&Go To Line..."), this);
|
||||||
cmd = am->registerAction(tmpaction, Constants::GOTO, m_globalContext);
|
cmd = am->registerAction(tmpaction, Constants::GOTO, m_globalContext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+L")));
|
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+L")));
|
||||||
medit->addAction(cmd, Constants::G_EDIT_OTHER);
|
medit->addAction(cmd, Constants::G_EDIT_OTHER);
|
||||||
@@ -724,10 +728,11 @@ void MainWindow::registerDefaultActions()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// About IDE Action
|
// About IDE Action
|
||||||
|
icon = QIcon::fromTheme(QLatin1String("help-about"));
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_WS_MAC
|
||||||
tmpaction = new QAction(tr("About &Qt Creator"), this); // it's convention not to add dots to the about menu
|
tmpaction = new QAction(icon, tr("About &Qt Creator"), this); // it's convention not to add dots to the about menu
|
||||||
#else
|
#else
|
||||||
tmpaction = new QAction(tr("About &Qt Creator..."), this);
|
tmpaction = new QAction(icon, tr("About &Qt Creator..."), this);
|
||||||
#endif
|
#endif
|
||||||
cmd = am->registerAction(tmpaction, Constants::ABOUT_QTCREATOR, m_globalContext);
|
cmd = am->registerAction(tmpaction, Constants::ABOUT_QTCREATOR, m_globalContext);
|
||||||
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
|
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
|
||||||
|
|||||||
@@ -133,7 +133,8 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
|
|||||||
Core::ActionContainer *mfind = am->actionContainer(Constants::M_FIND);
|
Core::ActionContainer *mfind = am->actionContainer(Constants::M_FIND);
|
||||||
Core::Command *cmd;
|
Core::Command *cmd;
|
||||||
|
|
||||||
m_findInDocumentAction = new QAction(tr("Find/Replace"), this);
|
QIcon icon = QIcon::fromTheme(QLatin1String("edit-find-replace"));
|
||||||
|
m_findInDocumentAction = new QAction(icon, tr("Find/Replace"), this);
|
||||||
cmd = am->registerAction(m_findInDocumentAction, Constants::FIND_IN_DOCUMENT, globalcontext);
|
cmd = am->registerAction(m_findInDocumentAction, Constants::FIND_IN_DOCUMENT, globalcontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence::Find);
|
cmd->setDefaultKeySequence(QKeySequence::Find);
|
||||||
mfind->addAction(cmd, Constants::G_FIND_CURRENTDOCUMENT);
|
mfind->addAction(cmd, Constants::G_FIND_CURRENTDOCUMENT);
|
||||||
|
|||||||
Reference in New Issue
Block a user