mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
0d619d569b
commit
abddb3ecb9
3 changed files with 23 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue