mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
debugged basic chat lobby communication
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-ChatLobby@4708 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
46f1e2b562
commit
a0e3522273
10 changed files with 217 additions and 52 deletions
|
@ -34,6 +34,7 @@
|
|||
#include <sys/stat.h>
|
||||
|
||||
#include "PopupChatDialog.h"
|
||||
#include "ChatLobbyDialog.h"
|
||||
#include "PopupChatWindow.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "util/misc.h"
|
||||
|
@ -129,7 +130,7 @@ PopupChatDialog::PopupChatDialog(const std::string &id, const QString &name, QWi
|
|||
connect(ui.actionSave_Chat_History, SIGNAL(triggered()), this, SLOT(fileSaveAs()));
|
||||
connect(ui.actionClearOfflineMessages, SIGNAL(triggered()), this, SLOT(clearOfflineMessages()));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(const QString&, int)), this, SLOT(updateStatus(const QString&, int)));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(const QString&, int)), this, SLOT(updateStatus_slot(const QString&, int)));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewCustomStateString(const QString&, const QString&)), this, SLOT(updatePeersCustomStateString(const QString&, const QString&)));
|
||||
|
||||
connect(ui.chattextEdit,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(contextMenu(QPoint)));
|
||||
|
@ -263,13 +264,25 @@ void PopupChatDialog::processSettings(bool bLoad)
|
|||
{
|
||||
/* see if it exists already */
|
||||
PopupChatDialog *popupchatdialog = getExistingInstance(id);
|
||||
|
||||
if (popupchatdialog == NULL) {
|
||||
if (chatflags & RS_CHAT_OPEN) {
|
||||
RsPeerDetails sslDetails;
|
||||
if (rsPeers->getPeerDetails(id, sslDetails)) {
|
||||
ChatLobbyId lobby_id ;
|
||||
|
||||
if (rsPeers->getPeerDetails(id, sslDetails))
|
||||
{
|
||||
popupchatdialog = new PopupChatDialog(id, PeerDefs::nameWithLocation(sslDetails));
|
||||
chatDialogs[id] = popupchatdialog;
|
||||
|
||||
PopupChatWindow *window = PopupChatWindow::getWindow(false);
|
||||
window->addDialog(popupchatdialog);
|
||||
}
|
||||
else if (rsMsgs->isLobbyId(id, lobby_id))
|
||||
{
|
||||
popupchatdialog = new ChatLobbyDialog(id,lobby_id,QString::fromStdString(id));
|
||||
chatDialogs[id] = popupchatdialog;
|
||||
|
||||
PopupChatWindow *window = PopupChatWindow::getWindow(false);
|
||||
window->addDialog(popupchatdialog);
|
||||
}
|
||||
|
@ -1055,6 +1068,11 @@ void PopupChatDialog::clearOfflineMessages()
|
|||
manualDelete = false;
|
||||
}
|
||||
|
||||
void PopupChatDialog::updateStatus_slot(const QString &peer_id, int status)
|
||||
{
|
||||
updateStatus(peer_id,status) ;
|
||||
}
|
||||
|
||||
void PopupChatDialog::updateStatus(const QString &peer_id, int status)
|
||||
{
|
||||
std::string stdPeerId = peer_id.toStdString();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue