vlc | branch: master | Rafaël Carré <[email protected]> | Fri Nov 26 16:52:09 2010 +0100| [7cd0a8ae38e8dc78b9595b3f5f254c79f12633d6] | committer: 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 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7cd0a8ae38e8dc78b9595b3f5f254c79f12633d6 --- modules/gui/qt4/components/interface_widgets.cpp | 3 ++- modules/gui/qt4/dialogs/help.cpp | 3 ++- modules/gui/qt4/main_interface.cpp | 2 +- modules/gui/qt4/qt4.cpp | 2 +- modules/gui/qt4/qt4.hpp | 8 ++++++++ 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index c0d6748..8abfb21 100644 --- a/modules/gui/qt4/components/interface_widgets.cpp +++ b/modules/gui/qt4/components/interface_widgets.cpp @@ -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" ); diff --git a/modules/gui/qt4/dialogs/help.cpp b/modules/gui/qt4/dialogs/help.cpp index 3fef481..76a631e 100644 --- a/modules/gui/qt4/dialogs/help.cpp +++ b/modules/gui/qt4/dialogs/help.cpp @@ -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" ) ); diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index ddf568d..b7c7147 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -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" ); diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 3f3beec..7a82b6f 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -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) ); diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp index 6c42a73..6bb7bb7 100644 --- a/modules/gui/qt4/qt4.hpp +++ b/modules/gui/qt4/qt4.hpp @@ -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 _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
