made messenger an optional component of the UI

This commit is contained in:
csoler 2019-08-21 15:23:25 +02:00
parent 30708c9518
commit 98e41ad075
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
5 changed files with 33 additions and 6 deletions

View file

@ -31,10 +31,13 @@
#include <retroshare/rsplugin.h>
#include <retroshare/rsconfig.h>
#ifdef MESSENGER_WINDOW
#include "MessengerWindow.h"
#endif
#include "rshare.h"
#include "MainWindow.h"
#include "ui_MainWindow.h"
#include "MessengerWindow.h"
#include "HomePage.h"
#include "NetworkDialog.h"
#include "gui/FileTransfer/SearchDialog.h"
@ -359,7 +362,9 @@ MainWindow::~MainWindow()
delete soundStatus;
delete toasterDisable;
delete sysTrayStatus;
#ifdef MESSENGER_WINDOW
MessengerWindow::releaseInstance();
#endif
#ifdef UNFINISHED
delete applicationWindow;
#endif
@ -586,7 +591,9 @@ void MainWindow::createTrayIcon()
notifyMenu->menuAction()->setVisible(false);
trayMenu->addSeparator();
#ifdef MESSENGER_WINDOW
trayMenu->addAction(QIcon(IMAGE_MESSENGER), tr("Open Messenger"), this, SLOT(showMessengerWindow()));
#endif
trayMenu->addAction(QIcon(IMAGE_MESSAGES), tr("Open Messages"), this, SLOT(showMess()));
#ifdef ENABLE_WEBUI
trayMenu->addAction(QIcon(":/images/emblem-web.png"), tr("Show web interface"), this, SLOT(showWebinterface()));
@ -1085,11 +1092,13 @@ void MainWindow::showSettings()
showWindow(MainWindow::Options);
}
#ifdef MESSENGER_WINDOW
/** Shows Messenger window */
void MainWindow::showMessengerWindow()
{
MessengerWindow::showYourself();
}
#endif
/** Shows Statistics window */
void MainWindow::showStatisticsWindow()