diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2013-08-29 13:37:45 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2013-09-02 11:50:36 +0200 |
commit | f0147ba19f51db84677aa0b60e3a1e050b5c7e43 (patch) | |
tree | 96db3553d82146a54023aad677c656c8fde3e484 | |
parent | 3eac49d9c38a03212237f51df6ebf3d9e7863c93 (diff) | |
download | qt-creator-f0147ba19f51db84677aa0b60e3a1e050b5c7e43.tar.gz |
VCS: Use better terms on checkout wizard for DVCS
Change-Id: I9064c71787dbfb1eee6f8f473df39dda23a1252a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
-rw-r--r-- | src/plugins/bazaar/clonewizard.cpp | 1 | ||||
-rw-r--r-- | src/plugins/git/clonewizard.cpp | 1 | ||||
-rw-r--r-- | src/plugins/mercurial/clonewizard.cpp | 1 | ||||
-rw-r--r-- | src/plugins/vcsbase/basecheckoutwizard.cpp | 12 | ||||
-rw-r--r-- | src/plugins/vcsbase/basecheckoutwizard.h | 1 | ||||
-rw-r--r-- | src/plugins/vcsbase/basecheckoutwizardpage.ui | 4 | ||||
-rw-r--r-- | src/plugins/vcsbase/checkoutprogresswizardpage.cpp | 8 | ||||
-rw-r--r-- | src/plugins/vcsbase/checkoutprogresswizardpage.h | 2 | ||||
-rw-r--r-- | src/plugins/vcsbase/checkoutwizarddialog.cpp | 10 | ||||
-rw-r--r-- | src/plugins/vcsbase/checkoutwizarddialog.h | 2 |
10 files changed, 39 insertions, 3 deletions
diff --git a/src/plugins/bazaar/clonewizard.cpp b/src/plugins/bazaar/clonewizard.cpp index 76947850f0..3e38a1c182 100644 --- a/src/plugins/bazaar/clonewizard.cpp +++ b/src/plugins/bazaar/clonewizard.cpp @@ -48,6 +48,7 @@ CloneWizard::CloneWizard(QObject *parent) m_icon(QIcon(QLatin1String(":/bazaar/images/bazaar.png"))) { setId(QLatin1String(VcsBase::Constants::VCS_ID_BAZAAR)); + setCustomLabels(tr("Cloning"), tr("Cloning started...")); } QIcon CloneWizard::icon() const diff --git a/src/plugins/git/clonewizard.cpp b/src/plugins/git/clonewizard.cpp index b84ce3bda5..f7ba3d2dcf 100644 --- a/src/plugins/git/clonewizard.cpp +++ b/src/plugins/git/clonewizard.cpp @@ -46,6 +46,7 @@ CloneWizard::CloneWizard(QObject *parent) : VcsBase::BaseCheckoutWizard(parent) { setId(QLatin1String(VcsBase::Constants::VCS_ID_GIT)); + setCustomLabels(tr("Cloning"), tr("Cloning started...")); } QIcon CloneWizard::icon() const diff --git a/src/plugins/mercurial/clonewizard.cpp b/src/plugins/mercurial/clonewizard.cpp index 53cd84901e..274f0a4af5 100644 --- a/src/plugins/mercurial/clonewizard.cpp +++ b/src/plugins/mercurial/clonewizard.cpp @@ -45,6 +45,7 @@ CloneWizard::CloneWizard(QObject *parent) m_icon(QIcon(QLatin1String(":/mercurial/images/hg.png"))) { setId(QLatin1String(Constants::VCS_ID_MERCURIAL)); + setCustomLabels(tr("Cloning"), tr("Cloning started...")); } QIcon CloneWizard::icon() const diff --git a/src/plugins/vcsbase/basecheckoutwizard.cpp b/src/plugins/vcsbase/basecheckoutwizard.cpp index 05cbce2410..230f912d90 100644 --- a/src/plugins/vcsbase/basecheckoutwizard.cpp +++ b/src/plugins/vcsbase/basecheckoutwizard.cpp @@ -72,6 +72,8 @@ public: QList<QWizardPage *> parameterPages; QString checkoutPath; QString id; + QString progressTitle; + QString startedStatus; }; void BaseCheckoutWizardPrivate::clear() @@ -130,6 +132,10 @@ void BaseCheckoutWizard::runWizard(const QString &path, QWidget *parent, const Q // Create dialog and launch d->parameterPages = createParameterPages(path); Internal::CheckoutWizardDialog dialog(d->parameterPages, parent); + if (!d->progressTitle.isEmpty()) + dialog.setTitle(d->progressTitle); + if (!d->startedStatus.isEmpty()) + dialog.setStartedStatus(d->startedStatus); d->dialog = &dialog; connect(&dialog, SIGNAL(progressPageShown()), this, SLOT(slotProgressPageShown())); dialog.setWindowTitle(displayName()); @@ -212,6 +218,12 @@ QString BaseCheckoutWizard::openProject(const QString &path, QString *errorMessa return projectFile; } +void BaseCheckoutWizard::setCustomLabels(const QString &progressTitle, const QString &startedStatus) +{ + d->progressTitle = progressTitle; + d->startedStatus = startedStatus; +} + void BaseCheckoutWizard::slotProgressPageShown() { Command *command = createCommand(d->parameterPages, &(d->checkoutPath)); diff --git a/src/plugins/vcsbase/basecheckoutwizard.h b/src/plugins/vcsbase/basecheckoutwizard.h index 8bc1581037..caa2f5a4dd 100644 --- a/src/plugins/vcsbase/basecheckoutwizard.h +++ b/src/plugins/vcsbase/basecheckoutwizard.h @@ -72,6 +72,7 @@ public: static QString openProject(const QString &path, QString *errorMessage); protected: + void setCustomLabels(const QString &progressTitle, const QString &startedStatus); virtual QList<QWizardPage *> createParameterPages(const QString &path) = 0; virtual Command *createCommand(const QList<QWizardPage *> ¶meterPages, QString *checkoutPath) = 0; diff --git a/src/plugins/vcsbase/basecheckoutwizardpage.ui b/src/plugins/vcsbase/basecheckoutwizardpage.ui index 2ae4b6e19d..edf34f080b 100644 --- a/src/plugins/vcsbase/basecheckoutwizardpage.ui +++ b/src/plugins/vcsbase/basecheckoutwizardpage.ui @@ -94,7 +94,7 @@ <string>The path in which the directory containing the checkout will be created.</string> </property> <property name="text"> - <string>Checkout path:</string> + <string>Path:</string> </property> </widget> </item> @@ -107,7 +107,7 @@ <string>The local directory that will contain the code after the checkout.</string> </property> <property name="text"> - <string>Checkout directory:</string> + <string>Directory:</string> </property> </widget> </item> diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp index a891348dfb..1de7d37376 100644 --- a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp +++ b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp @@ -53,6 +53,7 @@ namespace Internal { CheckoutProgressWizardPage::CheckoutProgressWizardPage(QWidget *parent) : QWizardPage(parent), ui(new Ui::CheckoutProgressWizardPage), + m_startedStatus(tr("Checkout started...")), m_state(Idle) { ui->setupUi(this); @@ -66,6 +67,11 @@ CheckoutProgressWizardPage::~CheckoutProgressWizardPage() delete ui; } +void CheckoutProgressWizardPage::setStartedStatus(const QString &startedStatus) +{ + m_startedStatus = startedStatus; +} + void CheckoutProgressWizardPage::start(Command *command) { if (!command) { @@ -80,7 +86,7 @@ void CheckoutProgressWizardPage::start(Command *command) connect(command, SIGNAL(finished(bool,int,QVariant)), this, SLOT(slotFinished(bool,int,QVariant))); QApplication::setOverrideCursor(Qt::WaitCursor); ui->logPlainTextEdit->clear(); - ui->statusLabel->setText(tr("Checkout started...")); + ui->statusLabel->setText(m_startedStatus); ui->statusLabel->setPalette(QPalette()); m_state = Running; command->execute(); diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.h b/src/plugins/vcsbase/checkoutprogresswizardpage.h index 7d317e6a18..567b7052ac 100644 --- a/src/plugins/vcsbase/checkoutprogresswizardpage.h +++ b/src/plugins/vcsbase/checkoutprogresswizardpage.h @@ -50,6 +50,7 @@ public: explicit CheckoutProgressWizardPage(QWidget *parent = 0); ~CheckoutProgressWizardPage(); + void setStartedStatus(const QString &startedStatus); void start(Command *command); virtual bool isComplete() const; @@ -69,6 +70,7 @@ private: Ui::CheckoutProgressWizardPage *ui; Command *m_command; + QString m_startedStatus; QString m_error; State m_state; diff --git a/src/plugins/vcsbase/checkoutwizarddialog.cpp b/src/plugins/vcsbase/checkoutwizarddialog.cpp index a57096faad..49e2f25d0e 100644 --- a/src/plugins/vcsbase/checkoutwizarddialog.cpp +++ b/src/plugins/vcsbase/checkoutwizarddialog.cpp @@ -61,6 +61,16 @@ CheckoutWizardDialog::CheckoutWizardDialog(const QList<QWizardPage *> ¶meter Core::BaseFileWizard::setupWizard(this); } +void CheckoutWizardDialog::setTitle(const QString &title) +{ + m_progressPage->setTitle(title); +} + +void CheckoutWizardDialog::setStartedStatus(const QString &title) +{ + m_progressPage->setStartedStatus(title); +} + void CheckoutWizardDialog::slotPageChanged(int id) { if (id == m_progressPageId) diff --git a/src/plugins/vcsbase/checkoutwizarddialog.h b/src/plugins/vcsbase/checkoutwizarddialog.h index 7ef0a60389..bbecc82f78 100644 --- a/src/plugins/vcsbase/checkoutwizarddialog.h +++ b/src/plugins/vcsbase/checkoutwizarddialog.h @@ -48,6 +48,8 @@ public: explicit CheckoutWizardDialog(const QList<QWizardPage *> ¶meterPages, QWidget *parent = 0); + void setTitle(const QString &title); + void setStartedStatus(const QString &title); void start(VcsBase::Command *command); signals: |