/* Check for updates */ void UpdateDialog::UpdateOrDownload() { if( !b_checked ) { ui.stackedWidget->setCurrentWidget( ui.updateRequestPage ); update_Check( p_update, UpdateCallback, this ); } else { QString dest_dir = QDir::tempPath(); if( !dest_dir.isEmpty() ) { dest_dir = toNativeSepNoSlash( dest_dir ) + DIR_SEP; msg_Dbg( p_intf, "Downloading to folder: %s", qtu( dest_dir ) ); toggleVisible(); update_Download( p_update, qtu( dest_dir ) ); /* FIXME: We should trigger a change to another dialog here ! */ } } }
/* Check for updates */ void UpdateDialog::UpdateOrDownload() { if( !b_checked ) { updateButton->setEnabled( false ); updateLabelTop->setText( qtr( "Launching an update request..." ) ); update_Check( p_update, UpdateCallback, this ); } else { QString dest_dir = QFileDialog::getExistingDirectory( this, qtr( "Select a directory..." ), qfu( config_GetHomeDir() ) ); if( !dest_dir.isEmpty() ) { dest_dir = toNativeSepNoSlash( dest_dir ) + DIR_SEP; msg_Dbg( p_intf, "Downloading to folder: %s", qtu( dest_dir ) ); toggleVisible(); update_Download( p_update, qtu( dest_dir ) ); } } }