summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-12-28 20:24:02 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-29 09:05:08 -0800
commit571f86485d6063f86901487bca62e79b6383db45 (patch)
tree52ec03557d1c901f9e11dd0b4ca46a238f142a38 /qt-ui/maintab.cpp
parentdb0c1b834a9e3d516484a6e42f1fddc538477071 (diff)
downloadsubsurface-571f86485d6063f86901487bca62e79b6383db45.tar.gz
Move the Facebook send profile button
Move from the Dive List context menu to the Dive Info tab, it will only appear when connected to Facebook. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index cd85418a8..6edc5fa8e 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -16,6 +16,7 @@
#include "qthelper.h"
#include "display.h"
#include "divepicturewidget.h"
+#include "socialnetworks.h"
#include <QLabel>
#include <QCompleter>
@@ -185,6 +186,11 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
ui.photosView->addAction(deletePhoto);
ui.photosView->setSelectionMode(QAbstractItemView::SingleSelection);
connect(deletePhoto, SIGNAL(triggered(bool)), this, SLOT(removeSelectedPhotos()));
+
+ FacebookManager *fb = FacebookManager::instance();
+ connect(fb, &FacebookManager::justLoggedIn, ui.facebookPublish, &QPushButton::show);
+ connect(fb, &FacebookManager::justLoggedOut, ui.facebookPublish, &QPushButton::hide);
+ ui.facebookPublish->setVisible(fb->loggedIn());
}
MainTab::~MainTab()