diff options
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index d26ad2a3b..43bc4d3fb 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -51,6 +51,10 @@ #include <qthelper.h> #include <QtConcurrentRun> +#if defined(FBSUPPORT) +#include "socialnetworks.h" +#endif + QProgressDialog *progressDialog = NULL; bool progressDialogCanceled = false; @@ -235,6 +239,16 @@ MainWindow::MainWindow() : QMainWindow(), find_all_templates(); #endif +#if defined(FBSUPPORT) + FacebookManager *fb = FacebookManager::instance(); + connect(fb, SIGNAL(justLoggedIn(bool)), ui.actionFacebook, SLOT(setEnabled(bool))); + connect(fb, SIGNAL(justLoggedOut(bool)), ui.actionFacebook, SLOT(setEnabled(bool))); + connect(ui.actionFacebook, SIGNAL(triggered(bool)), fb, SLOT(sendDive())); + ui.actionFacebook->setEnabled(fb->loggedIn()); +#else + ui.actionFacebook->setEnabled(false); +#endif + ui.menubar->show(); set_git_update_cb(&updateProgress); } |