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

View File

@ -59,7 +59,6 @@ class NetworkDialog;
class SearchDialog;
class TransfersDialog;
class MessagesDialog;
class MessengerWindow;
class PluginsPage;
class HomePage;
//class ChannelFeed;
@ -68,6 +67,9 @@ class MainPage;
class NewsFeed;
class UserNotify;
#ifdef MESSENGER_WINDOW
class MessengerWindow;
#endif
#ifdef UNFINISHED
class ApplicationWindow;
#endif
@ -224,7 +226,9 @@ private slots:
/** Toolbar fns. */
void addFriend();
//void newRsCollection();
#ifdef MESSENGER_WINDOW
void showMessengerWindow();
#endif
void showStatisticsWindow();
#ifdef ENABLE_WEBUI
void showWebinterface();

View File

@ -32,7 +32,6 @@ CrashStackTrace gCrashStackTrace;
#include "gui/FriendsDialog.h"
#include "gui/GenCertDialog.h"
#include "gui/MainWindow.h"
#include "gui/MessengerWindow.h"
#include "gui/NetworkDialog.h"
#include "gui/NetworkView.h"
#include "gui/QuickStartWizard.h"
@ -52,6 +51,9 @@ CrashStackTrace gCrashStackTrace;
#include "util/rsdir.h"
#include "util/rstime.h"
#ifdef MESSENGER_WINDOW
#include "gui/MessengerWindow.h"
#endif
#ifdef ENABLE_WEBUI
# include "gui/settings/WebuiPage.h"
#endif

View File

@ -363,7 +363,6 @@ HEADERS += rshare.h \
gui/AboutDialog.h \
gui/AboutWidget.h \
gui/NetworkView.h \
gui/MessengerWindow.h \
gui/FriendsDialog.h \
gui/ServicePermissionDialog.h \
gui/RemoteDirModel.h \
@ -622,7 +621,6 @@ FORMS += gui/StartDialog.ui \
gui/FileTransfer/BannedFilesDialog.ui \
gui/MainWindow.ui \
gui/NetworkView.ui \
gui/MessengerWindow.ui \
gui/FriendsDialog.ui \
gui/ShareManager.ui \
# gui/ShareDialog.ui \
@ -739,7 +737,6 @@ SOURCES += main.cpp \
gui/mainpagestack.cpp \
gui/MainWindow.cpp \
gui/NetworkView.cpp \
gui/MessengerWindow.cpp \
gui/FriendsDialog.cpp \
gui/ServicePermissionDialog.cpp \
gui/RemoteDirModel.cpp \
@ -1006,6 +1003,17 @@ unfinishedtranslations {
}
messenger {
SOURCES += gui/MessengerWindow.cpp \
gui/common/FriendList.cpp
HEADERS += gui/MessengerWindow.h \
gui/common/FriendList.h
FORMS += gui/MessengerWindow.ui \
gui/common/FriendList.ui
DEFiNES += MESSENGER_WINDOW
}
# Shifted Qt4.4 dependancies to here.
# qmake CONFIG=pluginmgr

View File

@ -140,6 +140,10 @@ rs_async_chat:CONFIG -= no_rs_async_chat
CONFIG *= direct_chat
no_direct_chat:CONFIG -= direct_chat
# To enable messemger window which has been deprecated since RetroShare 0.6.6 append
# the following assignation to qmake command line "CONFIG+=messenger"
# CONFIG *= messenger
# To disable bitdht append the following assignation to qmake command line
# "CONFIG+=no_bitdht"
CONFIG *= bitdht