Skip to content
Permalink
Browse files
Menu bar for composer also on platforms != mac. Fixes bug 1668
git-svn-id: http://svn.osgeo.org/qgis/trunk@11775 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Oct 8, 2009
1 parent 7092a44 commit 7da03a835fa00d190a08dc0a76d5cbe7aecd8369
Showing with 5 additions and 4 deletions.
  1. +5 −2 src/app/composer/qgscomposer.cpp
  2. +0 −2 src/app/composer/qgscomposer.h
@@ -116,7 +116,6 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow(), mFirstPaint( true )
mActionAddImage->setCheckable( true );
mActionMoveItemContent->setCheckable( true );

#ifdef Q_WS_MAC
QMenu *appMenu = menuBar()->addMenu( tr( "QGIS" ) );
appMenu->addAction( QgisApp::instance()->actionAbout() );
appMenu->addAction( QgisApp::instance()->actionOptions() );
@@ -128,6 +127,7 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow(), mFirstPaint( true )
fileMenu->addSeparator();
fileMenu->addAction( mActionPrint );

#if 0
QMenu *editMenu = menuBar()->addMenu( tr( "Edit" ) );
QAction *undoAction = editMenu->addAction( tr( "&Undo" ), this, SLOT( undo() ), tr( "Ctrl+Z" ) );
undoAction->setEnabled( false );
@@ -140,6 +140,7 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow(), mFirstPaint( true )
pasteAction->setEnabled( false );
QAction *deleteAction = editMenu->addAction( tr( "Delete" ) );
deleteAction->setEnabled( false );
#endif //0

QMenu *viewMenu = menuBar()->addMenu( tr( "View" ) );
viewMenu->addAction( mActionZoomIn );
@@ -164,16 +165,18 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow(), mFirstPaint( true )
layoutMenu->addAction( mActionMoveItemsToTop );
layoutMenu->addAction( mActionMoveItemsToBottom );

#ifdef Q_WS_MAC
#ifndef Q_WS_MAC64 /* assertion failure in NSMenuItem setSubmenu (Qt 4.5.0-snapshot-20080830) */
menuBar()->addMenu( QgisApp::instance()->windowMenu() );

menuBar()->addMenu( QgisApp::instance()->helpMenu() );
#endif
#endif


// Create action to select this window and add it to Window menu
mWindowAction = new QAction( windowTitle(), this );
connect( mWindowAction, SIGNAL( triggered() ), this, SLOT( activate() ) );
#endif

mQgis = qgis;
mFirstTime = true;
@@ -279,10 +279,8 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
//! To know which item to show if selection changes
QMap<QgsComposerItem*, QWidget*> mItemWidgetMap;

#ifdef Q_WS_MAC
//! Window menu action to select this window
QAction *mWindowAction;
#endif

/**False if first paint already happened (used to create cache of composer maps for screen resolution after reading from project files)*/
bool mFirstPaint;

0 comments on commit 7da03a8

Please sign in to comment.