Skip to content

Commit f210fc7

Browse files
committed
make december postfix translatable
1 parent fc7fea5 commit f210fc7

6 files changed

+11
-17
lines changed

src/app/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ int main( int argc, char *argv[] )
752752

753753
// (if Windows/Mac, use icon from resource)
754754
#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
755-
myApp.setWindowIcon( QIcon( QgsApplication::iconsPath() + "qgis-icon-60x60.png" ) );
755+
myApp.setWindowIcon( QIcon( QgsApplication::appIconPath() ) );
756756
#endif
757757

758758
//

src/app/qgsabout.cpp

+1-10
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,7 @@ void QgsAbout::init()
7272
connect( developersMapView, SIGNAL( linkClicked( const QUrl & ) ), this, SLOT( openUrl( const QUrl & ) ) );
7373

7474
// set the 60x60 icon pixmap
75-
QPixmap icon;
76-
if ( QDate::currentDate().month() == 12 )
77-
{
78-
icon.load( QgsApplication::iconsPath() + "qgis-icon-60x60_xmas.png" );
79-
}
80-
else
81-
{
82-
icon.load( QgsApplication::iconsPath() + "qgis-icon-60x60.png" );
83-
}
84-
qgisIcon->setPixmap( icon );
75+
qgisIcon->setPixmap( QPixmap( QgsApplication::appIconPath() ) );
8576

8677
//read the authors file to populate the svn committers list
8778
QStringList lines;

src/app/qgssponsors.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ QgsSponsors::~QgsSponsors()
3838

3939
void QgsSponsors::init()
4040
{
41-
4241
// set the 60x60 icon pixmap
43-
QPixmap icon( QgsApplication::iconsPath() + "qgis-icon-60x60.png" );
44-
qgisIcon->setPixmap( icon );
45-
42+
qgisIcon->setPixmap( QPixmap( QgsApplication::appIconPath() ) );
4643
}

src/app/qgstipgui.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ void QgsTipGui::showTip( QgsTip myTip )
6464
// once Qt 4.6 is the minimum required version for building QGIS.
6565
//
6666
QString content = "<img src='"
67-
+ QgsApplication::iconsPath()
68-
+ "qgis-icon-60x60.png"
67+
+ QgsApplication::appIconPath()
6968
+ "' style='float:left;'>"
7069
+ "<h2>"
7170
+ myTip.title()

src/core/qgsapplication.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,10 @@ QString QgsApplication::activeThemePath()
382382
return userThemesFolder() + QDir::separator() + themeName() + QDir::separator() + "icons/";
383383
}
384384

385+
QString QgsApplication::appIconPath()
386+
{
387+
return iconsPath() + ( QDate::currentDate().month() == 12 ? tr( "qgis-icon-60x60_xmas.png", "December application icon" ) : QString( "qgis-icon-60x60.png" ) );
388+
}
385389

386390
QString QgsApplication::iconPath( const QString& iconFile )
387391
{

src/core/qgsapplication.h

+3
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ class CORE_EXPORT QgsApplication : public QApplication
232232
//! deletes provider registry and map layer registry
233233
static void exitQgis();
234234

235+
//! get application icon
236+
static QString appIconPath();
237+
235238
/** Constants for endian-ness */
236239
enum endian_t
237240
{

0 commit comments

Comments
 (0)