diff --git a/src/mirall/application.cpp b/src/mirall/application.cpp index 885c2b8d8c..b7d59bc535 100644 --- a/src/mirall/application.cpp +++ b/src/mirall/application.cpp @@ -198,13 +198,7 @@ void Application::slotStartFolderSetup( int result ) ownCloudInfo::instance()->checkInstallation(); } else { - QMessageBox::warning(0, tr("No %1 Configuration").arg(_theme->appName()), - tr("
No server connection has been configured for this %1 client.
" - "Please right click on the %1 system tray icon and select Configure " - "to connect this client to an %1 server.
").arg(_theme->appName())); - // It was evaluated to open the config dialog from here directly but decided - // against because the user does not know why. The popup gives a better user - // guidance, even if its a click more. + _owncloudSetupWizard->startWizard(true); // with intro } } else { qDebug() << "Setup Wizard was canceled. No reparsing of config."; @@ -623,7 +617,7 @@ void Application::slotOpenStatus() if( !cfgFile.exists() ) { qDebug() << "No configured folders yet, start the Owncloud integration dialog."; - _owncloudSetupWizard->startWizard(); + _owncloudSetupWizard->startWizard(true); // with intro } else { qDebug() << "#============# Status dialog starting #=============#"; raiseWidget = _statusDialog; @@ -795,7 +789,7 @@ void Application::slotEnableFolder(const QString& alias, const bool enable) void Application::slotConfigure() { _folderMan->disableFoldersWithRestore(); - _owncloudSetupWizard->startWizard(); + _owncloudSetupWizard->startWizard(false); _folderMan->restoreEnabledFolders(); } diff --git a/src/mirall/owncloudsetuppage.ui b/src/mirall/owncloudsetuppage.ui index b00ee793fc..4074de0a3a 100644 --- a/src/mirall/owncloudsetuppage.ui +++ b/src/mirall/owncloudsetuppage.ui @@ -7,33 +7,14 @@In order to connect to your %1 server, you need to provide the server address " + "as well as your credentials.
This wizard will guide you through the process.
" + "
If you have not received this information, please contact your %1 hosting provider.
") + .arg(Theme::instance()->appName())); +} + + OwncloudSetupPage::OwncloudSetupPage() { _ui.setupUi(this); + setTitle(tr("Create the %1 Connection").arg(Theme::instance()->appName())); + setSubTitle(tr("Enter Server Name and Credentials")); + connect(_ui.leUrl, SIGNAL(textChanged(QString)), SLOT(handleNewOcUrl(QString))); registerField( QLatin1String("OCUrl"), _ui.leUrl ); @@ -471,6 +492,7 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) : QWizard(parent) { #ifdef OWNCLOUD_CLIENT + setPage(Page_oCWelcome, new OwncloudWelcomePage() ); setPage(Page_oCSetup, new OwncloudSetupPage() ); #else setPage(Page_SelectType, new OwncloudWizardSelectTypePage() ); diff --git a/src/mirall/owncloudwizard.h b/src/mirall/owncloudwizard.h index 35bc7ba1db..acc34676b7 100644 --- a/src/mirall/owncloudwizard.h +++ b/src/mirall/owncloudwizard.h @@ -57,6 +57,7 @@ class OwncloudWizard: public QWizard public: enum { + Page_oCWelcome, Page_oCSetup, Page_SelectType, Page_Create_OC, @@ -93,6 +94,20 @@ private: QString _oCUrl; }; + +/** + * page for first launch only + */ +class OwncloudWelcomePage: public QWizardPage +{ + Q_OBJECT +public: + OwncloudWelcomePage(); + + virtual int nextId() const { return OwncloudWizard::Page_oCSetup; } +}; + + /** * page to ask for the type of Owncloud to connect to */