Archivo

Archivos del Autor

Sobre VLC y su ícono navideño

Viernes, 25 de Diciembre de 2009

VLC también se prepara para estas navidades

VLC también se prepara para estas navidades

He visto a mucha gente con cierta paranoia con respecto a VLC, ya que esta última semana su logo cambió y ahora tiene un gorro de Santa, hay quienes dicen que la gente de VLC nos espía y que modifica el programa a su antojo, pero gracias a FSM VLC es libre y podemos descargarnos y revisar su código fuente, para lo que nos interesa tenemos 4 archivos donde podemos observar lo siguiente:

main_interface.cpp

/**
* Create a SystemTray icon and a menu that would go with it.
* Connects to a click handler on the icon.
**/
void MainInterface::createSystray() {
  QIcon iconVLC;
   if( QDate::currentDate().dayOfYear() >= 354 )
     iconVLC =  QIcon( QPixmap( “:/vlc128-christmas.png” ) );
  else
    iconVLC =  QIcon( QPixmap( “:/vlc128.png” ) );
...
  CONNECT( sysTray, activated( QSystemTrayIcon::ActivationReason ), this, handleSystrayClick( SystemTrayIcon::ActivationReason ) );
}

interface_widgets.cpp

...
 if( QDate::currentDate().dayOfYear() >= 354 )
 label->setPixmap( QPixmap( “:/vlc128-christmas.png” ) );
else
label->setPixmap( QPixmap( “:/vlc128.png” ) );
...
CONNECT( THEMIM->getIM(), artChanged( QString ),
this, updateArt( const QString& ) );
}

help.cpp

AboutDialog::AboutDialog( QWidget *parent, intf_thread_t *_p_intf)
: QVLCDialog( parent, _p_intf ){
...
QLabel *iconVLC2 = new QLabel;
 if( QDate::currentDate().dayOfYear() >= 354 )
 iconVLC2->setPixmap( QPixmap( “:/vlc128-christmas.png” ) );
else
iconVLC2->setPixmap( QPixmap( “:/vlc128.png” ) );
...
BUTTONACT( closeButton, close() );
}

qt4.cpp

...
 /* Icon setting */
    if( QDate::currentDate().dayOfYear() >= 352 ) /* One Week before Xmas */
        app.setWindowIcon( QIcon( QPixmap(vlc_christmas_xpm) ) );
    else
        app.setWindowIcon( QIcon( QPixmap(vlc_xpm) ) );
...

esto quiere decir que una semana antes de navidad el sistema cambiará automáticamente su ícono por uno navideño, por cierto si no me creen pueden descargar el código funte desde acá

General