1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 19:31:02 +01:00

Fix the Create Account link in the podcasts settings dialog, set a proper icon, and handle errors logging in to gpodder.net

This commit is contained in:
David Sansome 2012-03-09 16:47:19 +00:00
parent 62ea8bd4eb
commit ec392ea155
2 changed files with 21 additions and 6 deletions

View File

@ -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() {

View File

@ -13,6 +13,10 @@
<property name="windowTitle">
<string>Podcasts</string>
</property>
<property name="windowIcon">
<iconset resource="../../data/data.qrc">
<normaloff>:/providers/podcast32.png</normaloff>:/providers/podcast32.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox">
@ -97,13 +101,13 @@
<item row="0" column="1">
<widget class="QSpinBox" name="delete_after">
<property name="specialValueText">
<string>manually</string>
<string>Manually</string>
</property>
<property name="suffix">
<string> days</string>
</property>
<property name="prefix">
<string>after </string>
<string>After </string>
</property>
<property name="maximum">
<number>30</number>
@ -132,11 +136,14 @@
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Clementine can synchronize your subscription list with your other computers and podcast applications. &lt;a href=&quot;https://gpodder.net/register/&quot;&gt;Create an account&lt;/a&gt;</string>
<string>Clementine can synchronize your subscription list with your other computers and podcast applications. &lt;a href=&quot;https://gpodder.net/register/&quot;&gt;Create an account&lt;/a&gt;.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
@ -207,7 +214,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>217</height>
<height>0</height>
</size>
</property>
</spacer>
@ -232,6 +239,8 @@
<tabstop>device_name</tabstop>
<tabstop>login</tabstop>
</tabstops>
<resources/>
<resources>
<include location="../../data/data.qrc"/>
</resources>
<connections/>
</ui>