diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-01-17 08:43:49 +1300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-17 08:43:49 +1300 |
commit | abddb3ecb9d93d44bb0071ea369c98499105b9f0 (patch) | |
tree | 9af53a4fad1c975460968a84dc5ced6634e2770b /qt-ui/maintab.cpp | |
parent | 0d619d569bd0b57028eceb16147ea08e850fc946 (diff) | |
download | subsurface-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.cpp | 7 |
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; } |