summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-17 08:43:49 +1300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-17 08:43:49 +1300
commitabddb3ecb9d93d44bb0071ea369c98499105b9f0 (patch)
tree9af53a4fad1c975460968a84dc5ced6634e2770b /qt-ui/maintab.cpp
parent0d619d569bd0b57028eceb16147ea08e850fc946 (diff)
downloadsubsurface-abddb3ecb9d93d44bb0071ea369c98499105b9f0.tar.gz
Make Facebook support a config option
By default it is turned off, turn on by calling qmake with CONFIG+=FBSUPPORT. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 492753d25..629b36ad7 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -16,7 +16,10 @@
#include "qthelper.h"
#include "display.h"
#include "divepicturewidget.h"
+
+#if defined(FBSUPPORT)
#include "socialnetworks.h"
+#endif
#include <QLabel>
#include <QCompleter>
@@ -190,11 +193,15 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
ui.photosView->setSelectionMode(QAbstractItemView::SingleSelection);
connect(deletePhoto, SIGNAL(triggered(bool)), this, SLOT(removeSelectedPhotos()));
+#if defined(FBSUPPORT)
FacebookManager *fb = FacebookManager::instance();
connect(fb, &FacebookManager::justLoggedIn, ui.facebookPublish, &QPushButton::show);
connect(fb, &FacebookManager::justLoggedOut, ui.facebookPublish, &QPushButton::hide);
connect(ui.facebookPublish, &QPushButton::clicked, fb, &FacebookManager::sendDive);
ui.facebookPublish->setVisible(fb->loggedIn());
+#else
+ ui.facebookPublish->setVisible(false);
+#endif
acceptingEdit = false;
}