1 change: 1 addition & 0 deletions images/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
<file>themes/default/locked.svg</file>
<file>themes/default/mAction.svg</file>
<file>themes/default/mActionAdd.png</file>
<file>themes/default/mActionAdd.svg</file>
<file>themes/default/mActionAddAllToOverview.svg</file>
<file>themes/default/mActionAddArrow.png</file>
<file>themes/default/mActionAddBasicShape.png</file>
Expand Down
198 changes: 198 additions & 0 deletions images/themes/default/mActionAdd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/app/qgsbrowserdockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ QgsBrowserDockWidget::QgsBrowserDockWidget( QString name, QWidget * parent ) :
mBrowserView = new QgsBrowserTreeView( this );
mLayoutBrowser->addWidget( mBrowserView );

mBtnRefresh->setIcon( QgsApplication::getThemeIcon( "mActionRefresh.png" ) );
mBtnAddLayers->setIcon( QgsApplication::getThemeIcon( "mActionAdd.png" ) );
mBtnRefresh->setIcon( QgsApplication::getThemeIcon( "mActionDraw.svg" ) );
mBtnAddLayers->setIcon( QgsApplication::getThemeIcon( "mActionAdd.svg" ) );
mBtnCollapse->setIcon( QgsApplication::getThemeIcon( "mActionCollapseTree.png" ) );

mWidgetFilter->hide();
Expand Down
10 changes: 8 additions & 2 deletions src/plugins/compass/qgscompassplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,21 @@ void QgsCompassPlugin::unload()
mQGisIface->removePluginMenu( sName, mActionAboutCompass );

delete mActionRunCompass;
mActionRunCompass = 0;
delete mActionAboutCompass;
mActionAboutCompass = 0;
delete mDock;
mDock = 0;
}

//! Set icons to the current theme
void QgsCompassPlugin::setCurrentTheme( QString )
{
mActionRunCompass->setIcon( getThemeIcon( "/mCompassRun.png" ) );
mActionAboutCompass->setIcon( getThemeIcon( "/mActionAbout.png" ) );
if ( mActionRunCompass && mActionAboutCompass )
{
mActionRunCompass->setIcon( getThemeIcon( "/mCompassRun.png" ) );
mActionAboutCompass->setIcon( getThemeIcon( "/mActionAbout.png" ) );
}
}

QIcon QgsCompassPlugin::getThemeIcon( const QString &theName )
Expand Down
32 changes: 18 additions & 14 deletions src/plugins/dxf2shp_converter/dxf2shpconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ void dxf2shpConverter::unload()
mQGisIface->removePluginVectorMenu( tr( "&Dxf2Shp" ), mQActionPointer );
mQGisIface->removeVectorToolBarIcon( mQActionPointer );
delete mQActionPointer;
mQActionPointer = 0;
}

void dxf2shpConverter::addMyLayer( QString myfname, QString mytitle )
Expand All @@ -129,21 +130,24 @@ void dxf2shpConverter::setCurrentTheme( QString theThemeName )
QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/dxf2shp_converter.png";
QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/dxf2shp_converter.png";
QString myQrcPath = ":/dxf2shp_converter.png";
if ( QFile::exists( myCurThemePath ) )
if ( mQActionPointer )
{
mQActionPointer->setIcon( QIcon( myCurThemePath ) );
}
else if ( QFile::exists( myDefThemePath ) )
{
mQActionPointer->setIcon( QIcon( myDefThemePath ) );
}
else if ( QFile::exists( myQrcPath ) )
{
mQActionPointer->setIcon( QIcon( myQrcPath ) );
}
else
{
mQActionPointer->setIcon( QIcon() );
if ( QFile::exists( myCurThemePath ) )
{
mQActionPointer->setIcon( QIcon( myCurThemePath ) );
}
else if ( QFile::exists( myDefThemePath ) )
{
mQActionPointer->setIcon( QIcon( myDefThemePath ) );
}
else if ( QFile::exists( myQrcPath ) )
{
mQActionPointer->setIcon( QIcon( myQrcPath ) );
}
else
{
mQActionPointer->setIcon( QIcon() );
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/plugins/georeferencer/qgsgeorefplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ void QgsGeorefPlugin::unload()
mQGisIface->removeRasterToolBarIcon( mActionRunGeoref );

delete mActionRunGeoref;
mActionRunGeoref = 0;

delete mPluginGui;
mPluginGui = NULL;
Expand All @@ -133,7 +134,8 @@ void QgsGeorefPlugin::unload()
//! Set icons to the current theme
void QgsGeorefPlugin::setCurrentTheme( QString )
{
mActionRunGeoref->setIcon( getThemeIcon( "/mGeorefRun.png" ) );
if ( mActionRunGeoref )
mActionRunGeoref->setIcon( getThemeIcon( "/mGeorefRun.png" ) );
}

QIcon QgsGeorefPlugin::getThemeIcon( const QString &theName )
Expand Down
40 changes: 22 additions & 18 deletions src/plugins/gps_importer/qgsgpsplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ void QgsGPSPlugin::unload()
mQGisInterface->removePluginVectorMenu( tr( "&GPS" ), mQActionPointer );
mQGisInterface->removeVectorToolBarIcon( mQActionPointer );
delete mQActionPointer;
mQActionPointer = 0;
}

void QgsGPSPlugin::loadGPXFile( QString fileName, bool loadWaypoints, bool loadRoutes,
Expand Down Expand Up @@ -665,25 +666,28 @@ void QgsGPSPlugin::setCurrentTheme( QString theThemeName )
QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/gps_importer/";
QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/gps_importer/";
QString myQrcPath = ":/";
if ( QFile::exists( myCurThemePath ) )
if ( mQActionPointer )
{
mQActionPointer->setIcon( QIcon( myCurThemePath + "import_gpx.png" ) );
mCreateGPXAction->setIcon( QIcon( myCurThemePath + "create_gpx.png" ) );
}
else if ( QFile::exists( myDefThemePath ) )
{
mQActionPointer->setIcon( QIcon( myDefThemePath + "import_gpx.png" ) );
mCreateGPXAction->setIcon( QIcon( myDefThemePath + "create_gpx.png" ) );
}
else if ( QFile::exists( myQrcPath ) )
{
mQActionPointer->setIcon( QIcon( myQrcPath + "import_gpx.png" ) );
mCreateGPXAction->setIcon( QIcon( myQrcPath + "create_gpx.png" ) );
}
else
{
mQActionPointer->setIcon( QIcon() );
mCreateGPXAction->setIcon( QIcon() );
if ( QFile::exists( myCurThemePath ) )
{
mQActionPointer->setIcon( QIcon( myCurThemePath + "import_gpx.png" ) );
mCreateGPXAction->setIcon( QIcon( myCurThemePath + "create_gpx.png" ) );
}
else if ( QFile::exists( myDefThemePath ) )
{
mQActionPointer->setIcon( QIcon( myDefThemePath + "import_gpx.png" ) );
mCreateGPXAction->setIcon( QIcon( myDefThemePath + "create_gpx.png" ) );
}
else if ( QFile::exists( myQrcPath ) )
{
mQActionPointer->setIcon( QIcon( myQrcPath + "import_gpx.png" ) );
mCreateGPXAction->setIcon( QIcon( myQrcPath + "create_gpx.png" ) );
}
else
{
mQActionPointer->setIcon( QIcon() );
mCreateGPXAction->setIcon( QIcon() );
}
}
}

Expand Down
Loading