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>
This commit is contained in:
Tomaz Canabrava 2014-12-28 20:24:02 -02:00 committed by Dirk Hohndel
parent db0c1b834a
commit 571f86485d
6 changed files with 186 additions and 185 deletions

View file

@ -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()