From 9873ed083a8f52b7f264fca6d06f328b022c30fa Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sat, 10 Mar 2012 22:43:05 +0000 Subject: [PATCH] Set the gpodder.net login state widget's login state properly when opening the podcasts settings page. --- src/podcasts/podcastsettingspage.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/podcasts/podcastsettingspage.cpp b/src/podcasts/podcastsettingspage.cpp index d3ed77a69..2120993f0 100644 --- a/src/podcasts/podcastsettingspage.cpp +++ b/src/podcasts/podcastsettingspage.cpp @@ -76,9 +76,13 @@ void PodcastSettingsPage::Load() { ui_->delete_after->setValue(s.value("delete_after", 0).toInt() / (24*60*60)); ui_->delete_unplayed->setChecked(s.value("delete_unplayed", false).toBool()); ui_->username->setText(s.value("gpodder_username").toString()); - ui_->device_name->setText(s.value("gpodder_device_name", GPodderSync::DefaultDeviceName()).toString()); + if (dialog()->app()->gpodder_sync()->is_logged_in()) { + ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedIn, ui_->username->text()); + } else { + ui_->login_state->SetLoggedIn(LoginStateWidget::LoggedOut); + } } void PodcastSettingsPage::Save() {