summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2019-02-01 04:11:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-02-01 17:16:43 -0800
commita1ffe115cfb27bd0dd57bf5266c7d37d9ce64dab (patch)
tree6589e06ecce1d0c461900fd2537bf5125afadf9d /desktop-widgets/mainwindow.cpp
parent0c07b02974a65608d7d71ef150d322678ec1170b (diff)
downloadsubsurface-a1ffe115cfb27bd0dd57bf5266c7d37d9ce64dab.tar.gz
facebook: remove the featute from the code base
Remove from: - unit tests - desktop widgets - preferences - core intergration - cmakefiles - build scripts - icons - docs Also remove the plugins and social network integration. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp64
1 files changed, 0 insertions, 64 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 584ad9e0c..2d1f61d2b 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -22,10 +22,8 @@
#include "core/divesitehelpers.h"
#include "core/gettextfromc.h"
#include "core/git-access.h"
-#include "core/isocialnetworkintegration.h"
#include "core/import-csv.h"
#include "core/planner.h"
-#include "core/pluginmanager.h"
#include "core/qthelper.h"
#include "core/subsurface-string.h"
#include "core/version.h"
@@ -76,11 +74,6 @@
#include "usermanual.h"
#endif
-#if defined(FBSUPPORT)
-#include "plugins/facebook/facebook_integration.h"
-#include "plugins/facebook/facebookconnectwidget.h"
-#endif
-
namespace {
QProgressDialog *progressDialog = nullptr;
bool progressDialogCanceled = false;
@@ -380,63 +373,6 @@ MainWindow::~MainWindow()
void MainWindow::setupSocialNetworkMenu()
{
-#ifdef FBSUPPORT
- connections = new QMenu(tr("Connect to"));
- FacebookPlugin *facebookPlugin = new FacebookPlugin();
- QAction *toggle_connection = new QAction(this);
- QObject *obj = facebookPlugin;
- toggle_connection->setText(facebookPlugin->socialNetworkName());
- toggle_connection->setIcon(QIcon(facebookPlugin->socialNetworkIcon()));
- toggle_connection->setData(QVariant::fromValue(obj));
- connect(toggle_connection, SIGNAL(triggered()), this, SLOT(socialNetworkRequestConnect()));
- FacebookManager *fb = FacebookManager::instance();
- connect(fb, &FacebookManager::justLoggedIn, this, &MainWindow::facebookLoggedIn);
- connect(fb, &FacebookManager::justLoggedOut, this, &MainWindow::facebookLoggedOut);
- connect(fb, &FacebookManager::sendMessage, [this](const QString& msg) {
- statusBar()->showMessage(msg, 10000); // show message for 10 secs on the statusbar.
- });
- share_on_fb = new QAction(this);
- share_on_fb->setText(facebookPlugin->socialNetworkName());
- share_on_fb->setIcon(QIcon(facebookPlugin->socialNetworkIcon()));
- share_on_fb->setData(QVariant::fromValue(obj));
- share_on_fb->setEnabled(false);
- ui.menuShare_on->addAction(share_on_fb);
- connections->addAction(toggle_connection);
- connect(share_on_fb, SIGNAL(triggered()), this, SLOT(socialNetworkRequestUpload()));
- ui.menuShare_on->addSeparator();
- ui.menuShare_on->addMenu(connections);
- ui.menubar->show();
-#endif
-}
-
-void MainWindow::facebookLoggedIn()
-{
- connections->setTitle(tr("Disconnect from"));
- share_on_fb->setEnabled(true);
-}
-
-void MainWindow::facebookLoggedOut()
-{
- connections->setTitle(tr("Connect to"));
- share_on_fb->setEnabled(false);
-}
-
-void MainWindow::socialNetworkRequestConnect()
-{
- qDebug() << "Requesting connect on the social network";
- QAction *action = qobject_cast<QAction*>(sender());
- ISocialNetworkIntegration *plugin = qobject_cast<ISocialNetworkIntegration*>(action->data().value<QObject*>());
- if (plugin->isConnected())
- plugin->requestLogoff();
- else
- plugin->requestLogin();
-}
-
-void MainWindow::socialNetworkRequestUpload()
-{
- QAction *action = qobject_cast<QAction*>(sender());
- ISocialNetworkIntegration *plugin = action->data().value<ISocialNetworkIntegration*>();
- plugin->requestUpload();
}
void MainWindow::setStateProperties(const QByteArray& state, const PropertyList& tl, const PropertyList& tr, const PropertyList& bl, const PropertyList& br)