Permalink
Browse files

Revert "scide: on Mac, make one global menu to share by all windows"

This reverts commit 6fe68d8.

Conflicts:
	editors/sc-ide/widgets/main_window.cpp
  • Loading branch information...
1 parent c67566a commit 2ea728a51c37a819cd2af58a2a0d2b2e9dc0c295 @lijon lijon committed with jleben Nov 4, 2012
Showing with 6 additions and 14 deletions.
  1. +6 −14 editors/sc-ide/widgets/main_window.cpp
@@ -447,17 +447,9 @@ void MainWindow::createActions()
void MainWindow::createMenus()
{
- QMenuBar *menuBar;
QMenu *menu;
QMenu *submenu;
- // On Mac, create a parent-less menu bar to be shared by all windows:
-#ifdef Q_OS_MAC
- menuBar = new QMenuBar(0);
-#else
- menuBar = this->menuBar();
-#endif
-
menu = new QMenu(tr("&File"), this);
menu->addAction( mActions[DocNew] );
menu->addAction( mActions[DocOpen] );
@@ -475,7 +467,7 @@ void MainWindow::createMenus()
menu->addSeparator();
menu->addAction( mActions[Quit] );
- menuBar->addMenu(menu);
+ menuBar()->addMenu(menu);
menu = new QMenu(tr("&Session"), this);
menu->addAction( mActions[NewSession] );
@@ -489,7 +481,7 @@ void MainWindow::createMenus()
menu->addAction( mActions[ManageSessions] );
menu->addAction( mActions[OpenSessionSwitchDialog] );
- menuBar->addMenu(menu);
+ menuBar()->addMenu(menu);
menu = new QMenu(tr("&Edit"), this);
menu->addAction( mEditors->action(MultiEditor::Undo) );
@@ -510,7 +502,7 @@ void MainWindow::createMenus()
menu->addSeparator();
menu->addAction( mActions[ShowSettings] );
- menuBar->addMenu(menu);
+ menuBar()->addMenu(menu);
menu = new QMenu(tr("&View"), this);
submenu = new QMenu(tr("&Docklets"), this);
@@ -545,7 +537,7 @@ void MainWindow::createMenus()
menu->addSeparator();
menu->addAction( mActions[ShowFullScreen] );
- menuBar->addMenu(menu);
+ menuBar()->addMenu(menu);
menu = new QMenu(tr("&Language"), this);
menu->addAction( mMain->scProcess()->action(ScProcess::ToggleRunning) );
@@ -570,7 +562,7 @@ void MainWindow::createMenus()
menu->addAction( mActions[LookupReferencesForCursor] );
menu->addAction( mActions[LookupReferences] );
- menuBar->addMenu(menu);
+ menuBar()->addMenu(menu);
menu = new QMenu(tr("&Help"), this);
menu->addAction( mActions[Help] );
@@ -580,7 +572,7 @@ void MainWindow::createMenus()
menu->addAction( mActions[ShowAbout] );
menu->addAction( mActions[ShowAboutQT] );
- menuBar->addMenu(menu);
+ menuBar()->addMenu(menu);
mServerStatus->addAction( mMain->scServer()->action(ScServer::ToggleRunning) );
mServerStatus->addAction( mMain->scServer()->action(ScServer::Reboot) );

0 comments on commit 2ea728a

Please sign in to comment.