Adjust login state widget placement for covers and lyrics settings
This commit is contained in:
@@ -60,6 +60,8 @@ CoversSettingsPage::CoversSettingsPage(SettingsDialog *parent) : SettingsPage(pa
|
||||
connect(ui_->button_authenticate, SIGNAL(clicked()), SLOT(AuthenticateClicked()));
|
||||
connect(ui_->login_state, SIGNAL(LogoutClicked()), SLOT(LogoutClicked()));
|
||||
|
||||
ui_->login_state->AddCredentialGroup(ui_->widget_authenticate);
|
||||
|
||||
NoProviderSelected();
|
||||
DisableAuthentication();
|
||||
|
||||
@@ -203,6 +205,7 @@ void CoversSettingsPage::AuthenticateClicked() {
|
||||
CoverProvider *provider = dialog()->app()->cover_providers()->ProviderByName(ui_->providers->currentItem()->text());
|
||||
if (!provider) return;
|
||||
ui_->button_authenticate->setEnabled(false);
|
||||
ui_->login_state->SetLoggedIn(LoginStateWidget::LoginInProgress);
|
||||
connect(provider, SIGNAL(AuthenticationFailure(QStringList)), this, SLOT(AuthenticationFailure(QStringList)));
|
||||
connect(provider, SIGNAL(AuthenticationSuccess()), this, SLOT(AuthenticationSuccess()));
|
||||
provider->Authenticate();
|
||||
|
||||
@@ -106,15 +106,21 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="LoginStateWidget" name="login_state" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_button_authenticate">
|
||||
<layout class="QHBoxLayout" name="layout_authenticate">
|
||||
<item>
|
||||
<widget class="QPushButton" name="button_authenticate">
|
||||
<property name="text">
|
||||
<string>Authenticate</string>
|
||||
</property>
|
||||
<widget class="LoginStateWidget" name="login_state" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_authenticate" native="true">
|
||||
<layout class="QHBoxLayout" name="layout_button_authenticate">
|
||||
<item>
|
||||
<widget class="QPushButton" name="button_authenticate">
|
||||
<property name="text">
|
||||
<string>Login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -60,6 +60,8 @@ LyricsSettingsPage::LyricsSettingsPage(SettingsDialog *parent) : SettingsPage(pa
|
||||
connect(ui_->button_authenticate, SIGNAL(clicked()), SLOT(AuthenticateClicked()));
|
||||
connect(ui_->login_state, SIGNAL(LogoutClicked()), SLOT(LogoutClicked()));
|
||||
|
||||
ui_->login_state->AddCredentialGroup(ui_->widget_authenticate);
|
||||
|
||||
NoProviderSelected();
|
||||
DisableAuthentication();
|
||||
|
||||
@@ -197,6 +199,7 @@ void LyricsSettingsPage::AuthenticateClicked() {
|
||||
LyricsProvider *provider = dialog()->app()->lyrics_providers()->ProviderByName(ui_->providers->currentItem()->text());
|
||||
if (!provider) return;
|
||||
ui_->button_authenticate->setEnabled(false);
|
||||
ui_->login_state->SetLoggedIn(LoginStateWidget::LoginInProgress);
|
||||
connect(provider, SIGNAL(AuthenticationFailure(QStringList)), this, SLOT(AuthenticationFailure(QStringList)));
|
||||
connect(provider, SIGNAL(AuthenticationSuccess()), this, SLOT(AuthenticationSuccess()));
|
||||
provider->Authenticate();
|
||||
|
||||
@@ -106,15 +106,21 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="LoginStateWidget" name="login_state" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_button_authenticate">
|
||||
<layout class="QHBoxLayout" name="layout_authenticate">
|
||||
<item>
|
||||
<widget class="QPushButton" name="button_authenticate">
|
||||
<property name="text">
|
||||
<string>Authenticate</string>
|
||||
</property>
|
||||
<widget class="LoginStateWidget" name="login_state" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_authenticate" native="true">
|
||||
<layout class="QHBoxLayout" name="layout_button_authenticate">
|
||||
<item>
|
||||
<widget class="QPushButton" name="button_authenticate">
|
||||
<property name="text">
|
||||
<string>Login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
Reference in New Issue
Block a user