+
+/* Handle the events */
+void UpdateDialog::customEvent( QEvent *event )
+{
+ if( event->type() == UDOkEvent )
+ updateNotify( true );
+ else
+ updateNotify( false );
+}
+
+/* Notify the end of the update_Check */
+void UpdateDialog::updateNotify( bool b_result )
+{
+ /* The update finish without errors */
+ if( b_result )
+ {
+ if( update_NeedUpgrade( p_update ) )
+ {
+ update_release_t *p_release = update_GetRelease( p_update );
+ assert( p_release );
+ b_checked = true;
+ updateButton->setText( qtr( "&Yes" ) );
+ QString message = qtr( "A new version of VLC(" )
+ + QString::number( p_release->i_major ) + "."
+ + QString::number( p_release->i_minor ) + "."
+ + QString::number( p_release->i_revision );
+ if( p_release->extra )
+ message += p_release->extra;
+ message += qtr( ") is available.");
+ updateLabelTop->setText( message );
+
+ updateText->setText( qfu( p_release->psz_desc ) );
+ updateText->setEnabled( true );
+
+ updateLabelDown->show();
+
+ /* Force the dialog to be shown */
+ this->show();
+ }
+ else
+ updateLabelTop->setText(
+ qtr( "You have the latest version of VLC media player." ) );
+ }
+ else
+ updateLabelTop->setText(
+ qtr( "An error occurred while checking for updates..." ) );
+
+ updateButton->setEnabled( true );
+}
+
+#endif
+