Skip to content

Commit

Permalink
Merge bitcoin#11169: [GUI] Make tabs toolbar no longer have a context…
Browse files Browse the repository at this point in the history
… menu

e254830 Make tabs toolbar no longer have a context menu (Andrew Chow)

Pull request description:

  Adds a contextMenuPolicy of Qt::PreventContextMenu to prevent the tabs toolbar from showing a context menu that allows it to be hidden.

  Fixes bitcoin#11168

Tree-SHA512: 8900b3c1a891ead3c9a20dc365b436fa75f97dbe0dfa7e20ee26fd9d09f3fee6eda286b0c075ed89fe1361608ecbdd87c744e37d97a3fba62493a86dedda867b
  • Loading branch information
laanwj authored and PastaPastaPasta committed Jan 2, 2020
1 parent eb0de04 commit ba2ed60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ void BitcoinGUI::createActions()

// Get restart command-line parameters and handle restart
connect(rpcConsole, SIGNAL(handleRestart(QStringList)), this, SLOT(handleRestart(QStringList)));

// prevents an open debug window from becoming stuck/unusable on client shutdown
connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));

Expand Down Expand Up @@ -582,6 +582,7 @@ void BitcoinGUI::createToolBars()
if(walletFrame)
{
QToolBar *toolbar = new QToolBar(tr("Tabs toolbar"));
toolbar->setContextMenuPolicy(Qt::PreventContextMenu);
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
Expand Down Expand Up @@ -644,7 +645,7 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance();
dockIconHandler->setMainWindow((QMainWindow *)this);
dockIconMenu = dockIconHandler->dockMenu();

createIconMenu(dockIconMenu);
#endif
}
Expand Down

0 comments on commit ba2ed60

Please sign in to comment.