Fix disabling of facebook integration

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2015-12-01 20:46:59 +01:00 committed by Dirk Hohndel
parent 58901690dd
commit 59042b2ed0
2 changed files with 9 additions and 3 deletions

View file

@ -26,6 +26,10 @@ option(FTDISUPPORT "enable support for libftdi based serial" OFF)
option(DISABLE_PLUGINS "disable support for social media plugins" OFF) option(DISABLE_PLUGINS "disable support for social media plugins" OFF)
option(SMARTTRAK_IMPORT "enable building SmartTrak divelogs import tool (requires glib2 and libmdb)" OFF) option(SMARTTRAK_IMPORT "enable building SmartTrak divelogs import tool (requires glib2 and libmdb)" OFF)
if (NOT FBSUPPORT)
set(DISABLE_PLUGINS ON)
endif()
add_definitions(-DSUBSURFACE_SOURCE="${CMAKE_SOURCE_DIR}") add_definitions(-DSUBSURFACE_SOURCE="${CMAKE_SOURCE_DIR}")
set(CMAKE_MODULE_PATH set(CMAKE_MODULE_PATH
@ -344,9 +348,9 @@ endif()
if(FBSUPPORT) if(FBSUPPORT)
add_definitions(-DFBSUPPORT) add_definitions(-DFBSUPPORT)
set(FACEBOOK_INTEGRATION facebook_integration)
endif() endif()
# add pthread to the end of the library list on Linux # add pthread to the end of the library list on Linux
# this is only needed on Ubuntu (why do these idiots break everything?) # this is only needed on Ubuntu (why do these idiots break everything?)
# but shouldn't hurt on other Linux versions # but shouldn't hurt on other Linux versions
@ -407,7 +411,7 @@ else()
${SUBSURFACE_TARGET} ${SUBSURFACE_TARGET}
subsurface_generated_ui subsurface_generated_ui
subsurface_interface subsurface_interface
facebook_integration ${FACEBOOK_INTEGRATION}
subsurface_profile subsurface_profile
subsurface_statistics subsurface_statistics
subsurface_models subsurface_models

View file

@ -56,9 +56,9 @@
#include "subsurface-core/isocialnetworkintegration.h" #include "subsurface-core/isocialnetworkintegration.h"
#include "subsurface-core/pluginmanager.h" #include "subsurface-core/pluginmanager.h"
#if defined(FBSUPPORT)
#include "plugins/facebook/facebook_integration.h" #include "plugins/facebook/facebook_integration.h"
#if defined(FBSUPPORT)
#include "socialnetworks.h" #include "socialnetworks.h"
#endif #endif
@ -262,6 +262,7 @@ MainWindow::~MainWindow()
void MainWindow::setupSocialNetworkMenu() void MainWindow::setupSocialNetworkMenu()
{ {
#ifdef FBSUPPORT
QMenu *connections = new QMenu(tr("Connect to")); QMenu *connections = new QMenu(tr("Connect to"));
FacebookPlugin *facebookPlugin = new FacebookPlugin(); FacebookPlugin *facebookPlugin = new FacebookPlugin();
QAction *toggle_connection = new QAction(this); QAction *toggle_connection = new QAction(this);
@ -281,6 +282,7 @@ void MainWindow::setupSocialNetworkMenu()
ui.menuShare_on->addSeparator(); ui.menuShare_on->addSeparator();
ui.menuShare_on->addMenu(connections); ui.menuShare_on->addMenu(connections);
ui.menubar->show(); ui.menubar->show();
#endif
} }
void MainWindow::socialNetworkRequestConnect() void MainWindow::socialNetworkRequestConnect()