]> git.sesse.net Git - vlc/commitdiff
qt4: use the christmas icon on the same day (start at day 354)
authorRafaël Carré <rafael.carre@gmail.com>
Fri, 26 Nov 2010 15:52:09 +0000 (16:52 +0100)
committerRafaël Carré <rafael.carre@gmail.com>
Fri, 26 Nov 2010 15:53:06 +0000 (16:53 +0100)
(It was broken by a8e4b30b)

Move the definition to qt4.hpp and add a comment

modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/dialogs/help.cpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.hpp

index c0d6748527d9490f99b1f001f8f7439334705678..8abfb215c7c3eee8dc25a331604866686dabd8ed 100644 (file)
@@ -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" );
index 3fef481ff20cf6f472cd49e01b3f276406abcc22..76a631e79330f67b4c75c628247d0407f724f849 100644 (file)
@@ -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" ) );
index ddf568dfc19cf7e5800da6de340649de547bd536..b7c7147e42da7b811253f60cfcb51e6276ad72d7 100644 (file)
@@ -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" );
index 3f3beec1388a12d63143b613048c38d1c82dbe51..7a82b6faae99d063b79e2138f8064b3f0cb7e302 100644 (file)
@@ -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) );
index 6c42a73e57f40b4fe82585b9acd6a7258cced9dc..6bb7bb7f1208641a7dd0efec73163ba6a16d46cd 100644 (file)
@@ -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