Support for themes in grass toolbox fix

git-svn-id: http://svn.osgeo.org/qgis/branches/Version-1_0@9873 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
borysiasty 2008-12-20 13:32:17 +00:00
parent b5f462a9f3
commit aeb7f650ce

View File

@ -37,6 +37,7 @@
#include "qgsvectorlayer.h"
#include <QAction>
#include <QDir>
#include <QFileInfo>
#include <QMessageBox>
#include <QSettings>
@ -798,8 +799,8 @@ void QgsGrassPlugin::unload()
// the GRASS plugin resource bundle [TS]
QIcon QgsGrassPlugin::getThemeIcon( const QString theName )
{
QString myPath = ":/" + QgsApplication::themeName() + "/grass/" + theName;
QString myDefaultPath = ":/default/grass/" + theName;
QString myPath = QgsApplication::activeThemePath() + QDir::separator() + "grass" + QDir::separator() + theName;
QString myDefaultPath = QgsApplication::defaultThemePath() + QDir::separator() + "grass" + QDir::separator() + theName;
if ( QFile::exists( myPath ) )
{
return QIcon( myPath );