diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2017-10-02 15:25:44 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-10-02 08:54:03 -0700 |
commit | 527078e277a2752273a7f299499d730a9705d801 (patch) | |
tree | b95f7f6146157a6d4617ef13179b617d87f87a82 /desktop-widgets/plugins/facebook/facebookconnectwidget.cpp | |
parent | 3e2a86cf80fec49b67f42ddf0c7a8ad4e9a6488a (diff) | |
download | subsurface-527078e277a2752273a7f299499d730a9705d801.tar.gz |
[Facebook] Use statusbar instead of popup messages
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/plugins/facebook/facebookconnectwidget.cpp')
-rw-r--r-- | desktop-widgets/plugins/facebook/facebookconnectwidget.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp index d4c3cab68..54c02ff3e 100644 --- a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp +++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp @@ -182,9 +182,11 @@ void FacebookManager::userIdReceived() if (obj.keys().contains("id")) { qCDebug(lcFacebook) << "User id requested successfully:" << obj.value("id").toString(); SettingsObjectWrapper::instance()->facebook->setUserId(obj.value("id").toString()); + emit sendMessage(tr("Facebook logged in successfully")); emit justLoggedIn(true); } else { - qCDebug(lcFacebook) << "Error, user id unknown, cannot login."; + emit sendMessage(tr("Error, unknown user id, cannot login.")); + qCDebug(lcFacebook) << "Error, unknown user id, cannot login."; } reply->deleteLater(); } @@ -281,17 +283,10 @@ void FacebookManager::uploadFinished() reply->deleteLater(); if (obj.keys().contains("id")){ - QMessageBox::information(qApp->activeWindow(), - tr("Photo upload sucessfull"), - tr("Your dive profile was updated to Facebook."), - QMessageBox::Ok); + emit sendMessage(tr("Dive uploaded successfully to Facebook")); } else { - QMessageBox::information(qApp->activeWindow(), - tr("Photo upload failed"), - tr("Your dive profile was not updated to Facebook, \n " - "please send the following to the developer. \n" - + response), - QMessageBox::Ok); + emit sendMessage(tr("Dive upload failed. Please see debug output and send to Subsurface mailing list")); + qCDebug(lcFacebook) << "Dive upload failed" << response; } emit sendDiveFinished(); @@ -325,6 +320,7 @@ void FacebookConnectWidget::facebookLoggedIn() ui->fbWebviewContainer->hide(); ui->fbWebviewContainer->setEnabled(false); ui->FBLabel->setText(tr("To disconnect Subsurface from your Facebook account, use the 'Share on' menu entry.")); + close(); } void FacebookConnectWidget::facebookDisconnect() |