Mercurial > hg > easyhg
comparison src/mainwindow.cpp @ 664:cfe684675e81
Workaround for disappearing menubar under Ubuntu
author | Chris Cannam |
---|---|
date | Mon, 01 Sep 2014 16:12:33 +0100 |
parents | 43c61fd6fea4 |
children | ce29dc775650 |
comparison
equal
deleted
inserted
replaced
662:43c61fd6fea4 | 664:cfe684675e81 |
---|---|
3046 this, SLOT(clearSelections())); | 3046 this, SLOT(clearSelections())); |
3047 } | 3047 } |
3048 | 3048 |
3049 void MainWindow::createMenus() | 3049 void MainWindow::createMenus() |
3050 { | 3050 { |
3051 #ifdef Q_OS_LINUX | |
3052 // In Ubuntu 14.04 the window's menu bar goes missing entirely if | |
3053 // the user is running any desktop environment other than Unity | |
3054 // (in which the faux single-menubar appears). The user has a | |
3055 // workaround, to remove the appmenu-qt5 package, but that is | |
3056 // awkward and the problem is so severe that it merits disabling | |
3057 // the system menubar integration altogether. Like this: | |
3058 menuBar()->setNativeMenuBar(false); | |
3059 #endif | |
3060 | |
3051 m_fileMenu = menuBar()->addMenu(tr("&File")); | 3061 m_fileMenu = menuBar()->addMenu(tr("&File")); |
3052 | 3062 |
3053 m_fileMenu->addAction(m_openAct); | 3063 m_fileMenu->addAction(m_openAct); |
3054 m_recentMenu = m_fileMenu->addMenu(tr("Open Re¢")); | 3064 m_recentMenu = m_fileMenu->addMenu(tr("Open Re¢")); |
3055 m_fileMenu->addAction(m_hgRefreshAct); | 3065 m_fileMenu->addAction(m_hgRefreshAct); |