Show Ubuntu One settings page if user is not signed in.
This commit is contained in:
parent
6486e621f1
commit
4aeeb45eaa
|
@ -87,16 +87,9 @@ void UbuntuOneService::Connect() {
|
|||
token_secret_ = s.value("token_secret").toString();
|
||||
|
||||
RequestFileList("/~/Ubuntu One");
|
||||
return;
|
||||
} else {
|
||||
ShowSettingsDialog();
|
||||
}
|
||||
|
||||
UbuntuOneAuthenticator* authenticator = new UbuntuOneAuthenticator;
|
||||
authenticator->StartAuthorisation(
|
||||
"Username",
|
||||
"Password");
|
||||
NewClosure(authenticator, SIGNAL(Finished()),
|
||||
this, SLOT(AuthenticationFinished(UbuntuOneAuthenticator*)),
|
||||
authenticator);
|
||||
}
|
||||
|
||||
QByteArray UbuntuOneService::GenerateAuthorisationHeader() {
|
||||
|
@ -212,3 +205,7 @@ QUrl UbuntuOneService::GetStreamingUrlFromSongId(const QString& song_id) {
|
|||
url.setFragment(GenerateAuthorisationHeader());
|
||||
return url;
|
||||
}
|
||||
|
||||
void UbuntuOneService::ShowSettingsDialog() {
|
||||
app_->OpenSettingsDialogAtPage(SettingsDialog::Page_UbuntuOne);
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ class UbuntuOneService : public InternetService {
|
|||
void Connect();
|
||||
void RequestFileList(const QString& path);
|
||||
void MaybeAddFileToDatabase(const QVariantMap& file);
|
||||
void ShowSettingsDialog();
|
||||
|
||||
private:
|
||||
QByteArray GenerateAuthorisationHeader();
|
||||
|
|
Loading…
Reference in New Issue