From cc69e6ffa2a3f8e6e65e02459d8508f688fdaaf2 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 23 Dec 2014 19:10:57 -0200 Subject: State that you are connected on Facebook. TODO: Disconnect from facebook. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/preferences.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index 2378a1fd6..b57040c83 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -33,7 +33,14 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, Qt::WindowFlags f) : QDial "&redirect_uri=http://www.facebook.com/connect/login_success.html" "&response_type=token"); - ui.facebookWebView->setUrl(urlLogin); + QSettings settings; + settings.beginGroup("WebApps"); + settings.beginGroup("Facebook"); + if(settings.allKeys().contains("ConnectToken")){ + ui.facebookWebView->setHtml("You are connected on Facebook, yey."); + } else { + ui.facebookWebView->setUrl(urlLogin); + } connect(ui.facebookWebView, &QWebView::urlChanged, this, &PreferencesDialog::facebookLoginResponse); -- cgit v1.2.3-70-g09d2