mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:12:01 +03:00
Add a "Skip Folder Configuration" button in the wizard
This allow to start owncloud the first time but not automatically sync everything, but let the user configure sub folders instead
This commit is contained in:
parent
ad139e19ab
commit
255330d342
5 changed files with 23 additions and 0 deletions
|
@ -319,6 +319,10 @@ void Application::slotownCloudWizardDone( int res )
|
|||
qDebug() << "Set up " << cnt << " folders.";
|
||||
// We have some sort of configuration. Enable autostart
|
||||
Utility::setLaunchOnStartup(_theme->appName(), _theme->appNameGUI(), true);
|
||||
if (cnt == 0) {
|
||||
// The folder configuration was skipped
|
||||
_gui->slotShowSettings();
|
||||
}
|
||||
}
|
||||
folderMan->setSyncEnabled( true );
|
||||
if( res == QDialog::Accepted ) {
|
||||
|
|
|
@ -54,6 +54,7 @@ OwncloudSetupWizard::OwncloudSetupWizard(QObject* parent) :
|
|||
connect( _ocWizard, SIGNAL(basicSetupFinished(int)),
|
||||
this, SLOT(slotAssistantFinished(int)), Qt::QueuedConnection);
|
||||
connect( _ocWizard, SIGNAL(finished(int)), SLOT(deleteLater()));
|
||||
connect( _ocWizard, SIGNAL(skipFolderConfiguration()), SLOT(slotSkipFolderConfigruation()));
|
||||
}
|
||||
|
||||
OwncloudSetupWizard::~OwncloudSetupWizard()
|
||||
|
@ -454,6 +455,16 @@ void OwncloudSetupWizard::slotAssistantFinished( int result )
|
|||
emit ownCloudWizardDone( result );
|
||||
}
|
||||
|
||||
void OwncloudSetupWizard::slotSkipFolderConfigruation()
|
||||
{
|
||||
replaceDefaultAccountWith(_ocWizard->account());
|
||||
_ocWizard->blockSignals(true);
|
||||
_ocWizard->close();
|
||||
_ocWizard->blockSignals(false);
|
||||
emit ownCloudWizardDone( QDialog::Accepted );
|
||||
}
|
||||
|
||||
|
||||
DetermineAuthTypeJob::DetermineAuthTypeJob(Account *account, QObject *parent)
|
||||
: AbstractNetworkJob(account, QString(), parent)
|
||||
, _redirects(0)
|
||||
|
|
|
@ -80,6 +80,7 @@ private slots:
|
|||
void slotAuthCheckReply(QNetworkReply*);
|
||||
void slotCreateRemoteFolderFinished(QNetworkReply::NetworkError);
|
||||
void slotAssistantFinished( int );
|
||||
void slotSkipFolderConfigruation();
|
||||
|
||||
private:
|
||||
explicit OwncloudSetupWizard(QObject *parent = 0 );
|
||||
|
|
|
@ -67,6 +67,8 @@ OwncloudWizard::OwncloudWizard(QWidget *parent)
|
|||
connect( _shibbolethCredsPage, SIGNAL(connectToOCUrl(QString)), SIGNAL(connectToOCUrl(QString)));
|
||||
connect( _advancedSetupPage, SIGNAL(createLocalAndRemoteFolders(QString, QString)),
|
||||
SIGNAL(createLocalAndRemoteFolders(QString, QString)));
|
||||
connect(this, SIGNAL(customButtonClicked(int)), this, SIGNAL(skipFolderConfiguration()));
|
||||
|
||||
|
||||
Theme *theme = Theme::instance();
|
||||
setWindowTitle( tr("%1 Connection Wizard").arg(theme->appNameGUI()));
|
||||
|
@ -78,6 +80,8 @@ OwncloudWizard::OwncloudWizard(QWidget *parent)
|
|||
setOption( QWizard::NoCancelButton );
|
||||
setTitleFormat(Qt::RichText);
|
||||
setSubTitleFormat(Qt::RichText);
|
||||
setButtonText(QWizard::CustomButton1, tr("Skip folders configuration"));
|
||||
|
||||
}
|
||||
|
||||
void OwncloudWizard::setAccount(Account *account)
|
||||
|
@ -169,6 +173,8 @@ void OwncloudWizard::slotCurrentPageChanged( int id )
|
|||
emit basicSetupFinished(QDialog::Accepted);
|
||||
appendToConfigurationLog( QString::null );
|
||||
}
|
||||
|
||||
setOption(QWizard::HaveCustomButton1, id == WizardCommon::Page_AdvancedSetup);
|
||||
}
|
||||
|
||||
void OwncloudWizard::displayError( const QString& msg )
|
||||
|
|
|
@ -73,6 +73,7 @@ signals:
|
|||
void createLocalAndRemoteFolders(const QString&, const QString&);
|
||||
// make sure to connect to this, rather than finished(int)!!
|
||||
void basicSetupFinished( int );
|
||||
void skipFolderConfiguration();
|
||||
|
||||
private:
|
||||
Account* _account;
|
||||
|
|
Loading…
Reference in a new issue