Commit 7cd0a8ae authored by Rafaël Carré's avatar Rafaël Carré

qt4: use the christmas icon on the same day (start at day 354)

(It was broken by a8e4b30b)

Move the definition to qt4.hpp and add a comment
parent 8cb745bf
......@@ -28,6 +28,7 @@
# include "config.h"
#endif
#include "qt4.hpp"
#include "components/interface_widgets.hpp"
#include "dialogs_provider.hpp"
#include "util/customwidgets.hpp" // qtEventToVLCKey, QVLCStackedWidget
......@@ -211,7 +212,7 @@ void BackgroundWidget::updateArt( const QString& url )
}
else
{ /* Xmas joke */
if( QDate::currentDate().dayOfYear() >= 354 )
if( QDate::currentDate().dayOfYear() >= QT_CHRISTMAS_TROLL_DAY )
pixmapUrl = QString( ":/logo/vlc128-christmas.png" );
else
pixmapUrl = QString( ":/logo/vlc128.png" );
......
......@@ -26,6 +26,7 @@
# include "config.h"
#endif
#include "qt4.hpp"
#include "dialogs/help.hpp"
#include "util/qt_dirs.hpp"
......@@ -101,7 +102,7 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf)
ui.introduction->setText(
qtr( "VLC media player" ) + qfu( " " VERSION_MESSAGE ) );
if( QDate::currentDate().dayOfYear() >= 354 )
if( QDate::currentDate().dayOfYear() >= QT_CHRISTMAS_TROLL_DAY )
ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-christmas.png" ) );
else
ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128.png" ) );
......
......@@ -935,7 +935,7 @@ void MainInterface::showBuffering( float f_cache )
void MainInterface::createSystray()
{
QIcon iconVLC;
if( QDate::currentDate().dayOfYear() >= 354 )
if( QDate::currentDate().dayOfYear() >= QT_CHRISTMAS_TROLL_DAY )
iconVLC = QIcon( ":/logo/vlc128-christmas.png" );
else
iconVLC = QIcon( ":/logo/vlc128.png" );
......
......@@ -446,7 +446,7 @@ static void *Thread( void *obj )
/* Icon setting, Mac uses icon from .icns */
#ifndef Q_WS_MAC
if( QDate::currentDate().dayOfYear() >= 352 ) /* One Week before Xmas */
if( QDate::currentDate().dayOfYear() >= QT_CHRISTMAS_TROLL_DAY )
app.setWindowIcon( QIcon(vlc_christmas_xpm) );
else
app.setWindowIcon( QIcon(vlc_xpm) );
......
......@@ -129,4 +129,12 @@ static inline QString QVLCUserDir( vlc_userdir_t type )
return res;
}
/* After this day of the year, the usual VLC cone is replaced by another cone
* wearing a Santa hat.
* Warning: can panic users (virus changed my icons!!), and cause religious
* trolls (VLC is a supporter of catholicism!!)
* Note, this icon doesn't represent an endorsment of Coca-Cola company
*/
#define QT_CHRISTMAS_TROLL_DAY 354
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment