+/* 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( "Download" );
+ updateLabel->setText( qtr( "There is a new version of VLC :\n" )
+ + qfu( p_release->psz_desc ) );
+
+ /* Force the dialog to be shown */
+ this->show();
+ }
+ else
+ updateLabel->setText( qtr( "You have the latest version of VLC" ) );
+ }
+ else
+ updateLabel->setText(
+ qtr( "An error occurred while checking for updates" ) );
+
+ adjustSize();
+ updateButton->setEnabled( true );
+}
+