summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/mainwindow.cpp1
-rw-r--r--desktop-widgets/plugins/facebook/facebook_integration.cpp6
-rw-r--r--desktop-widgets/plugins/facebook/facebookconnectwidget.cpp1
3 files changed, 7 insertions, 1 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index b9112c11a..740b38f76 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -260,6 +260,7 @@ MainWindow::MainWindow() : QMainWindow(),
toggle_connection->setText(plugin->socialNetworkName());
toggle_connection->setIcon(QIcon(plugin->socialNetworkIcon()));
toggle_connection->setData(QVariant::fromValue(plugin));
+ connect(toggle_connection, &QAction::triggered, [plugin](bool triggered){ plugin->requestLogin(); });
QAction *share_on = new QAction(this);
share_on->setText(plugin->socialNetworkName());
diff --git a/desktop-widgets/plugins/facebook/facebook_integration.cpp b/desktop-widgets/plugins/facebook/facebook_integration.cpp
index 700c8f624..28e65254a 100644
--- a/desktop-widgets/plugins/facebook/facebook_integration.cpp
+++ b/desktop-widgets/plugins/facebook/facebook_integration.cpp
@@ -1,4 +1,7 @@
#include "facebook_integration.h"
+#include "facebookconnectwidget.h"
+
+#include <QDebug>
FacebookPlugin::FacebookPlugin(QObject* parent): QObject(parent)
{
@@ -12,7 +15,8 @@ bool FacebookPlugin::isConnected()
void FacebookPlugin::requestLogin()
{
-
+ FacebookConnectWidget connectDialog;
+ connectDialog.exec();
}
void FacebookPlugin::requestLogoff()
diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
index 1f2e1b09d..b5e402617 100644
--- a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
+++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
@@ -275,6 +275,7 @@ void FacebookManager::sendDive()
}
FacebookConnectWidget::FacebookConnectWidget(QWidget *parent) : QDialog(parent), ui(new Ui::FacebookConnectWidget) {
+ ui->setupUi(this);
FacebookManager *fb = FacebookManager::instance();
facebookWebView = new QWebView(this);
ui->fbWebviewContainer->layout()->addWidget(facebookWebView);