From ec392ea15579d368d2b985039f436976a9c5d502 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Fri, 9 Mar 2012 16:47:19 +0000 Subject: [PATCH] Fix the Create Account link in the podcasts settings dialog, set a proper icon, and handle errors logging in to gpodder.net --- src/podcasts/podcastsettingspage.cpp | 8 +++++++- src/podcasts/podcastsettingspage.ui | 19 ++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/podcasts/podcastsettingspage.cpp b/src/podcasts/podcastsettingspage.cpp index 44705c5f2..d92092620 100644 --- a/src/podcasts/podcastsettingspage.cpp +++ b/src/podcasts/podcastsettingspage.cpp @@ -37,8 +37,8 @@ PodcastSettingsPage::PodcastSettingsPage(SettingsDialog* dialog) connect(ui_->login_state, SIGNAL(LogoutClicked()), SLOT(LogoutClicked())); ui_->login_state->AddCredentialField(ui_->username); - ui_->login_state->AddCredentialField(ui_->password); ui_->login_state->AddCredentialField(ui_->device_name); + ui_->login_state->AddCredentialField(ui_->password); ui_->login_state->AddCredentialGroup(ui_->login_group); ui_->check_interval->setItemData(0, 0); // manually @@ -98,6 +98,12 @@ void PodcastSettingsPage::LoginFinished(QNetworkReply* reply) { ui_->login_state->SetLoggedIn(success ? LoginStateWidget::LoggedIn : LoginStateWidget::LoggedOut, ui_->username->text()); + + ui_->login_state->SetAccountTypeVisible(!success); + if (!success) { + ui_->login_state->SetAccountTypeText(tr("Login failed") + ": " + + reply->errorString()); + } } void PodcastSettingsPage::LogoutClicked() { diff --git a/src/podcasts/podcastsettingspage.ui b/src/podcasts/podcastsettingspage.ui index e4e821296..b30f51916 100644 --- a/src/podcasts/podcastsettingspage.ui +++ b/src/podcasts/podcastsettingspage.ui @@ -13,6 +13,10 @@ Podcasts + + + :/providers/podcast32.png:/providers/podcast32.png + @@ -97,13 +101,13 @@ - manually + Manually days - after + After 30 @@ -132,11 +136,14 @@ - Clementine can synchronize your subscription list with your other computers and podcast applications. <a href="https://gpodder.net/register/">Create an account</a> + Clementine can synchronize your subscription list with your other computers and podcast applications. <a href="https://gpodder.net/register/">Create an account</a>. true + + true + @@ -207,7 +214,7 @@ 20 - 217 + 0 @@ -232,6 +239,8 @@ device_name login - + + +