@@ -96,16 +96,15 @@ def initGui( self ):
9696
9797 if rasterMenu == None :
9898 # no Raster menu, create and insert it before the Help menu
99- self .menu = QMenu ()
100- self .menu .setTitle ( rasterText )
99+ self .menu = QMenu ( rasterText , self .iface .mainWindow () )
101100 lastAction = actions [ len ( actions ) - 1 ]
102101 menu_bar .insertMenu ( lastAction , self .menu )
103102 else :
104103 self .menu = rasterMenu
105104 self .menu .addSeparator ()
106105
107106 # projections menu (Warp (Reproject), Assign projection)
108- self .projectionsMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Projections" ) )
107+ self .projectionsMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Projections" ), self . iface . mainWindow () )
109108
110109 self .warp = QAction ( QIcon (":/icons/warp.png" ), QCoreApplication .translate ( "GdalTools" , "Warp (Reproject)" ), self .iface .mainWindow () )
111110 self .warp .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Warp an image into a new coordinate system" ) )
@@ -122,7 +121,7 @@ def initGui( self ):
122121 self .projectionsMenu .addActions ( [ self .warp , self .projection , self .extractProj ] )
123122
124123 # conversion menu (Rasterize (Vector to raster), Polygonize (Raster to vector), Translate, RGB to PCT, PCT to RGB)
125- self .conversionMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Conversion" ) )
124+ self .conversionMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Conversion" ), self . iface . mainWindow () )
126125
127126 if self .GdalVersion >= "1.3" :
128127 self .rasterize = QAction ( QIcon (":/icons/rasterize.png" ), QCoreApplication .translate ( "GdalTools" , "Rasterize (Vector to raster)" ), self .iface .mainWindow () )
@@ -151,7 +150,7 @@ def initGui( self ):
151150 self .conversionMenu .addActions ( [ self .translate , self .paletted , self .rgb ] )
152151
153152 # extraction menu (Clipper, Contour)
154- self .extractionMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Extraction" ) )
153+ self .extractionMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Extraction" ), self . iface . mainWindow () )
155154
156155 if self .GdalVersion >= "1.6" :
157156 self .contour = QAction ( QIcon (":/icons/contour.png" ), QCoreApplication .translate ( "GdalTools" , "Contour" ), self .iface .mainWindow () )
@@ -166,7 +165,7 @@ def initGui( self ):
166165 self .extractionMenu .addActions ( [ self .clipper ] )
167166
168167 # analysis menu (DEM (Terrain model), Grid (Interpolation), Near black, Proximity (Raster distance), Sieve)
169- self .analysisMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Analysis" ) )
168+ self .analysisMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Analysis" ), self . iface . mainWindow () )
170169
171170 if self .GdalVersion >= "1.6" :
172171 self .sieve = QAction ( QIcon (":/icons/sieve.png" ), QCoreApplication .translate ( "GdalTools" , "Sieve" ), self .iface .mainWindow () )
@@ -207,7 +206,7 @@ def initGui( self ):
207206 #self.analysisMenu.addActions( [ ] )
208207
209208 # miscellaneous menu (Build overviews (Pyramids), Tile index, Information, Merge, Build Virtual Raster (Catalog))
210- self .miscellaneousMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Miscellaneous" ) )
209+ self .miscellaneousMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Miscellaneous" ), self . iface . mainWindow () )
211210
212211 if self .GdalVersion >= "1.6" :
213212 self .buildVRT = QAction ( QIcon (":/icons/vrt.png" ), QCoreApplication .translate ( "GdalTools" , "Build Virtual Raster (Catalog)" ), self .iface .mainWindow () )
0 commit comments