Commit 46ff5da1 authored by con's avatar con

Revert the "More..." output pane button again.

parent d7e04f3b
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
#include <QtGui/QFocusEvent> #include <QtGui/QFocusEvent>
#include <QtGui/QHBoxLayout> #include <QtGui/QHBoxLayout>
#include <QtGui/QSplitter> #include <QtGui/QSplitter>
#include <QtGui/QMenu>
#include <QtGui/QPainter> #include <QtGui/QPainter>
#include <QtGui/QToolButton> #include <QtGui/QToolButton>
#include <QtGui/QStackedWidget> #include <QtGui/QStackedWidget>
...@@ -315,7 +314,6 @@ void OutputPaneManager::init() ...@@ -315,7 +314,6 @@ void OutputPaneManager::init()
cmd = am->registerAction(sep, QLatin1String("Coreplugin.OutputPane.Sep"), globalcontext); cmd = am->registerAction(sep, QLatin1String("Coreplugin.OutputPane.Sep"), globalcontext);
mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup"); mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup");
m_morePanesMenu = new QMenu(this);
QList<IOutputPane*> panes = ExtensionSystem::PluginManager::instance() QList<IOutputPane*> panes = ExtensionSystem::PluginManager::instance()
->getObjects<IOutputPane>(); ->getObjects<IOutputPane>();
QMultiMap<int, IOutputPane*> sorted; QMultiMap<int, IOutputPane*> sorted;
...@@ -357,9 +355,7 @@ void OutputPaneManager::init() ...@@ -357,9 +355,7 @@ void OutputPaneManager::init()
mpanes->addAction(cmd, "Coreplugin.OutputPane.PanesGroup"); mpanes->addAction(cmd, "Coreplugin.OutputPane.PanesGroup");
m_actions.insert(cmd->action(), idx); m_actions.insert(cmd->action(), idx);
if (outPane->priorityInStatusBar() == -1) { if (outPane->priorityInStatusBar() != -1) {
m_morePanesMenu->addAction(cmd->action());
} else {
cmd->setDefaultKeySequence(QKeySequence(paneShortCut(shortcutNumber))); cmd->setDefaultKeySequence(QKeySequence(paneShortCut(shortcutNumber)));
QPushButton *button = new OutputPaneToggleButton(shortcutNumber, outPane->name(), QPushButton *button = new OutputPaneToggleButton(shortcutNumber, outPane->name(),
cmd->action()); cmd->action());
...@@ -375,19 +371,6 @@ void OutputPaneManager::init() ...@@ -375,19 +371,6 @@ void OutputPaneManager::init()
connect(cmd->action(), SIGNAL(triggered()), this, SLOT(shortcutTriggered())); connect(cmd->action(), SIGNAL(triggered()), this, SLOT(shortcutTriggered()));
} while (it != begin); } while (it != begin);
// add the "More..." button
{
QString actionId = QString("QtCreator.Pane.More");
QAction *action = new QAction(tr("More..."), this);
Command *cmd = am->registerAction(action, actionId, QList<int>() << Constants::C_GLOBAL_ID);
cmd->setDefaultKeySequence(QKeySequence(paneShortCut(shortcutNumber)));
QPushButton *moreButton = new OutputPaneToggleButton(shortcutNumber, tr("More..."),
cmd->action());
moreButton->setMenu(m_morePanesMenu);
m_buttonsWidget->layout()->addWidget(moreButton);
connect(cmd->action(), SIGNAL(triggered()), moreButton, SLOT(showMenu()));
}
changePage(); changePage();
} }
......
...@@ -41,7 +41,6 @@ class QAction; ...@@ -41,7 +41,6 @@ class QAction;
class QComboBox; class QComboBox;
class QToolButton; class QToolButton;
class QStackedWidget; class QStackedWidget;
class QMenu;
class QSplitter; class QSplitter;
QT_END_NAMESPACE QT_END_NAMESPACE
...@@ -149,7 +148,6 @@ private: ...@@ -149,7 +148,6 @@ private:
QWidget *m_buttonsWidget; QWidget *m_buttonsWidget;
QMap<int, QPushButton *> m_buttons; QMap<int, QPushButton *> m_buttons;
QMap<QAction *, int> m_actions; QMap<QAction *, int> m_actions;
QMenu *m_morePanesMenu;
}; };
class OutputPaneToggleButton : public QPushButton class OutputPaneToggleButton : public QPushButton
......
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