some fixes on mac for issue 1164

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent 241e770f7e
commit 9aa114857a
  1. 11
      src/podcast/youtube/UBYouTubePublisher.cpp

@ -137,7 +137,7 @@ void UBYouTubePublisher::postClientLoginResponse(bool success, const QByteArray&
if(mAuthToken.length() == 0) if(mAuthToken.length() == 0)
{ {
UBApplication::showMessage(tr("YouTube authentication failed.")); UBApplication::showMessage(tr("YouTube authentication failed."));
// success = false; // success = false;
deleteLater(); deleteLater();
} }
else else
@ -340,7 +340,13 @@ UBYouTubePublishingDialog::UBYouTubePublishingDialog(const QString& videoFilePat
dialogButtons->button(QDialogButtonBox::Ok)->setEnabled(false); dialogButtons->button(QDialogButtonBox::Ok)->setEnabled(false);
dialogButtons->button(QDialogButtonBox::Ok)->setText(tr("Upload")); dialogButtons->button(QDialogButtonBox::Ok)->setText(tr("Upload"));
UBSettings* settings = UBSettings::settings();
email->setText(settings->youTubeUserEMail->get().toString());
password->setText(settings->password(email->text()));
youtubeCredentialsPersistence->setChecked(UBSettings::settings()->youTubeCredentialsPersistence->get().toBool()); youtubeCredentialsPersistence->setChecked(UBSettings::settings()->youTubeCredentialsPersistence->get().toBool());
updatePersistanceEnableState();
} }
@ -353,7 +359,7 @@ void UBYouTubePublishingDialog::updatePersistanceEnableState()
{ {
bool enabled = email->text().length() || password->text().length(); bool enabled = email->text().length() || password->text().length();
youtubeCredentialsPersistence->setEnabled(enabled); youtubeCredentialsPersistence->setEnabled(enabled);
youtubeCredentialsPersistence->setStyleSheet(enabled ? "color:black;" : "color lightgray;"); youtubeCredentialsPersistence->setStyleSheet(enabled ? "color:black;" : "color : lightgrey;");
} }
void UBYouTubePublishingDialog::updateUIState(const QString& string) void UBYouTubePublishingDialog::updateUIState(const QString& string)
@ -367,6 +373,7 @@ void UBYouTubePublishingDialog::updateUIState(const QString& string)
&& password->text().length() > 0; && password->text().length() > 0;
dialogButtons->button(QDialogButtonBox::Ok)->setEnabled(ok); dialogButtons->button(QDialogButtonBox::Ok)->setEnabled(ok);
updatePersistanceEnableState();
} }

Loading…
Cancel
Save