Commit 95bf1681 authored by con's avatar con

Clean up the menus' separators.

parent d7883067
......@@ -188,12 +188,8 @@ const char * const G_EDIT_EDITOR = "QtCreator.Group.Edit.Editor";
const char * const G_WINDOW_SIZE = "QtCreator.Group.Window.Size";
const char * const G_WINDOW_PANES = "QtCreator.Group.Window.Panes";
const char * const G_WINDOW_SPLIT = "QtCreator.Group.Window.Split";
const char * const G_WINDOW_CLOSE = "QtCreator.Group.Window.Close";
const char * const G_WINDOW_NAVIGATE = "QtCreator.Group.Window.Navigate";
const char * const G_WINDOW_NAVIGATE_GROUPS = "QtCreator.Group.Window.Navigate.Groups";
const char * const G_WINDOW_OTHER = "QtCreator.Group.Window.Other";
const char * const G_WINDOW_LIST = "QtCreator.Group.Window.List";
const char * const G_WINDOW_FULLSCREEN = "QtCreator.Group.Window.Fullscreen";
// help groups (global)
const char * const G_HELP_HELP = "QtCreator.Group.Help.Help";
......
......@@ -268,26 +268,11 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
cmd = am->registerAction(tmpaction, QLatin1String("QtCreator.Window.Sep.Split"), editManagerContext);
mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT);
tmpaction = new QAction(this);
tmpaction->setSeparator(true);
cmd = am->registerAction(tmpaction, QLatin1String("QtCreator.Window.Sep.Close"), editManagerContext);
mwindow->addAction(cmd, Constants::G_WINDOW_CLOSE);
tmpaction = new QAction(this);
tmpaction->setSeparator(true);
cmd = am->registerAction(tmpaction, QLatin1String("QtCreator.Window.Sep.Navigate"), editManagerContext);
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
tmpaction = new QAction(this);
tmpaction->setSeparator(true);
cmd = am->registerAction(tmpaction, QLatin1String("QtCreator.Window.Sep.Navigate.Groups"), editManagerContext);
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE_GROUPS);
tmpaction = new QAction(this);
tmpaction->setSeparator(true);
cmd = am->registerAction(tmpaction, QLatin1String("QtCreator.Window.Sep.Bottom"), editManagerContext);
mwindow->addAction(cmd, Constants::G_WINDOW_LIST);
//Close Action
cmd = am->registerAction(m_d->m_closeCurrentEditorAction, Constants::CLOSE, editManagerContext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+W")));
......
......@@ -491,11 +491,8 @@ void MainWindow::registerDefaultContainers()
mwindow->appendGroup(Constants::G_WINDOW_SIZE);
mwindow->appendGroup(Constants::G_WINDOW_PANES);
mwindow->appendGroup(Constants::G_WINDOW_SPLIT);
mwindow->appendGroup(Constants::G_WINDOW_CLOSE);
mwindow->appendGroup(Constants::G_WINDOW_NAVIGATE);
mwindow->appendGroup(Constants::G_WINDOW_NAVIGATE_GROUPS);
mwindow->appendGroup(Constants::G_WINDOW_OTHER);
mwindow->appendGroup(Constants::G_WINDOW_LIST);
// Help Menu
ac = am->createMenu(Constants::M_HELP);
......@@ -757,10 +754,12 @@ void MainWindow::registerDefaultActions()
// tmpaction->setEnabled(true);
// connect(tmpaction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
// About sep
#ifndef Q_WS_MAC // doesn't have the "About" actions in the Help menu
tmpaction = new QAction(this);
tmpaction->setSeparator(true);
cmd = am->registerAction(tmpaction, QLatin1String("QtCreator.Help.Sep.About"), m_globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
#endif
}
void MainWindow::newFile()
......
......@@ -649,7 +649,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
QAction *sep = new QAction(this);
sep->setSeparator(true);
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep1"), globalcontext);
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Step"), globalcontext);
mdebug->addAction(cmd);
cmd = am->registerAction(m_manager->m_nextAction,
......@@ -700,7 +700,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
sep = new QAction(this);
sep->setSeparator(true);
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep3"), globalcontext);
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Break"), globalcontext);
mdebug->addAction(cmd);
cmd = am->registerAction(m_manager->m_breakAction,
......@@ -711,12 +711,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
sep = new QAction(this);
sep->setSeparator(true);
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep2"), globalcontext);
mdebug->addAction(cmd);
sep = new QAction(this);
sep->setSeparator(true);
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep4"), globalcontext);
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Watch"), globalcontext);
mdebug->addAction(cmd);
cmd = am->registerAction(m_manager->m_watchAction,
......@@ -725,7 +720,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
mdebug->addAction(cmd);
// Views menu
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep5"), globalcontext);
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Views"), globalcontext);
mdebug->addAction(cmd);
ActionContainer *viewsMenu = am->createMenu(Constants::M_DEBUG_VIEWS);
QMenu *m = viewsMenu->menu();
......
......@@ -358,6 +358,11 @@ void FormEditorW::setupActions()
m_actionGroupEditMode->setExclusive(true);
connect(m_actionGroupEditMode, SIGNAL(triggered(QAction*)), this, SLOT(activateEditMode(QAction*)));
m_modeActionSeparator = new QAction(this);
m_modeActionSeparator->setSeparator(true);
command = am->registerAction(m_modeActionSeparator, QLatin1String("FormEditor.Sep.ModeActions"), globalcontext);
medit->addAction(command, Core::Constants::G_EDIT_OTHER);
m_toolActionIds.push_back(QLatin1String("FormEditor.WidgetEditor"));
createEditModeAction(m_actionGroupEditMode, globalcontext, am, medit,
tr("Edit widgets"), m_toolActionIds.back(),
......@@ -582,8 +587,10 @@ void FormEditorW::currentEditorChanged(Core::IEditor *editor)
fw->activate();
m_fwm->setActiveFormWindow(fw->formWindow());
m_actionGroupEditMode->setVisible(true);
m_modeActionSeparator->setVisible(true);
} else {
m_actionGroupEditMode->setVisible(false);
m_modeActionSeparator->setVisible(false);
m_fwm->setActiveFormWindow(0);
}
}
......
......@@ -158,6 +158,7 @@ private:
QAction *m_actionPreview;
QActionGroup *m_actionGroupPreviewInStyle;
QAction *m_actionAboutPlugins;
QAction *m_modeActionSeparator;
QList<int> m_context;
......
......@@ -359,11 +359,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mproject->addAction(cmd, Constants::G_PROJECT_CONFIG);
msubProject->addAction(cmd, Constants::G_PROJECT_CONFIG);
sep = new QAction(this);
sep->setSeparator(true);
cmd = am->registerAction(sep, QLatin1String("ProjectExplorer.Close.Sep"), globalcontext);
mfile->addAction(cmd, Core::Constants::G_FILE_CLOSE);
sep = new QAction(this);
sep->setSeparator(true);
cmd = am->registerAction(sep, QLatin1String("ProjectExplorer.Projects.Sep"), globalcontext);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment