diff --git a/libretroshare/src/chat/p3chatservice.cc b/libretroshare/src/chat/p3chatservice.cc
index c5674ee90..482120940 100644
--- a/libretroshare/src/chat/p3chatservice.cc
+++ b/libretroshare/src/chat/p3chatservice.cc
@@ -848,9 +848,18 @@ bool p3ChatService::handleRecvChatMsgItem(RsChatMsgItem *& ci)
RsServer::notify()->AddPopupMessage(popupChatFlag, ci->PeerId().toStdString(), name, message); /* notify private chat message */
else
{
- /* notify public chat message */
- RsServer::notify()->AddPopupMessage(RS_POPUP_GROUPCHAT, ci->PeerId().toStdString(), "", message);
- RsServer::notify()->AddFeedItem(RS_FEED_ITEM_CHAT_NEW, ci->PeerId().toStdString(), message, "");
+#ifdef RS_DIRECT_CHAT
+ /* notify public chat message */
+ RsServer::notify()->AddPopupMessage(
+ RS_POPUP_GROUPCHAT,
+ ci->PeerId().toStdString(), "", message );
+ RsServer::notify()->AddFeedItem(
+ RS_FEED_ITEM_CHAT_NEW,
+ ci->PeerId().toStdString(), message, "" );
+#else // def RS_DIRECT_CHAT
+ /* Ignore deprecated direct node broadcast chat messages */
+ return false;
+#endif
}
}
diff --git a/retroshare-gui/src/gui/FriendsDialog.cpp b/retroshare-gui/src/gui/FriendsDialog.cpp
index 8fed35c56..8eb05a137 100644
--- a/retroshare-gui/src/gui/FriendsDialog.cpp
+++ b/retroshare-gui/src/gui/FriendsDialog.cpp
@@ -69,9 +69,9 @@ FriendsDialog::FriendsDialog(QWidget *parent)
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
- if (instance == NULL) {
- instance = this;
- }
+ if (!instance) instance = this;
+
+#ifdef RS_DIRECT_CHAT
QString msg = tr("Retroshare broadcast chat: messages are sent to all connected friends.");
// "" + DateTime::formatTime(QTime::currentTime()) + " -
msg = QString("" + msg + "");
@@ -82,6 +82,10 @@ FriendsDialog::FriendsDialog(QWidget *parent)
this, SLOT(chatMessageReceived(ChatMessage)));
connect(NotifyQt::getInstance(), SIGNAL(chatStatusChanged(ChatId,QString)),
this, SLOT(chatStatusReceived(ChatId,QString)));
+#else // def RS_DIRECT_CHAT
+ ui.tabWidget->removeTab(ui.tabWidget->indexOf(ui.groupChatTab));
+#endif // def RS_DIRECT_CHAT
+
connect( ui.mypersonalstatusLabel, SIGNAL(clicked()), SLOT(statusmessage()));
connect( ui.actionSet_your_Avatar, SIGNAL(triggered()), this, SLOT(getAvatar()));
diff --git a/retroshare-gui/src/gui/notifyqt.cpp b/retroshare-gui/src/gui/notifyqt.cpp
index fa7bb4c82..b19c1f61a 100644
--- a/retroshare-gui/src/gui/notifyqt.cpp
+++ b/retroshare-gui/src/gui/notifyqt.cpp
@@ -894,6 +894,7 @@ void NotifyQt::UpdateGUI()
}
break;
case RS_POPUP_GROUPCHAT:
+#ifdef RS_DIRECT_CHAT
if ((popupflags & RS_POPUP_GROUPCHAT) && !_disableAllToaster)
{
MainWindow *mainWindow = MainWindow::getInstance();
@@ -907,6 +908,7 @@ void NotifyQt::UpdateGUI()
}
toaster = new ToasterItem(new GroupChatToaster(RsPeerId(id), QString::fromUtf8(msg.c_str())));
}
+#endif // RS_DIRECT_CHAT
break;
case RS_POPUP_CHATLOBBY:
if ((popupflags & RS_POPUP_CHATLOBBY) && !_disableAllToaster)
@@ -1041,7 +1043,9 @@ void NotifyQt::testToasters(uint notifyFlags, /*RshareSettings::enumToasterPosit
toaster = new ToasterItem(new ChatToaster(id, message));
break;
case RS_POPUP_GROUPCHAT:
+#ifdef RS_DIRECT_CHAT
toaster = new ToasterItem(new GroupChatToaster(id, message));
+#endif // RS_DIRECT_CHAT
break;
case RS_POPUP_CHATLOBBY:
{
diff --git a/retroshare-gui/src/gui/settings/NotifyPage.cpp b/retroshare-gui/src/gui/settings/NotifyPage.cpp
index 7c0bdd123..b3dcf3a62 100755
--- a/retroshare-gui/src/gui/settings/NotifyPage.cpp
+++ b/retroshare-gui/src/gui/settings/NotifyPage.cpp
@@ -322,7 +322,9 @@ void NotifyPage::load()
whileBlocking(ui.popup_NewMsg)->setChecked(notifyflags & RS_POPUP_MSG);
whileBlocking(ui.popup_DownloadFinished)->setChecked(notifyflags & RS_POPUP_DOWNLOAD);
whileBlocking(ui.popup_PrivateChat)->setChecked(notifyflags & RS_POPUP_CHAT);
+#ifdef RS_DIRECT_CHAT
whileBlocking(ui.popup_GroupChat)->setChecked(notifyflags & RS_POPUP_GROUPCHAT);
+#endif // def RS_DIRECT_CHAT
whileBlocking(ui.popup_ChatLobby)->setChecked(notifyflags & RS_POPUP_CHATLOBBY);
whileBlocking(ui.popup_ConnectAttempt)->setChecked(notifyflags & RS_POPUP_CONNECT_ATTEMPT);