[QGIS Commit] r11775 - trunk/qgis/src/app/composer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Oct 8 13:13:59 EDT 2009


Author: mhugent
Date: 2009-10-08 13:13:59 -0400 (Thu, 08 Oct 2009)
New Revision: 11775

Modified:
   trunk/qgis/src/app/composer/qgscomposer.cpp
   trunk/qgis/src/app/composer/qgscomposer.h
Log:
Menu bar for composer also on platforms != mac. Fixes bug 1668

Modified: trunk/qgis/src/app/composer/qgscomposer.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.cpp	2009-10-08 16:59:08 UTC (rev 11774)
+++ trunk/qgis/src/app/composer/qgscomposer.cpp	2009-10-08 17:13:59 UTC (rev 11775)
@@ -116,7 +116,6 @@
   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 @@
   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 @@
   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 @@
   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;

Modified: trunk/qgis/src/app/composer/qgscomposer.h
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.h	2009-10-08 16:59:08 UTC (rev 11774)
+++ trunk/qgis/src/app/composer/qgscomposer.h	2009-10-08 17:13:59 UTC (rev 11775)
@@ -279,10 +279,8 @@
     //! 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;



More information about the QGIS-commit mailing list