Commit of the new UDP Connection methods and

the rewrite of the retroshare core networking stack.

This check-in commits the changes to the GUI code.
Changes to use the new rspeers.h interface to 
the retroshare core.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@316 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-01-25 08:49:40 +00:00
parent c7ce92aba2
commit c4e1d73837
22 changed files with 651 additions and 486 deletions

View file

@ -29,8 +29,10 @@
#include <QToolBar>
#include <QTextCursor>
#include <QTextList>
#include "rsiface/rspeers.h"
/* Define the format used for displaying the date and time */
#define DATETIME_FMT "MMM dd hh:mm:ss"
@ -201,24 +203,21 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
std::ostringstream out;
int ts = time(NULL);
bool offline = true;
{
rsiface->lockData(); /* Lock Interface */
const NeighbourInfo *peer = rsiface->getFriend(dialogId);
if (!peer)
{
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(dialogId, detail))
{
std::cerr << "WARNING CANNOT GET PEER INFO!!!!" << std::endl;
}
else if (peer->statusString == "Online")
else if (detail.state & RS_PEER_STATE_CONNECTED)
{
offline = false;
}
}
rsiface->unlockData(); /* Unlock Interface */
}
if (offline)
{
QString line = "<br>\n<span style=\"color:#1D84C9\"><strong> ----- PEER OFFLINE (Chat will be lost) -----</strong></span> \n<br>";