Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
make december postfix translatable
  • Loading branch information
jef-n committed Dec 4, 2015
1 parent fc7fea5 commit f210fc7
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/app/main.cpp
Expand Up @@ -752,7 +752,7 @@ int main( int argc, char *argv[] )

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

//
Expand Down
11 changes: 1 addition & 10 deletions src/app/qgsabout.cpp
Expand Up @@ -72,16 +72,7 @@ void QgsAbout::init()
connect( developersMapView, SIGNAL( linkClicked( const QUrl & ) ), this, SLOT( openUrl( const QUrl & ) ) );

// set the 60x60 icon pixmap
QPixmap icon;
if ( QDate::currentDate().month() == 12 )
{
icon.load( QgsApplication::iconsPath() + "qgis-icon-60x60_xmas.png" );
}
else
{
icon.load( QgsApplication::iconsPath() + "qgis-icon-60x60.png" );
}
qgisIcon->setPixmap( icon );
qgisIcon->setPixmap( QPixmap( QgsApplication::appIconPath() ) );

//read the authors file to populate the svn committers list
QStringList lines;
Expand Down
5 changes: 1 addition & 4 deletions src/app/qgssponsors.cpp
Expand Up @@ -38,9 +38,6 @@ QgsSponsors::~QgsSponsors()

void QgsSponsors::init()
{

// set the 60x60 icon pixmap
QPixmap icon( QgsApplication::iconsPath() + "qgis-icon-60x60.png" );
qgisIcon->setPixmap( icon );

qgisIcon->setPixmap( QPixmap( QgsApplication::appIconPath() ) );
}
3 changes: 1 addition & 2 deletions src/app/qgstipgui.cpp
Expand Up @@ -64,8 +64,7 @@ void QgsTipGui::showTip( QgsTip myTip )
// once Qt 4.6 is the minimum required version for building QGIS.
//
QString content = "<img src='"
+ QgsApplication::iconsPath()
+ "qgis-icon-60x60.png"
+ QgsApplication::appIconPath()
+ "' style='float:left;'>"
+ "<h2>"
+ myTip.title()
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgsapplication.cpp
Expand Up @@ -382,6 +382,10 @@ QString QgsApplication::activeThemePath()
return userThemesFolder() + QDir::separator() + themeName() + QDir::separator() + "icons/";
}

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

QString QgsApplication::iconPath( const QString& iconFile )
{
Expand Down
3 changes: 3 additions & 0 deletions src/core/qgsapplication.h
Expand Up @@ -232,6 +232,9 @@ class CORE_EXPORT QgsApplication : public QApplication
//! deletes provider registry and map layer registry
static void exitQgis();

//! get application icon
static QString appIconPath();

/** Constants for endian-ness */
enum endian_t
{
Expand Down

0 comments on commit f210fc7

Please sign in to comment.