3 changes: 2 additions & 1 deletion images/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@
<file>themes/gis/plugins/copyright_label.png</file>
<file>themes/gis/plugins/delimited_text.png</file>
<file>themes/gis/plugins/dxf2shp_converter.png</file>
<file>themes/gis/plugins/gps_importer.png</file>
<file>themes/gis/plugins/gps_importer/create_gpx.png</file>
<file>themes/gis/plugins/gps_importer/import_gpx.png</file>
<file>themes/gis/plugins/interpolation.png</file>
<file>themes/gis/plugins/mapserver_export.png</file>
<file>themes/gis/plugins/mGeorefRun.png</file>
Expand Down
1 change: 1 addition & 0 deletions images/themes/gis/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ADD_SUBDIRECTORY(coordinate_capture)
ADD_SUBDIRECTORY(gps_importer)

FILE (GLOB IMAGES *.png)

Expand Down
4 changes: 4 additions & 0 deletions images/themes/gis/plugins/gps_importer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FILE (GLOB IMAGES *.png)

INSTALL (FILES ${IMAGES}
DESTINATION ${QGIS_DATA_DIR}/themes/gis/plugins/gps_importer)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions python/gui/qgisinterface.sip
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ class QgisInterface : QObject
virtual QMenu *editMenu() = 0;
virtual QMenu *viewMenu() = 0;
virtual QMenu *layerMenu() = 0;
/** \note added in 2.0
*/
virtual QMenu *newLayerMenu() = 0;
virtual QMenu *settingsMenu() = 0;
virtual QMenu *pluginMenu() = 0;
virtual QMenu *rasterMenu() = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
QMenu *editMenu() { return mEditMenu; }
QMenu *viewMenu() { return mViewMenu; }
QMenu *layerMenu() { return mLayerMenu; }
//! @note added in 2.0
QMenu *newLayerMenu() { return mNewLayerMenu; }
QMenu *settingsMenu() { return mSettingsMenu; }
QMenu *pluginMenu() { return mPluginMenu; }
QMenu *databaseMenu() { return mDatabaseMenu; }
Expand Down
1 change: 1 addition & 0 deletions src/app/qgisappinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ QMenu *QgisAppInterface::fileMenu() { return qgis->fileMenu(); }
QMenu *QgisAppInterface::editMenu() { return qgis->editMenu(); }
QMenu *QgisAppInterface::viewMenu() { return qgis->viewMenu(); }
QMenu *QgisAppInterface::layerMenu() { return qgis->layerMenu(); }
QMenu *QgisAppInterface::newLayerMenu() { return qgis->newLayerMenu(); }
QMenu *QgisAppInterface::settingsMenu() { return qgis->settingsMenu(); }
QMenu *QgisAppInterface::pluginMenu() { return qgis->pluginMenu(); }
QMenu *QgisAppInterface::rasterMenu() { return qgis->rasterMenu(); }
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgisappinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ class QgisAppInterface : public QgisInterface
virtual QMenu *editMenu();
virtual QMenu *viewMenu();
virtual QMenu *layerMenu();
//! @note added in 2.0
virtual QMenu *newLayerMenu();
virtual QMenu *settingsMenu();
virtual QMenu *pluginMenu();
virtual QMenu *rasterMenu();
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgisinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ class GUI_EXPORT QgisInterface : public QObject
virtual QMenu *editMenu() = 0;
virtual QMenu *viewMenu() = 0;
virtual QMenu *layerMenu() = 0;
/** \note added in 2.0
*/
virtual QMenu *newLayerMenu() = 0;
virtual QMenu *settingsMenu() = 0;
virtual QMenu *pluginMenu() = 0;
virtual QMenu *rasterMenu() = 0;
Expand Down
11 changes: 6 additions & 5 deletions src/plugins/gps_importer/qgsgpsplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <QMessageBox>
#include <QAction>
#include <QFile>
#include <QMenu>
#include <QToolBar>
#include <QProcess>
#include <QProgressDialog>
Expand Down Expand Up @@ -95,7 +96,7 @@ void QgsGPSPlugin::initGui()
connect( mCreateGPXAction, SIGNAL( triggered() ), this, SLOT( createGPX() ) );

mQGisInterface->layerToolBar()->addAction( mCreateGPXAction );
mQGisInterface->insertAddLayerAction( mCreateGPXAction );
mQGisInterface->newLayerMenu()->addAction( mCreateGPXAction );
mQGisInterface->addPluginToVectorMenu( tr( "&GPS" ), mQActionPointer );
mQGisInterface->addVectorToolBarIcon( mQActionPointer );

Expand Down Expand Up @@ -206,7 +207,7 @@ void QgsGPSPlugin::unload()
{
// remove the GUI
mQGisInterface->layerToolBar()->removeAction( mCreateGPXAction );
mQGisInterface->removeAddLayerAction( mCreateGPXAction );
mQGisInterface->newLayerMenu()->removeAction( mCreateGPXAction );
mQGisInterface->removePluginVectorMenu( tr( "&GPS" ), mQActionPointer );
mQGisInterface->removeVectorToolBarIcon( mQActionPointer );
delete mQActionPointer;
Expand Down Expand Up @@ -661,13 +662,13 @@ void QgsGPSPlugin::setupBabel()
void QgsGPSPlugin::setCurrentTheme( QString theThemeName )
{
Q_UNUSED( theThemeName );
QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/gps_importer.png";
QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/gps_importer/";
QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/gps_importer.png";
QString myQrcPath = ":/gps_importer.png";
if ( QFile::exists( myCurThemePath ) )
{
mQActionPointer->setIcon( QIcon( myCurThemePath ) );
mCreateGPXAction->setIcon( QIcon( myCurThemePath ) );
mQActionPointer->setIcon( QIcon( myCurThemePath + "import_gpx.png" ) );
mCreateGPXAction->setIcon( QIcon( myCurThemePath + "create_gpx.png" ) );
}
else if ( QFile::exists( myDefThemePath ) )
{
Expand Down
32 changes: 16 additions & 16 deletions src/ui/qgisapp.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<x>0</x>
<y>0</y>
<width>1052</width>
<height>25</height>
<height>24</height>
</rect>
</property>
<widget class="QMenu" name="mEditMenu">
Expand Down Expand Up @@ -140,14 +140,14 @@
<property name="title">
<string>&amp;Layer</string>
</property>
<widget class="QMenu" name="menuNew">
<widget class="QMenu" name="mNewLayerMenu">
<property name="title">
<string>New</string>
</property>
<addaction name="mActionNewVectorLayer"/>
<addaction name="mActionNewSpatialiteLayer"/>
</widget>
<addaction name="menuNew"/>
<addaction name="mNewLayerMenu"/>
<addaction name="mActionEmbedLayers"/>
<addaction name="mActionAddOgrLayer"/>
<addaction name="mActionAddRasterLayer"/>
Expand Down Expand Up @@ -1970,19 +1970,19 @@ Acts on currently active editable layer</string>
</property>
</action>
<action name="mActionRotateFeature">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionRotateFeature.png</normaloff>:/images/themes/default/mActionRotateFeature.png</iconset>
</property>
<property name="text">
<string>Rotate Feature(s)</string>
</property>
<property name="toolTip">
<string>Rotate Feature(s)</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionRotateFeature.png</normaloff>:/images/themes/default/mActionRotateFeature.png</iconset>
</property>
<property name="text">
<string>Rotate Feature(s)</string>
</property>
<property name="toolTip">
<string>Rotate Feature(s)</string>
</property>
</action>
</widget>
<resources>
Expand Down