]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/help.cpp
Qt(Dialog provider): Add support for key accelerators
[vlc] / modules / gui / qt4 / dialogs / help.cpp
index 19c404df4019cdd1368a8f7a1cb156c641bf115b..453753b28a4b397fb5afed3a3f626a243a4b381c 100644 (file)
@@ -88,6 +88,12 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf)
     setWindowModality( Qt::WindowModal );
 
     ui.version->setText(qfu( " " VERSION_MESSAGE ) );
+    ui.title->setText("<html><head/><body><p><span style=\" font-size:26pt; color:#353535;\"> " + qtr( "VLC media player" ) + " </span></p></body></html>");
+
+    ui.MainBlabla->setText("<html><head/><body>" +
+    qtr( "<p>VLC media player is a free and open source media player, encoder, and streamer made by the volunteers of the <a href=\"http://www.videolan.org/\"><span style=\" text-decoration: underline; color:#0057ae;\">VideoLAN</span></a> community.</p><p>VLC uses its internal codecs, works on essentially every popular platform, and can read almost all files, CDs, DVDs, network streams, capture cards and other media formats!</p><p><a href=\"http://www.videolan.org/contribute/\"><span style=\" text-decoration: underline; color:#0057ae;\">Help and join us!</span></a>" ) +
+    "</p></body> </html>");
+
 #if 0
     if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )
         ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-xmas.png" ) );
@@ -110,9 +116,14 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf)
     /* People who wrote the software */
     ui.authorsPage->setText( qfu( psz_authors ) );
 
-    BUTTONACT(ui.licenseButton, showLicense() );
-    BUTTONACT(ui.authorsButton, showAuthors() );
-    BUTTONACT(ui.creditsButton,  showCredit() );
+    ui.licenseButton->setText( "<html><head/><body><p><span style=\" text-decoration: underline; color:#0057ae;\">"+qtr( "License" )+"</span></p></body></html>");
+    ui.licenseButton->installEventFilter( this );
+
+    ui.authorsButton->setText( "<html><head/><body><p><span style=\" text-decoration: underline; color:#0057ae;\">"+qtr( "Authors" )+"</span></p></body></html>");
+    ui.authorsButton->installEventFilter( this );
+
+    ui.creditsButton->setText( "<html><head/><body><p><span style=\" text-decoration: underline; color:#0057ae;\">"+qtr( "Credits" )+"</span></p></body></html>");
+    ui.creditsButton->installEventFilter( this );
 
     ui.version->installEventFilter( this );
 }
@@ -134,14 +145,14 @@ void AboutDialog::showCredit()
 
 bool AboutDialog::eventFilter(QObject *obj, QEvent *event)
 {
-    if( obj == ui.version )
+    if (event->type() == QEvent::MouseButtonPress )
     {
-        if (event->type() == QEvent::MouseButtonPress )
+        if( obj == ui.version )
         {
             if( !b_advanced )
             {
                 ui.version->setText(qfu( VLC_CompileBy() )+ "@" + qfu( VLC_CompileHost() )
-                    + __DATE__ + " " +__TIME__);
+                    + " " + __DATE__ + " " + __TIME__);
                 b_advanced = true;
             }
             else
@@ -151,11 +162,25 @@ bool AboutDialog::eventFilter(QObject *obj, QEvent *event)
             }
             return true;
         }
+        else if( obj == ui.licenseButton )
+            showLicense();
+        else if( obj == ui.authorsButton )
+            showAuthors();
+        else if( obj == ui.creditsButton )
+            showCredit();
+
         return false;
     }
 
     return QVLCDialog::eventFilter( obj, event);
 }
+
+void AboutDialog::showEvent( QShowEvent *event )
+{
+    ui.stackedWidget->setCurrentWidget( ui.blablaPage );
+    QVLCDialog::showEvent( event );
+}
+
 #ifdef UPDATE_CHECK
 
 /*****************************************************************************