HelpDialog *HelpDialog::instance = NULL;
-HelpDialog::HelpDialog( QWidget *parent, intf_thread_t *_p_intf )
- : QVLCDialog( parent, _p_intf )
+HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
+
{
setWindowTitle( qtr( "Help" ) );
+ setMinimumSize( 250, 300 );
QGridLayout *layout = new QGridLayout( this );
QTextBrowser *helpBrowser = new QTextBrowser( this );
layout->addWidget( closeButton, 1, 3 );
BUTTONACT( closeButton, close() );
+ readSettings( "Help", QSize( 400, 450 ) );
}
HelpDialog::~HelpDialog()
{
+ writeSettings( "Help" );
}
+
void HelpDialog::close()
{
- this->toggleVisible();
+ toggleVisible();
}
AboutDialog *AboutDialog::instance = NULL;
-AboutDialog::AboutDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
+AboutDialog::AboutDialog( QWidget *parent, intf_thread_t *_p_intf)
+ : QVLCDialog( parent, _p_intf )
{
setWindowTitle( qtr( "About" ) );
resize( 600, 500 );
+ qfu( VLC_CompileBy() )+ "@" + qfu( VLC_CompileHost() ) + "."
+ qfu( VLC_CompileDomain() ) + ".\n"
+ "Compiler: " + qfu( VLC_Compiler() ) + ".\n"
- + qtr( "Based on SVN revision: " ) + qfu( VLC_Changeset() ) + ".\n"
+ + qtr( "Based on Git commit: " ) + qfu( VLC_Changeset() ) + ".\n"
+ qtr( "You are using the Qt4 Interface.\n\n" )
+ qtr( "Copyright (c) " COPYRIGHT_YEARS " by the VideoLAN Team.\n" )
- + "vlc@videolan.org, http://www.videolan.org" );
+ + "vlc@videolan.org, http://www.videolan.org" );
infoLabel->setWordWrap( infoLabel );
QLabel *iconVLC2 = new QLabel;
AboutDialog::~AboutDialog()
{
}
+
void AboutDialog::close()
{
- this->toggleVisible();
+ toggleVisible();
}
#ifdef UPDATE_CHECK
* UpdateDialog
*****************************************************************************/
/* callback to get information from the core */
-static void UpdateCallback( void *data, vlc_bool_t b_ret )
+static void UpdateCallback( void *data, bool b_ret )
{
UpdateDialog* UDialog = (UpdateDialog *)data;
QEvent* event;
UpdateDialog::UpdateDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
{
setWindowTitle( qtr( "Update" ) );
- resize( 120, 80 );
QGridLayout *layout = new QGridLayout( this );
buttonBox->addButton( updateButton, QDialogButtonBox::ActionRole );
buttonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );
- updateLabel = new QLabel( qtr( "Checking for the update..." ) );
+ updateLabel = new QLabel( qtr( "Checking for an update..." ) );
updateLabel->setWordWrap( true );
layout->addWidget( updateLabel, 0, 0 );
BUTTONACT( closeButton, close() );
/* Create the update structure */
- initUpdate();
+ p_update = update_New( p_intf );
b_checked = false;
+ readSettings( "Update", QSize( 120, 80 ) );
+
/* Check for updates */
UpdateOrDownload();
}
UpdateDialog::~UpdateDialog()
{
update_Delete( p_update );
+ writeSettings( "Update" );
}
void UpdateDialog::close()
if( !b_checked )
{
updateButton->setEnabled( false );
+ msg_Dbg( p_intf, "Launching an update request" );
update_Check( p_update, UpdateCallback, this );
}
else
{
updateButton->setEnabled( false );
- QString dest_dir = QFileDialog::getExistingDirectory( this, qtr( "Select a directory ..." ),
- qfu( p_update->p_libvlc->psz_homedir ) );
+ QString dest_dir = QFileDialog::getExistingDirectory( this,
+ qtr( "Select a directory ..." ),
+ qfu( p_update->p_libvlc->psz_homedir ) );
if( dest_dir != "" )
{
/* The update finish without errors */
if( b_result )
{
- if( update_CompareReleaseToCurrent( p_update ) == UpdateReleaseStatusNewer )
+ if( update_NeedUpgrade( p_update ) )
{
b_checked = true;
updateButton->setText( "Download" );
- updateLabel->setText( qtr( "There is a new version of vlc :\n" ) + qfu( p_update->release.psz_desc ) );
+ updateLabel->setText( qtr( "There is a new version of VLC :\n" )
+ + qfu( p_update->release.psz_desc ) );
}
else
- updateLabel->setText( qtr( "You have the latest version of vlc" ) );
+ updateLabel->setText( qtr( "You have the latest version of VLC" ) );
}
else
- updateLabel->setText( qtr( "An error occure while checking for updates" ) );
+ updateLabel->setText(
+ qtr( "An error occurred while checking for updates" ) );
adjustSize();
updateButton->setEnabled( true );
}
-/* Initialise the p_update struct */
-void UpdateDialog::initUpdate()
-{
- p_update = update_New( p_intf );
-}
-
#endif
+