diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 3a81877ce..85870bbac 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -31,10 +31,13 @@ #include #include +#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() diff --git a/retroshare-gui/src/gui/MainWindow.h b/retroshare-gui/src/gui/MainWindow.h index d90b9e8bc..00c2b2664 100644 --- a/retroshare-gui/src/gui/MainWindow.h +++ b/retroshare-gui/src/gui/MainWindow.h @@ -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(); diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp index dc0f413e6..33387c68a 100644 --- a/retroshare-gui/src/main.cpp +++ b/retroshare-gui/src/main.cpp @@ -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 diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index a1cdde51e..06defa34c 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -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 diff --git a/retroshare.pri b/retroshare.pri index 90f308044..6a74c94d5 100644 --- a/retroshare.pri +++ b/retroshare.pri @@ -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