Commit d5a52a3a authored by Ernest E. Teem III's avatar Ernest E. Teem III Committed by Jean-Baptiste Kempf

Qt: option for enabling / disabling changes to its icon

Modified by Jean-Baptiste Kempf, to fit option style
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8acffd0c
......@@ -212,7 +212,7 @@ void BackgroundWidget::updateArt( const QString& url )
}
else
{ /* Xmas joke */
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY )
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )
pixmapUrl = QString( ":/logo/vlc128-xmas.png" );
else
pixmapUrl = QString( ":/logo/vlc128.png" );
......
......@@ -102,7 +102,7 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf)
ui.introduction->setText(
qtr( "VLC media player" ) + qfu( " " VERSION_MESSAGE ) );
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY )
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )
ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-xmas.png" ) );
else
ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128.png" ) );
......
......@@ -942,7 +942,7 @@ void MainInterface::showBuffering( float f_cache )
void MainInterface::createSystray()
{
QIcon iconVLC;
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY )
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )
iconVLC = QIcon( ":/logo/vlc128-xmas.png" );
else
iconVLC = QIcon( ":/logo/vlc128.png" );
......
......@@ -183,6 +183,10 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define QT_PAUSE_MINIMIZED_LONGTEXT N_( \
"With this option enabled, the playback will be automatically paused when minimizing the window." )
#define ICONCHANGE_TEXT N_( "Allow automatic icon changes")
#define ICONCHANGE_LONGTEXT N_( \
"This option allows the interface to change its icon on various occasions.")
/**********************************************************************/
vlc_module_begin ()
set_shortname( "Qt" )
......@@ -274,6 +278,8 @@ vlc_module_begin ()
add_obsolete_bool( "qt-blingbling" ) /* Suppressed since 1.0.0 */
add_obsolete_integer( "qt-display-mode" ) /* Suppressed since 1.1.0 */
add_bool( "qt-icon-change", true, ICONCHANGE_TEXT, ICONCHANGE_LONGTEXT, true )
#ifdef WIN32
cannot_unload_broken_library()
#endif
......@@ -479,7 +485,7 @@ static void *Thread( void *obj )
/* Icon setting, Mac uses icon from .icns */
#ifndef Q_WS_MAC
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY )
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )
app.setWindowIcon( QIcon(vlc_xmas_xpm) );
else
app.setWindowIcon( QIcon(vlc_xpm) );
......
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