Move some actions to a "View" menu

A "View" menu seems to be what many users are looking for when they want
to show or hide panes/views, so move corresponding actions there.
Window management / split actions stay in the "Window" menu.

Fixes: QTCREATORBUG-23610
Change-Id: Id683addc681de99abb35697a735fdbc9dc0d00cd
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2020-03-04 10:44:07 +01:00
parent 1fbc8a7f68
commit a6d52a6e28
9 changed files with 43 additions and 25 deletions

View File

@@ -253,7 +253,7 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent)
q->addDockWidget(Qt::BottomDockWidgetArea, m_toolBarDock);
connect(viewButton, &QAbstractButton::clicked, this, [this, viewButton] {
ActionContainer *viewsMenu = ActionManager::actionContainer(Core::Constants::M_WINDOW_VIEWS);
ActionContainer *viewsMenu = ActionManager::actionContainer(Core::Constants::M_VIEW_VIEWS);
viewsMenu->menu()->exec(viewButton->mapToGlobal(QPoint()));
});
@@ -279,7 +279,7 @@ DebuggerMainWindow::DebuggerMainWindow()
Context debugcontext(Debugger::Constants::C_DEBUGMODE);
ActionContainer *viewsMenu = ActionManager::actionContainer(Core::Constants::M_WINDOW_VIEWS);
ActionContainer *viewsMenu = ActionManager::actionContainer(Core::Constants::M_VIEW_VIEWS);
Command *cmd = ActionManager::registerAction(showCentralWidgetAction(),
"Debugger.Views.ShowCentralWidget", debugcontext);
cmd->setAttribute(Command::CA_Hide);
@@ -312,7 +312,7 @@ DebuggerMainWindow::~DebuggerMainWindow()
void DebuggerMainWindow::contextMenuEvent(QContextMenuEvent *ev)
{
ActionContainer *viewsMenu = ActionManager::actionContainer(Core::Constants::M_WINDOW_VIEWS);
ActionContainer *viewsMenu = ActionManager::actionContainer(Core::Constants::M_VIEW_VIEWS);
viewsMenu->menu()->exec(ev->globalPos());
}
@@ -893,7 +893,7 @@ void Perspective::addWindow(QWidget *widget,
Command *cmd = ActionManager::registerAction(op.toggleViewAction, op.commandId, d->context());
cmd->setAttribute(Command::CA_Hide);
ActionManager::actionContainer(Core::Constants::M_WINDOW_VIEWS)->addAction(cmd);
ActionManager::actionContainer(Core::Constants::M_VIEW_VIEWS)->addAction(cmd);
}
d->m_dockOperations.append(op);