Skip to content

Commit 5bfbbb7

Browse files
author
wonder
committed
added icon for plugin installer in plugin manager
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10434 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 84435e6 commit 5bfbbb7

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

images/themes/default/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ FILE (GLOB IMAGES *.png)
33

44
INSTALL (FILES ${IMAGES}
55
DESTINATION ${QGIS_DATA_DIR}/themes/default)
6+
7+
FILE (GLOB PLUG_IMAGES plugins/*.png)
8+
9+
INSTALL (FILES ${PLUG_IMAGES} DESTINATION ${QGIS_DATA_DIR}/themes/default/plugins)
Loading

src/app/qgspluginmanager.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <qgsdetaileditemdata.h>
4141

4242
#include <qgspythonutils.h>
43+
#include "qgsapplication.h"
4344
#include "qgslogger.h"
4445

4546
#define TESTLIB
@@ -94,6 +95,18 @@ QgsPluginManager::QgsPluginManager( QgsPythonUtils* pythonUtils, QWidget * paren
9495

9596
qRegisterMetaType<QgsDetailedItemData>();
9697

98+
// add installer's icon
99+
QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/plugin_installer.png";
100+
QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/plugin_installer.png";
101+
if ( QFile::exists( myCurThemePath ) )
102+
{
103+
btnPluginInstaller->setIcon( QIcon( myCurThemePath ) );
104+
}
105+
else if ( QFile::exists( myDefThemePath ) )
106+
{
107+
btnPluginInstaller->setIcon( QIcon( myDefThemePath ) );
108+
}
109+
97110
// check for plugin installer
98111
if (checkForPluginInstaller())
99112
{

0 commit comments

Comments
 (0)