diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-12-28 20:24:02 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-29 09:05:08 -0800 |
commit | 571f86485d6063f86901487bca62e79b6383db45 (patch) | |
tree | 52ec03557d1c901f9e11dd0b4ca46a238f142a38 /qt-ui/maintab.cpp | |
parent | db0c1b834a9e3d516484a6e42f1fddc538477071 (diff) | |
download | subsurface-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.cpp | 6 |
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() |