mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -05:00
Removed most debugging/std::cerr output (in #defines)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@640 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bbe2ba2103
commit
d5376cd575
@ -33,6 +33,9 @@
|
|||||||
|
|
||||||
#include "GeneralMsgDialog.h"
|
#include "GeneralMsgDialog.h"
|
||||||
|
|
||||||
|
/****
|
||||||
|
* #define CHAN_DEBUG
|
||||||
|
***/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
ChannelFeed::ChannelFeed(QWidget *parent)
|
ChannelFeed::ChannelFeed(QWidget *parent)
|
||||||
@ -125,8 +128,10 @@ void ChannelFeed::channelSelection()
|
|||||||
|
|
||||||
void ChannelFeed::sendMsg()
|
void ChannelFeed::sendMsg()
|
||||||
{
|
{
|
||||||
|
#ifdef CHAN_DEBUG
|
||||||
std::cerr << "ChannelFeed::sendMsg()";
|
std::cerr << "ChannelFeed::sendMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (mChannelId != "")
|
if (mChannelId != "")
|
||||||
{
|
{
|
||||||
@ -134,8 +139,10 @@ void ChannelFeed::sendMsg()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef CHAN_DEBUG
|
||||||
std::cerr << "ChannelFeed::sendMsg() no Channel Selected!";
|
std::cerr << "ChannelFeed::sendMsg() no Channel Selected!";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -158,8 +165,10 @@ void ChannelFeed::openChat(std::string peerId)
|
|||||||
|
|
||||||
void ChannelFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
void ChannelFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
||||||
{
|
{
|
||||||
|
#ifdef CHAN_DEBUG
|
||||||
std::cerr << "ChannelFeed::openMsg()";
|
std::cerr << "ChannelFeed::openMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
||||||
|
|
||||||
|
|
||||||
@ -304,8 +313,10 @@ void ChannelFeed::updateChannelListOwn(std::list<std::string> &ids)
|
|||||||
int index = topIndex + 1;
|
int index = topIndex + 1;
|
||||||
for (iit = ids.begin(); iit != ids.end(); iit++, index++)
|
for (iit = ids.begin(); iit != ids.end(); iit++, index++)
|
||||||
{
|
{
|
||||||
|
#ifdef CHAN_DEBUG
|
||||||
std::cerr << "ChannelFeed::updateChannelListOwn(): " << *iit << " at: " << index;
|
std::cerr << "ChannelFeed::updateChannelListOwn(): " << *iit << " at: " << index;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
ChanMenuItem *cmi = new ChanMenuItem(*iit);
|
ChanMenuItem *cmi = new ChanMenuItem(*iit);
|
||||||
mChannelListOwn.push_back(cmi);
|
mChannelListOwn.push_back(cmi);
|
||||||
@ -331,8 +342,10 @@ void ChannelFeed::updateChannelListSub(std::list<std::string> &ids)
|
|||||||
int index = topIndex + 1;
|
int index = topIndex + 1;
|
||||||
for (iit = ids.begin(); iit != ids.end(); iit++, index++)
|
for (iit = ids.begin(); iit != ids.end(); iit++, index++)
|
||||||
{
|
{
|
||||||
|
#ifdef CHAN_DEBUG
|
||||||
std::cerr << "ChannelFeed::updateChannelListSub(): " << *iit << " at: " << index;
|
std::cerr << "ChannelFeed::updateChannelListSub(): " << *iit << " at: " << index;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
ChanMenuItem *cmi = new ChanMenuItem(*iit);
|
ChanMenuItem *cmi = new ChanMenuItem(*iit);
|
||||||
mChannelListSub.push_back(cmi);
|
mChannelListSub.push_back(cmi);
|
||||||
@ -358,8 +371,10 @@ void ChannelFeed::updateChannelListPop(std::list<std::string> &ids)
|
|||||||
int index = topIndex + 1;
|
int index = topIndex + 1;
|
||||||
for (iit = ids.begin(); iit != ids.end(); iit++, index++)
|
for (iit = ids.begin(); iit != ids.end(); iit++, index++)
|
||||||
{
|
{
|
||||||
|
#ifdef CHAN_DEBUG
|
||||||
std::cerr << "ChannelFeed::updateChannelListPop(): " << *iit << " at: " << index;
|
std::cerr << "ChannelFeed::updateChannelListPop(): " << *iit << " at: " << index;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
ChanMenuItem *cmi = new ChanMenuItem(*iit);
|
ChanMenuItem *cmi = new ChanMenuItem(*iit);
|
||||||
mChannelListPop.push_back(cmi);
|
mChannelListPop.push_back(cmi);
|
||||||
@ -386,8 +401,10 @@ void ChannelFeed::updateChannelListOther(std::list<std::string> &ids)
|
|||||||
int index = topIndex + 1;
|
int index = topIndex + 1;
|
||||||
for (iit = ids.begin(); iit != ids.end(); iit++, index++)
|
for (iit = ids.begin(); iit != ids.end(); iit++, index++)
|
||||||
{
|
{
|
||||||
|
#ifdef CHAN_DEBUG
|
||||||
std::cerr << "ChannelFeed::updateChannelListOther(): " << *iit << " at: " << index;
|
std::cerr << "ChannelFeed::updateChannelListOther(): " << *iit << " at: " << index;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
ChanMenuItem *cmi = new ChanMenuItem(*iit);
|
ChanMenuItem *cmi = new ChanMenuItem(*iit);
|
||||||
mChannelListOther.push_back(cmi);
|
mChannelListOther.push_back(cmi);
|
||||||
@ -462,7 +479,7 @@ void ChannelFeed::updateChannelMsgs()
|
|||||||
|
|
||||||
void ChannelFeed::unsubscribeChannel()
|
void ChannelFeed::unsubscribeChannel()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_ITEM
|
#ifdef CHAN_DEBUG
|
||||||
std::cerr << "ChannelFeed::unsubscribeChannel()";
|
std::cerr << "ChannelFeed::unsubscribeChannel()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
@ -476,7 +493,7 @@ void ChannelFeed::unsubscribeChannel()
|
|||||||
|
|
||||||
void ChannelFeed::subscribeChannel()
|
void ChannelFeed::subscribeChannel()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_ITEM
|
#ifdef CHAN_DEBUG
|
||||||
std::cerr << "ChannelFeed::subscribeChannel()";
|
std::cerr << "ChannelFeed::subscribeChannel()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
@ -50,6 +50,10 @@
|
|||||||
|
|
||||||
RsCertId getNeighRsCertId(QTreeWidgetItem *i);
|
RsCertId getNeighRsCertId(QTreeWidgetItem *i);
|
||||||
|
|
||||||
|
/****
|
||||||
|
* #define CONN_DEBUG 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
ConnectionsDialog::ConnectionsDialog(QWidget *parent)
|
ConnectionsDialog::ConnectionsDialog(QWidget *parent)
|
||||||
: MainPage(parent), connectdialog(NULL)
|
: MainPage(parent), connectdialog(NULL)
|
||||||
@ -122,8 +126,10 @@ void ConnectionsDialog::connecttreeWidgetCostumPopupMenu( QPoint point )
|
|||||||
|
|
||||||
/** Shows Peer Information/Auth Dialog */
|
/** Shows Peer Information/Auth Dialog */
|
||||||
void ConnectionsDialog::peerdetails()
|
void ConnectionsDialog::peerdetails()
|
||||||
{
|
{
|
||||||
|
#ifdef CONN_DEBUG
|
||||||
std::cerr << "ConnectionsDialog::peerdetails()" << std::endl;
|
std::cerr << "ConnectionsDialog::peerdetails()" << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
QTreeWidgetItem *wi = getCurrentNeighbour();
|
QTreeWidgetItem *wi = getCurrentNeighbour();
|
||||||
if (!wi)
|
if (!wi)
|
||||||
@ -139,7 +145,10 @@ void ConnectionsDialog::peerdetails()
|
|||||||
/** Shows Peer Information/Auth Dialog */
|
/** Shows Peer Information/Auth Dialog */
|
||||||
void ConnectionsDialog::showpeerdetails(std::string id)
|
void ConnectionsDialog::showpeerdetails(std::string id)
|
||||||
{
|
{
|
||||||
|
#ifdef CONN_DEBUG
|
||||||
std::cerr << "ConnectionsDialog::showpeerdetails()" << std::endl;
|
std::cerr << "ConnectionsDialog::showpeerdetails()" << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((connectdialog) && (connectdialog -> loadPeer(id)))
|
if ((connectdialog) && (connectdialog -> loadPeer(id)))
|
||||||
{
|
{
|
||||||
connectdialog->show();
|
connectdialog->show();
|
||||||
@ -338,7 +347,9 @@ QTreeWidgetItem *ConnectionsDialog::getCurrentNeighbour()
|
|||||||
QTreeWidgetItem *item = connectWidget -> currentItem();
|
QTreeWidgetItem *item = connectWidget -> currentItem();
|
||||||
if (!item)
|
if (!item)
|
||||||
{
|
{
|
||||||
|
#ifdef CONN_DEBUG
|
||||||
std::cerr << "Invalid Current Item" << std::endl;
|
std::cerr << "Invalid Current Item" << std::endl;
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,7 +362,9 @@ QTreeWidgetItem *ConnectionsDialog::getCurrentNeighbour()
|
|||||||
QString txt = item -> text(i);
|
QString txt = item -> text(i);
|
||||||
out << "\t" << i << ":" << txt.toStdString() << std::endl;
|
out << "\t" << i << ":" << txt.toStdString() << std::endl;
|
||||||
}
|
}
|
||||||
|
#ifdef CONN_DEBUG
|
||||||
std::cerr << out.str();
|
std::cerr << out.str();
|
||||||
|
#endif
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -372,7 +385,9 @@ RsCertId getNeighRsCertId(QTreeWidgetItem *i)
|
|||||||
|
|
||||||
std::string ConnectionsDialog::loadneighbour()
|
std::string ConnectionsDialog::loadneighbour()
|
||||||
{
|
{
|
||||||
|
#ifdef CONN_DEBUG
|
||||||
std::cerr << "ConnectionsDialog::loadneighbour()" << std::endl;
|
std::cerr << "ConnectionsDialog::loadneighbour()" << std::endl;
|
||||||
|
#endif
|
||||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select Certificate"), "",
|
QString fileName = QFileDialog::getOpenFileName(this, tr("Select Certificate"), "",
|
||||||
tr("Certificates (*.pqi *.pem)"));
|
tr("Certificates (*.pqi *.pem)"));
|
||||||
|
|
||||||
@ -388,7 +403,9 @@ std::string ConnectionsDialog::loadneighbour()
|
|||||||
void ConnectionsDialog::addneighbour()
|
void ConnectionsDialog::addneighbour()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *c = getCurrentNeighbour();
|
QTreeWidgetItem *c = getCurrentNeighbour();
|
||||||
|
#ifdef CONN_DEBUG
|
||||||
std::cerr << "ConnectionsDialog::addneighbour()" << std::endl;
|
std::cerr << "ConnectionsDialog::addneighbour()" << std::endl;
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
rsServer->NeighAddFriend(getNeighRsCertId(c));
|
rsServer->NeighAddFriend(getNeighRsCertId(c));
|
||||||
*/
|
*/
|
||||||
@ -397,7 +414,9 @@ void ConnectionsDialog::addneighbour()
|
|||||||
void ConnectionsDialog::authneighbour()
|
void ConnectionsDialog::authneighbour()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *c = getCurrentNeighbour();
|
QTreeWidgetItem *c = getCurrentNeighbour();
|
||||||
|
#ifdef CONN_DEBUG
|
||||||
std::cerr << "ConnectionsDialog::authneighbour()" << std::endl;
|
std::cerr << "ConnectionsDialog::authneighbour()" << std::endl;
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
RsAuthId code;
|
RsAuthId code;
|
||||||
rsServer->NeighAuthFriend(getNeighRsCertId(c), code);
|
rsServer->NeighAuthFriend(getNeighRsCertId(c), code);
|
||||||
|
@ -53,7 +53,11 @@
|
|||||||
#define IMAGE_OK ":/images/filerating3.png"
|
#define IMAGE_OK ":/images/filerating3.png"
|
||||||
#define IMAGE_SUX ":/images/filerating2.png"
|
#define IMAGE_SUX ":/images/filerating2.png"
|
||||||
#define IMAGE_BADLINK ":/images/filerating1.png"
|
#define IMAGE_BADLINK ":/images/filerating1.png"
|
||||||
|
|
||||||
|
/******
|
||||||
|
* #define LINKS_DEBUG 1
|
||||||
|
*****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
LinksDialog::LinksDialog(QWidget *parent)
|
LinksDialog::LinksDialog(QWidget *parent)
|
||||||
: MainPage(parent)
|
: MainPage(parent)
|
||||||
@ -303,7 +307,9 @@ void LinksDialog::updateLinks()
|
|||||||
std::list<std::string>::iterator rit;
|
std::list<std::string>::iterator rit;
|
||||||
std::list<RsRankComment>::iterator cit;
|
std::list<RsRankComment>::iterator cit;
|
||||||
|
|
||||||
|
#ifdef LINKS_DEBUG
|
||||||
std::cerr << "LinksDialog::updateLinks()" << std::endl;
|
std::cerr << "LinksDialog::updateLinks()" << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Work out the number/entries to show */
|
/* Work out the number/entries to show */
|
||||||
uint32_t count = rsRanks->getRankingsCount();
|
uint32_t count = rsRanks->getRankingsCount();
|
||||||
@ -488,12 +494,17 @@ void LinksDialog::updateLinks()
|
|||||||
|
|
||||||
void LinksDialog::openLink ( QTreeWidgetItem * item, int column )
|
void LinksDialog::openLink ( QTreeWidgetItem * item, int column )
|
||||||
{
|
{
|
||||||
|
#ifdef LINKS_DEBUG
|
||||||
std::cerr << "LinksDialog::openLink()" << std::endl;
|
std::cerr << "LinksDialog::openLink()" << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* work out the ids */
|
/* work out the ids */
|
||||||
if (!item)
|
if (!item)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef LINKS_DEBUG
|
||||||
std::cerr << "LinksDialog::openLink() Failed Item" << std::endl;
|
std::cerr << "LinksDialog::openLink() Failed Item" << std::endl;
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -504,11 +515,15 @@ void LinksDialog::openLink ( QTreeWidgetItem * item, int column )
|
|||||||
if (parent)
|
if (parent)
|
||||||
{
|
{
|
||||||
/* a child comment -> ignore double click */
|
/* a child comment -> ignore double click */
|
||||||
|
#ifdef LINKS_DEBUG
|
||||||
std::cerr << "LinksDialog::openLink() Failed Child" << std::endl;
|
std::cerr << "LinksDialog::openLink() Failed Child" << std::endl;
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LINKS_DEBUG
|
||||||
std::cerr << "LinksDialog::openLink() " << (item->text(2)).toStdString() << std::endl;
|
std::cerr << "LinksDialog::openLink() " << (item->text(2)).toStdString() << std::endl;
|
||||||
|
#endif
|
||||||
/* open a browser */
|
/* open a browser */
|
||||||
QUrl url(item->text(2));
|
QUrl url(item->text(2));
|
||||||
QDesktopServices::openUrl ( url );
|
QDesktopServices::openUrl ( url );
|
||||||
@ -536,8 +551,10 @@ void LinksDialog::changedItem(QTreeWidgetItem *curr, QTreeWidgetItem *prev)
|
|||||||
rid = (parent->text(4)).toStdString();
|
rid = (parent->text(4)).toStdString();
|
||||||
pid = (curr->text(4)).toStdString();
|
pid = (curr->text(4)).toStdString();
|
||||||
|
|
||||||
|
#ifdef LINKS_DEBUG
|
||||||
std::cerr << "LinksDialog::changedItem() Rid: " << rid << " Pid: " << pid;
|
std::cerr << "LinksDialog::changedItem() Rid: " << rid << " Pid: " << pid;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
updateComments(rid, pid);
|
updateComments(rid, pid);
|
||||||
}
|
}
|
||||||
@ -545,8 +562,10 @@ void LinksDialog::changedItem(QTreeWidgetItem *curr, QTreeWidgetItem *prev)
|
|||||||
{
|
{
|
||||||
rid = (curr->text(4)).toStdString();
|
rid = (curr->text(4)).toStdString();
|
||||||
|
|
||||||
|
#ifdef LINKS_DEBUG
|
||||||
std::cerr << "LinksDialog::changedItem() Rid: " << rid << " Pid: NULL";
|
std::cerr << "LinksDialog::changedItem() Rid: " << rid << " Pid: NULL";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
updateComments(rid, "");
|
updateComments(rid, "");
|
||||||
}
|
}
|
||||||
@ -805,10 +824,13 @@ QTreeWidgetItem *LinksDialog::getCurrentLine()
|
|||||||
QTreeWidgetItem *item = peerWidget -> currentItem();
|
QTreeWidgetItem *item = peerWidget -> currentItem();
|
||||||
if (!item)
|
if (!item)
|
||||||
{
|
{
|
||||||
|
#ifdef LINKS_DEBUG
|
||||||
std::cerr << "Invalid Current Item" << std::endl;
|
std::cerr << "Invalid Current Item" << std::endl;
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LINKS_DEBUG
|
||||||
/* Display the columns of this item. */
|
/* Display the columns of this item. */
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
out << "CurrentPeerItem: " << std::endl;
|
out << "CurrentPeerItem: " << std::endl;
|
||||||
@ -819,6 +841,8 @@ QTreeWidgetItem *LinksDialog::getCurrentLine()
|
|||||||
out << "\t" << i << ":" << txt.toStdString() << std::endl;
|
out << "\t" << i << ":" << txt.toStdString() << std::endl;
|
||||||
}
|
}
|
||||||
std::cerr << out.str();
|
std::cerr << out.str();
|
||||||
|
#endif
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -839,7 +863,9 @@ void LinksDialog::voteup_anon()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString link = QString::fromStdWString(detail.link);
|
QString link = QString::fromStdWString(detail.link);
|
||||||
|
#ifdef LINKS_DEBUG
|
||||||
std::cerr << "LinksDialog::voteup_anon() : " << link.toStdString() << std::endl;
|
std::cerr << "LinksDialog::voteup_anon() : " << link.toStdString() << std::endl;
|
||||||
|
#endif
|
||||||
// need a proper anon sharing option.
|
// need a proper anon sharing option.
|
||||||
rsRanks->anonRankMsg(mLinkId, detail.link, detail.title);
|
rsRanks->anonRankMsg(mLinkId, detail.link, detail.title);
|
||||||
}
|
}
|
||||||
@ -863,7 +889,9 @@ void LinksDialog::voteup_score(int score)
|
|||||||
|
|
||||||
QString link = QString::fromStdWString(detail.link);
|
QString link = QString::fromStdWString(detail.link);
|
||||||
std::wstring comment;
|
std::wstring comment;
|
||||||
|
#ifdef LINKS_DEBUG
|
||||||
std::cerr << "LinksDialog::voteup_score() : " << link.toStdString() << std::endl;
|
std::cerr << "LinksDialog::voteup_score() : " << link.toStdString() << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
std::list<RsRankComment>::iterator cit;
|
std::list<RsRankComment>::iterator cit;
|
||||||
|
@ -63,8 +63,12 @@
|
|||||||
/* Images for Status icons */
|
/* Images for Status icons */
|
||||||
#define IMAGE_ON ":/images/contract_hover.png"
|
#define IMAGE_ON ":/images/contract_hover.png"
|
||||||
#define IMAGE_OFF ":/images/expand_hover.png"
|
#define IMAGE_OFF ":/images/expand_hover.png"
|
||||||
|
|
||||||
|
/******
|
||||||
|
* #define MSG_DEBUG 1
|
||||||
|
*****/
|
||||||
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
MessengerWindow::MessengerWindow(QWidget * parent)
|
MessengerWindow::MessengerWindow(QWidget * parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
@ -299,11 +303,15 @@ void MessengerWindow::connectfriend2()
|
|||||||
std::string id = (i -> text(4)).toStdString();
|
std::string id = (i -> text(4)).toStdString();
|
||||||
if (rsPeers->isOnline(id))
|
if (rsPeers->isOnline(id))
|
||||||
{
|
{
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "MessengerWindow::connectfriend2() Already online" << std::endl;
|
std::cerr << "MessengerWindow::connectfriend2() Already online" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "MessengerWindow::connectfriend2() Trying" << std::endl;
|
std::cerr << "MessengerWindow::connectfriend2() Trying" << std::endl;
|
||||||
|
#endif
|
||||||
rsPeers->connectAttempt(getMessengerPeerRsCertId(i));
|
rsPeers->connectAttempt(getMessengerPeerRsCertId(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -400,7 +408,9 @@ void MessengerWindow::chatfriend2()
|
|||||||
void MessengerWindow::sendMessage()
|
void MessengerWindow::sendMessage()
|
||||||
{
|
{
|
||||||
bool isOnline;
|
bool isOnline;
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "SharedFilesDialog::msgfriend()" << std::endl;
|
std::cerr << "SharedFilesDialog::msgfriend()" << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
QTreeWidgetItem *i = getCurrentPeer(isOnline);
|
QTreeWidgetItem *i = getCurrentPeer(isOnline);
|
||||||
|
|
||||||
@ -431,7 +441,9 @@ QTreeWidgetItem *MessengerWindow::getCurrentPeer(bool &isOnline)
|
|||||||
QTreeWidgetItem *item = peerWidget -> currentItem();
|
QTreeWidgetItem *item = peerWidget -> currentItem();
|
||||||
if (!item)
|
if (!item)
|
||||||
{
|
{
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "Invalid Current Item" << std::endl;
|
std::cerr << "Invalid Current Item" << std::endl;
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -440,7 +452,9 @@ QTreeWidgetItem *MessengerWindow::getCurrentPeer(bool &isOnline)
|
|||||||
if ((!parent) ||
|
if ((!parent) ||
|
||||||
(parent == peerWidget->invisibleRootItem()))
|
(parent == peerWidget->invisibleRootItem()))
|
||||||
{
|
{
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "Selected Parent Invalid Item" << std::endl;
|
std::cerr << "Selected Parent Invalid Item" << std::endl;
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -453,10 +467,14 @@ void MessengerWindow::removefriend2()
|
|||||||
{
|
{
|
||||||
bool isOnline;
|
bool isOnline;
|
||||||
QTreeWidgetItem *c = getCurrentPeer(isOnline);
|
QTreeWidgetItem *c = getCurrentPeer(isOnline);
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "MessengerWindow::removefriend2()" << std::endl;
|
std::cerr << "MessengerWindow::removefriend2()" << std::endl;
|
||||||
|
#endif
|
||||||
if (!c)
|
if (!c)
|
||||||
{
|
{
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "MessengerWindow::removefriend2() Noone Selected -- sorry" << std::endl;
|
std::cerr << "MessengerWindow::removefriend2() Noone Selected -- sorry" << std::endl;
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rsPeers->removeFriend(getMessengerPeerRsCertId(c));
|
rsPeers->removeFriend(getMessengerPeerRsCertId(c));
|
||||||
|
@ -29,6 +29,10 @@
|
|||||||
#include "rsiface/rsmsgs.h"
|
#include "rsiface/rsmsgs.h"
|
||||||
#include "rsiface/rspeers.h"
|
#include "rsiface/rspeers.h"
|
||||||
|
|
||||||
|
/*****
|
||||||
|
* #define MSG_DEBUG 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
MsgFeed::MsgFeed(QWidget *parent)
|
MsgFeed::MsgFeed(QWidget *parent)
|
||||||
: MainPage (parent)
|
: MainPage (parent)
|
||||||
@ -78,20 +82,27 @@ MsgFeed::MsgFeed(QWidget *parent)
|
|||||||
/* FeedHolder Functions (for FeedItem functionality) */
|
/* FeedHolder Functions (for FeedItem functionality) */
|
||||||
void MsgFeed::deleteFeedItem(QWidget *item, uint32_t type)
|
void MsgFeed::deleteFeedItem(QWidget *item, uint32_t type)
|
||||||
{
|
{
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "MsgFeed::deleteFeedItem()";
|
std::cerr << "MsgFeed::deleteFeedItem()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MsgFeed::openChat(std::string peerId)
|
void MsgFeed::openChat(std::string peerId)
|
||||||
{
|
{
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "MsgFeed::openChat()";
|
std::cerr << "MsgFeed::openChat()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MsgFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
void MsgFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
||||||
{
|
{
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "MsgFeed::openMsg()";
|
std::cerr << "MsgFeed::openMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
||||||
|
|
||||||
|
|
||||||
@ -103,8 +114,11 @@ void MsgFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
|||||||
|
|
||||||
void MsgFeed::newMsg()
|
void MsgFeed::newMsg()
|
||||||
{
|
{
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "MsgFeed::newMsg()";
|
std::cerr << "MsgFeed::newMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
||||||
|
|
||||||
msgDialog->setMsgType(FEEDHOLDER_MSG_MESSAGE);
|
msgDialog->setMsgType(FEEDHOLDER_MSG_MESSAGE);
|
||||||
@ -156,8 +170,10 @@ void MsgFeed::updateSort()
|
|||||||
|
|
||||||
void MsgFeed::updatePeerIds()
|
void MsgFeed::updatePeerIds()
|
||||||
{
|
{
|
||||||
|
#ifdef MSG_DEBUG
|
||||||
std::cerr << "MsgFeed::updatePeerIds()";
|
std::cerr << "MsgFeed::updatePeerIds()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
int selectIdx = 0; /* ALL */
|
int selectIdx = 0; /* ALL */
|
||||||
std::string peerId;
|
std::string peerId;
|
||||||
|
@ -52,6 +52,10 @@
|
|||||||
|
|
||||||
RsCertId getNeighRsCertId(QTreeWidgetItem *i);
|
RsCertId getNeighRsCertId(QTreeWidgetItem *i);
|
||||||
|
|
||||||
|
/******
|
||||||
|
* #define NET_DEBUG 1
|
||||||
|
*****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
NetworkDialog::NetworkDialog(QWidget *parent)
|
NetworkDialog::NetworkDialog(QWidget *parent)
|
||||||
: MainPage(parent), connectdialog(NULL)
|
: MainPage(parent), connectdialog(NULL)
|
||||||
@ -138,8 +142,10 @@ void NetworkDialog::connecttreeWidgetCostumPopupMenu( QPoint point )
|
|||||||
|
|
||||||
/** Shows Peer Information/Auth Dialog */
|
/** Shows Peer Information/Auth Dialog */
|
||||||
void NetworkDialog::peerdetails()
|
void NetworkDialog::peerdetails()
|
||||||
{
|
{
|
||||||
|
#ifdef NET_DEBUG
|
||||||
std::cerr << "ConnectionsDialog::peerdetails()" << std::endl;
|
std::cerr << "ConnectionsDialog::peerdetails()" << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
QTreeWidgetItem *wi = getCurrentNeighbour();
|
QTreeWidgetItem *wi = getCurrentNeighbour();
|
||||||
if (!wi)
|
if (!wi)
|
||||||
@ -155,7 +161,9 @@ void NetworkDialog::peerdetails()
|
|||||||
/** Shows Peer Information/Auth Dialog */
|
/** Shows Peer Information/Auth Dialog */
|
||||||
void NetworkDialog::showpeerdetails(std::string id)
|
void NetworkDialog::showpeerdetails(std::string id)
|
||||||
{
|
{
|
||||||
|
#ifdef NET_DEBUG
|
||||||
std::cerr << "ConnectionsDialog::showpeerdetails()" << std::endl;
|
std::cerr << "ConnectionsDialog::showpeerdetails()" << std::endl;
|
||||||
|
#endif
|
||||||
if ((connectdialog) && (connectdialog -> loadPeer(id)))
|
if ((connectdialog) && (connectdialog -> loadPeer(id)))
|
||||||
{
|
{
|
||||||
connectdialog->show();
|
connectdialog->show();
|
||||||
@ -392,7 +400,9 @@ QTreeWidgetItem *NetworkDialog::getCurrentNeighbour()
|
|||||||
QTreeWidgetItem *item = connectWidget -> currentItem();
|
QTreeWidgetItem *item = connectWidget -> currentItem();
|
||||||
if (!item)
|
if (!item)
|
||||||
{
|
{
|
||||||
|
#ifdef NET_DEBUG
|
||||||
std::cerr << "Invalid Current Item" << std::endl;
|
std::cerr << "Invalid Current Item" << std::endl;
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,7 +428,9 @@ RsCertId getNeighRsCertId(QTreeWidgetItem *i)
|
|||||||
|
|
||||||
std::string NetworkDialog::loadneighbour()
|
std::string NetworkDialog::loadneighbour()
|
||||||
{
|
{
|
||||||
|
#ifdef NET_DEBUG
|
||||||
std::cerr << "ConnectionsDialog::loadneighbour()" << std::endl;
|
std::cerr << "ConnectionsDialog::loadneighbour()" << std::endl;
|
||||||
|
#endif
|
||||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select Certificate"), "",
|
QString fileName = QFileDialog::getOpenFileName(this, tr("Select Certificate"), "",
|
||||||
tr("Certificates (*.pqi *.pem)"));
|
tr("Certificates (*.pqi *.pem)"));
|
||||||
|
|
||||||
@ -434,7 +446,9 @@ std::string NetworkDialog::loadneighbour()
|
|||||||
void NetworkDialog::addneighbour()
|
void NetworkDialog::addneighbour()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *c = getCurrentNeighbour();
|
QTreeWidgetItem *c = getCurrentNeighbour();
|
||||||
|
#ifdef NET_DEBUG
|
||||||
std::cerr << "ConnectionsDialog::addneighbour()" << std::endl;
|
std::cerr << "ConnectionsDialog::addneighbour()" << std::endl;
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
rsServer->NeighAddFriend(getNeighRsCertId(c));
|
rsServer->NeighAddFriend(getNeighRsCertId(c));
|
||||||
*/
|
*/
|
||||||
@ -443,7 +457,9 @@ void NetworkDialog::addneighbour()
|
|||||||
void NetworkDialog::authneighbour()
|
void NetworkDialog::authneighbour()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *c = getCurrentNeighbour();
|
QTreeWidgetItem *c = getCurrentNeighbour();
|
||||||
|
#ifdef NET_DEBUG
|
||||||
std::cerr << "ConnectionsDialog::authneighbour()" << std::endl;
|
std::cerr << "ConnectionsDialog::authneighbour()" << std::endl;
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
RsAuthId code;
|
RsAuthId code;
|
||||||
rsServer->NeighAuthFriend(getNeighRsCertId(c), code);
|
rsServer->NeighAuthFriend(getNeighRsCertId(c), code);
|
||||||
|
@ -46,6 +46,10 @@ const uint32_t NEWSFEED_CHANMSGLIST = 0x0005;
|
|||||||
const uint32_t NEWSFEED_BLOGMSGLIST = 0x0006;
|
const uint32_t NEWSFEED_BLOGMSGLIST = 0x0006;
|
||||||
const uint32_t NEWSFEED_MESSAGELIST = 0x0007;
|
const uint32_t NEWSFEED_MESSAGELIST = 0x0007;
|
||||||
|
|
||||||
|
/*****
|
||||||
|
* #define NEWS_DEBUG 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
NewsFeed::NewsFeed(QWidget *parent)
|
NewsFeed::NewsFeed(QWidget *parent)
|
||||||
: MainPage (parent)
|
: MainPage (parent)
|
||||||
@ -154,8 +158,11 @@ void NewsFeed::addFeedItemPeerConnect(RsFeedItem &fi)
|
|||||||
/* add to layout */
|
/* add to layout */
|
||||||
mLayout->addWidget(pi);
|
mLayout->addWidget(pi);
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemPeerConnect()";
|
std::cerr << "NewsFeed::addFeedItemPeerConnect()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -171,8 +178,10 @@ void NewsFeed::addFeedItemPeerDisconnect(RsFeedItem &fi)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemPeerDisconnect()";
|
std::cerr << "NewsFeed::addFeedItemPeerDisconnect()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -187,8 +196,10 @@ void NewsFeed::addFeedItemPeerHello(RsFeedItem &fi)
|
|||||||
mLayout->addWidget(pi);
|
mLayout->addWidget(pi);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemPeerHello()";
|
std::cerr << "NewsFeed::addFeedItemPeerHello()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -202,8 +213,10 @@ void NewsFeed::addFeedItemPeerNew(RsFeedItem &fi)
|
|||||||
/* add to layout */
|
/* add to layout */
|
||||||
mLayout->addWidget(pi);
|
mLayout->addWidget(pi);
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemPeerNew()";
|
std::cerr << "NewsFeed::addFeedItemPeerNew()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -217,8 +230,10 @@ void NewsFeed::addFeedItemChanNew(RsFeedItem &fi)
|
|||||||
/* add to layout */
|
/* add to layout */
|
||||||
mLayout->addWidget(cni);
|
mLayout->addWidget(cni);
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemChanNew()";
|
std::cerr << "NewsFeed::addFeedItemChanNew()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -232,8 +247,10 @@ void NewsFeed::addFeedItemChanUpdate(RsFeedItem &fi)
|
|||||||
/* add to layout */
|
/* add to layout */
|
||||||
mLayout->addWidget(cni);
|
mLayout->addWidget(cni);
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemChanUpdate()";
|
std::cerr << "NewsFeed::addFeedItemChanUpdate()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -247,8 +264,10 @@ void NewsFeed::addFeedItemChanMsg(RsFeedItem &fi)
|
|||||||
/* add to layout */
|
/* add to layout */
|
||||||
mLayout->addWidget(cm);
|
mLayout->addWidget(cm);
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemChanMsg()";
|
std::cerr << "NewsFeed::addFeedItemChanMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -264,8 +283,10 @@ void NewsFeed::addFeedItemForumNew(RsFeedItem &fi)
|
|||||||
mLayout->addWidget(fni);
|
mLayout->addWidget(fni);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemForumNew()";
|
std::cerr << "NewsFeed::addFeedItemForumNew()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -280,8 +301,10 @@ void NewsFeed::addFeedItemForumUpdate(RsFeedItem &fi)
|
|||||||
/* add to layout */
|
/* add to layout */
|
||||||
mLayout->addWidget(fni);
|
mLayout->addWidget(fni);
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemForumUpdate()";
|
std::cerr << "NewsFeed::addFeedItemForumUpdate()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -295,8 +318,10 @@ void NewsFeed::addFeedItemForumMsg(RsFeedItem &fi)
|
|||||||
/* add to layout */
|
/* add to layout */
|
||||||
mLayout->addWidget(fm);
|
mLayout->addWidget(fm);
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemForumMsg()";
|
std::cerr << "NewsFeed::addFeedItemForumMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -310,15 +335,19 @@ void NewsFeed::addFeedItemBlogMsg(RsFeedItem &fi)
|
|||||||
/* add to layout */
|
/* add to layout */
|
||||||
mLayout->addWidget(bm);
|
mLayout->addWidget(bm);
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemBlogMsg()";
|
std::cerr << "NewsFeed::addFeedItemBlogMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void NewsFeed::addFeedItemChatNew(RsFeedItem &fi)
|
void NewsFeed::addFeedItemChatNew(RsFeedItem &fi)
|
||||||
{
|
{
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemChatNew()";
|
std::cerr << "NewsFeed::addFeedItemChatNew()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -332,15 +361,19 @@ void NewsFeed::addFeedItemMessage(RsFeedItem &fi)
|
|||||||
/* add to layout */
|
/* add to layout */
|
||||||
mLayout->addWidget(mi);
|
mLayout->addWidget(mi);
|
||||||
|
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemMessage()";
|
std::cerr << "NewsFeed::addFeedItemMessage()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void NewsFeed::addFeedItemFilesNew(RsFeedItem &fi)
|
void NewsFeed::addFeedItemFilesNew(RsFeedItem &fi)
|
||||||
{
|
{
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::addFeedItemFilesNew()";
|
std::cerr << "NewsFeed::addFeedItemFilesNew()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -349,20 +382,26 @@ void NewsFeed::addFeedItemFilesNew(RsFeedItem &fi)
|
|||||||
/* FeedHolder Functions (for FeedItem functionality) */
|
/* FeedHolder Functions (for FeedItem functionality) */
|
||||||
void NewsFeed::deleteFeedItem(QWidget *item, uint32_t type)
|
void NewsFeed::deleteFeedItem(QWidget *item, uint32_t type)
|
||||||
{
|
{
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::deleteFeedItem()";
|
std::cerr << "NewsFeed::deleteFeedItem()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewsFeed::openChat(std::string peerId)
|
void NewsFeed::openChat(std::string peerId)
|
||||||
{
|
{
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::openChat()";
|
std::cerr << "NewsFeed::openChat()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewsFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
void NewsFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
||||||
{
|
{
|
||||||
|
#ifdef NEWS_DEBUG
|
||||||
std::cerr << "NewsFeed::openMsg()";
|
std::cerr << "NewsFeed::openMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,7 +56,12 @@
|
|||||||
/* Images for Status icons */
|
/* Images for Status icons */
|
||||||
#define IMAGE_ONLINE ":/images/donline.png"
|
#define IMAGE_ONLINE ":/images/donline.png"
|
||||||
#define IMAGE_OFFLINE ":/images/dhidden.png"
|
#define IMAGE_OFFLINE ":/images/dhidden.png"
|
||||||
|
|
||||||
|
/******
|
||||||
|
* #define PEERS_DEBUG 1
|
||||||
|
*****/
|
||||||
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
PeersDialog::PeersDialog(QWidget *parent)
|
PeersDialog::PeersDialog(QWidget *parent)
|
||||||
: MainPage(parent), chatDialog(NULL)
|
: MainPage(parent), chatDialog(NULL)
|
||||||
@ -321,10 +326,15 @@ std::string getPeerRsCertId(QTreeWidgetItem *i)
|
|||||||
void PeersDialog::exportfriend()
|
void PeersDialog::exportfriend()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *c = getCurrentPeer();
|
QTreeWidgetItem *c = getCurrentPeer();
|
||||||
|
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersDialog::exportfriend()" << std::endl;
|
std::cerr << "PeersDialog::exportfriend()" << std::endl;
|
||||||
|
#endif
|
||||||
if (!c)
|
if (!c)
|
||||||
{
|
{
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersDialog::exportfriend() Noone Selected -- sorry" << std::endl;
|
std::cerr << "PeersDialog::exportfriend() Noone Selected -- sorry" << std::endl;
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -335,8 +345,10 @@ void PeersDialog::exportfriend()
|
|||||||
std::string file = fileName.toStdString();
|
std::string file = fileName.toStdString();
|
||||||
if (file != "")
|
if (file != "")
|
||||||
{
|
{
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersDialog::exportfriend() Saving to: " << file << std::endl;
|
std::cerr << "PeersDialog::exportfriend() Saving to: " << file << std::endl;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
if (rsPeers)
|
if (rsPeers)
|
||||||
{
|
{
|
||||||
rsPeers->SaveCertificateToFile(id, file);
|
rsPeers->SaveCertificateToFile(id, file);
|
||||||
@ -387,7 +399,9 @@ void PeersDialog::chatfriend()
|
|||||||
|
|
||||||
void PeersDialog::msgfriend()
|
void PeersDialog::msgfriend()
|
||||||
{
|
{
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "SharedFilesDialog::msgfriend()" << std::endl;
|
std::cerr << "SharedFilesDialog::msgfriend()" << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
QTreeWidgetItem *i = getCurrentPeer();
|
QTreeWidgetItem *i = getCurrentPeer();
|
||||||
|
|
||||||
@ -418,10 +432,13 @@ QTreeWidgetItem *PeersDialog::getCurrentPeer()
|
|||||||
QTreeWidgetItem *item = peerWidget -> currentItem();
|
QTreeWidgetItem *item = peerWidget -> currentItem();
|
||||||
if (!item)
|
if (!item)
|
||||||
{
|
{
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "Invalid Current Item" << std::endl;
|
std::cerr << "Invalid Current Item" << std::endl;
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
/* Display the columns of this item. */
|
/* Display the columns of this item. */
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
out << "CurrentPeerItem: " << std::endl;
|
out << "CurrentPeerItem: " << std::endl;
|
||||||
@ -432,6 +449,7 @@ QTreeWidgetItem *PeersDialog::getCurrentPeer()
|
|||||||
out << "\t" << i << ":" << txt.toStdString() << std::endl;
|
out << "\t" << i << ":" << txt.toStdString() << std::endl;
|
||||||
}
|
}
|
||||||
std::cerr << out.str();
|
std::cerr << out.str();
|
||||||
|
#endif
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -450,10 +468,14 @@ QTreeWidgetItem *PeersDialog::getCurrentPeer()
|
|||||||
void PeersDialog::removefriend()
|
void PeersDialog::removefriend()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *c = getCurrentPeer();
|
QTreeWidgetItem *c = getCurrentPeer();
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersDialog::removefriend()" << std::endl;
|
std::cerr << "PeersDialog::removefriend()" << std::endl;
|
||||||
|
#endif
|
||||||
if (!c)
|
if (!c)
|
||||||
{
|
{
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersDialog::removefriend() Noone Selected -- sorry" << std::endl;
|
std::cerr << "PeersDialog::removefriend() Noone Selected -- sorry" << std::endl;
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,7 +489,9 @@ void PeersDialog::removefriend()
|
|||||||
void PeersDialog::allowfriend()
|
void PeersDialog::allowfriend()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *c = getCurrentPeer();
|
QTreeWidgetItem *c = getCurrentPeer();
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersDialog::allowfriend()" << std::endl;
|
std::cerr << "PeersDialog::allowfriend()" << std::endl;
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
bool accept = true;
|
bool accept = true;
|
||||||
rsServer->FriendStatus(getPeerRsCertId(c), accept);
|
rsServer->FriendStatus(getPeerRsCertId(c), accept);
|
||||||
@ -478,10 +502,14 @@ void PeersDialog::allowfriend()
|
|||||||
void PeersDialog::connectfriend()
|
void PeersDialog::connectfriend()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *c = getCurrentPeer();
|
QTreeWidgetItem *c = getCurrentPeer();
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersDialog::connectfriend()" << std::endl;
|
std::cerr << "PeersDialog::connectfriend()" << std::endl;
|
||||||
|
#endif
|
||||||
if (!c)
|
if (!c)
|
||||||
{
|
{
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersDialog::connectfriend() Noone Selected -- sorry" << std::endl;
|
std::cerr << "PeersDialog::connectfriend() Noone Selected -- sorry" << std::endl;
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -494,7 +522,9 @@ void PeersDialog::connectfriend()
|
|||||||
void PeersDialog::setaddressfriend()
|
void PeersDialog::setaddressfriend()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *c = getCurrentPeer();
|
QTreeWidgetItem *c = getCurrentPeer();
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersDialog::setaddressfriend()" << std::endl;
|
std::cerr << "PeersDialog::setaddressfriend()" << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* need to get the input address / port */
|
/* need to get the input address / port */
|
||||||
/*
|
/*
|
||||||
@ -507,7 +537,9 @@ void PeersDialog::setaddressfriend()
|
|||||||
void PeersDialog::trustfriend()
|
void PeersDialog::trustfriend()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *c = getCurrentPeer();
|
QTreeWidgetItem *c = getCurrentPeer();
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersDialog::trustfriend()" << std::endl;
|
std::cerr << "PeersDialog::trustfriend()" << std::endl;
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
bool trust = true;
|
bool trust = true;
|
||||||
rsServer->FriendTrust(getPeerRsCertId(c), trust);
|
rsServer->FriendTrust(getPeerRsCertId(c), trust);
|
||||||
@ -520,7 +552,9 @@ void PeersDialog::trustfriend()
|
|||||||
void PeersDialog::configurefriend()
|
void PeersDialog::configurefriend()
|
||||||
{
|
{
|
||||||
/* display Dialog */
|
/* display Dialog */
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersDialog::configurefriend()" << std::endl;
|
std::cerr << "PeersDialog::configurefriend()" << std::endl;
|
||||||
|
#endif
|
||||||
QTreeWidgetItem *c = getCurrentPeer();
|
QTreeWidgetItem *c = getCurrentPeer();
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,6 +34,11 @@ const uint32_t PEERSFEED_MODE_ONLINE = 0x0001;
|
|||||||
const uint32_t PEERSFEED_MODE_FOF = 0x0002;
|
const uint32_t PEERSFEED_MODE_FOF = 0x0002;
|
||||||
const uint32_t PEERSFEED_MODE_ALL = 0x0003;
|
const uint32_t PEERSFEED_MODE_ALL = 0x0003;
|
||||||
|
|
||||||
|
|
||||||
|
/*****
|
||||||
|
* #define PEERS_DEBUG 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
PeersFeed::PeersFeed(QWidget *parent)
|
PeersFeed::PeersFeed(QWidget *parent)
|
||||||
: MainPage (parent)
|
: MainPage (parent)
|
||||||
@ -77,20 +82,27 @@ PeersFeed::PeersFeed(QWidget *parent)
|
|||||||
/* FeedHolder Functions (for FeedItem functionality) */
|
/* FeedHolder Functions (for FeedItem functionality) */
|
||||||
void PeersFeed::deleteFeedItem(QWidget *item, uint32_t type)
|
void PeersFeed::deleteFeedItem(QWidget *item, uint32_t type)
|
||||||
{
|
{
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersFeed::deleteFeedItem()";
|
std::cerr << "PeersFeed::deleteFeedItem()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PeersFeed::openChat(std::string peerId)
|
void PeersFeed::openChat(std::string peerId)
|
||||||
{
|
{
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersFeed::openChat()";
|
std::cerr << "PeersFeed::openChat()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PeersFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
void PeersFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
||||||
{
|
{
|
||||||
|
#ifdef PEERS_DEBUG
|
||||||
std::cerr << "PeersFeed::openMsg()";
|
std::cerr << "PeersFeed::openMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,6 +69,11 @@
|
|||||||
#define PHOTO_LIST_COL_PEERID 6
|
#define PHOTO_LIST_COL_PEERID 6
|
||||||
#define PHOTO_LIST_COL_PHOTOID 7
|
#define PHOTO_LIST_COL_PHOTOID 7
|
||||||
|
|
||||||
|
/******
|
||||||
|
* #define PHOTO_DEBUG 1
|
||||||
|
*****/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
PhotoDialog::PhotoDialog(QWidget *parent)
|
PhotoDialog::PhotoDialog(QWidget *parent)
|
||||||
@ -267,7 +272,9 @@ void PhotoDialog::addShows(std::string id)
|
|||||||
|
|
||||||
void PhotoDialog::updatePhotoList()
|
void PhotoDialog::updatePhotoList()
|
||||||
{
|
{
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::cerr << "PhotoDialog::updatePhotoList()" << std::endl;
|
std::cerr << "PhotoDialog::updatePhotoList()" << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* get current item */
|
/* get current item */
|
||||||
QTreeWidgetItem *item = ui.peerTreeWidget->currentItem();
|
QTreeWidgetItem *item = ui.peerTreeWidget->currentItem();
|
||||||
@ -275,7 +282,9 @@ void PhotoDialog::updatePhotoList()
|
|||||||
if (!item)
|
if (!item)
|
||||||
{
|
{
|
||||||
/* leave current list */
|
/* leave current list */
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::cerr << "PhotoDialog::updatePhotoList() No Current item -> leave" << std::endl;
|
std::cerr << "PhotoDialog::updatePhotoList() No Current item -> leave" << std::endl;
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,11 +295,15 @@ void PhotoDialog::updatePhotoList()
|
|||||||
if ((mCurrentPID == pid) && (mCurrentSID == sid))
|
if ((mCurrentPID == pid) && (mCurrentSID == sid))
|
||||||
{
|
{
|
||||||
/* still good */
|
/* still good */
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::cerr << "PhotoDialog::updatePhotoList() List still good!" << std::endl;
|
std::cerr << "PhotoDialog::updatePhotoList() List still good!" << std::endl;
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::cerr << "PhotoDialog::updatePhotoList() pid: " << pid << " sid: " << sid << std::endl;
|
std::cerr << "PhotoDialog::updatePhotoList() pid: " << pid << " sid: " << sid << std::endl;
|
||||||
|
#endif
|
||||||
/* get the list of photos */
|
/* get the list of photos */
|
||||||
|
|
||||||
ui.photoTreeWidget->clear();
|
ui.photoTreeWidget->clear();
|
||||||
@ -298,7 +311,9 @@ void PhotoDialog::updatePhotoList()
|
|||||||
|
|
||||||
if (sid != "")
|
if (sid != "")
|
||||||
{
|
{
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::cerr << "PhotoDialog::updatePhotoList() SID -> showing show" << std::endl;
|
std::cerr << "PhotoDialog::updatePhotoList() SID -> showing show" << std::endl;
|
||||||
|
#endif
|
||||||
/* load up show list */
|
/* load up show list */
|
||||||
RsPhotoShowDetails detail;
|
RsPhotoShowDetails detail;
|
||||||
rsPhoto->getShowDetails(pid, sid, detail);
|
rsPhoto->getShowDetails(pid, sid, detail);
|
||||||
@ -311,7 +326,9 @@ void PhotoDialog::updatePhotoList()
|
|||||||
|
|
||||||
if (!rsPhoto->getPhotoDetails(pid, sit->photoId, photoDetail))
|
if (!rsPhoto->getPhotoDetails(pid, sit->photoId, photoDetail))
|
||||||
{
|
{
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::cerr << "PhotoDialog::updatePhotoList() getPhotoDetails: " << sit->photoId << " FAILED" << std::endl;
|
std::cerr << "PhotoDialog::updatePhotoList() getPhotoDetails: " << sit->photoId << " FAILED" << std::endl;
|
||||||
|
#endif
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,7 +367,9 @@ void PhotoDialog::updatePhotoList()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::cerr << "PhotoDialog::updatePhotoList() No SID -> show all" << std::endl;
|
std::cerr << "PhotoDialog::updatePhotoList() No SID -> show all" << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
std::list<std::string> photoIds;
|
std::list<std::string> photoIds;
|
||||||
std::list<std::string>::iterator pit;
|
std::list<std::string>::iterator pit;
|
||||||
@ -361,7 +380,9 @@ void PhotoDialog::updatePhotoList()
|
|||||||
|
|
||||||
if (!rsPhoto->getPhotoDetails(pid, *pit, photoDetail))
|
if (!rsPhoto->getPhotoDetails(pid, *pit, photoDetail))
|
||||||
{
|
{
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::cerr << "PhotoDialog::updatePhotoList() getPhotoDetails: " << *pit << " FAILED" << std::endl;
|
std::cerr << "PhotoDialog::updatePhotoList() getPhotoDetails: " << *pit << " FAILED" << std::endl;
|
||||||
|
#endif
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -396,7 +417,9 @@ void PhotoDialog::updatePhotoList()
|
|||||||
QString::fromStdString(photoDetail.hash));
|
QString::fromStdString(photoDetail.hash));
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::cerr << "PhotoDialog::updatePhotoList() added Item: " << *pit << std::endl;
|
std::cerr << "PhotoDialog::updatePhotoList() added Item: " << *pit << std::endl;
|
||||||
|
#endif
|
||||||
items.append(photoItem);
|
items.append(photoItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -428,11 +451,14 @@ QTreeWidgetItem *PhotoDialog::getCurrentLine()
|
|||||||
QTreeWidgetItem *item = peerWidget -> currentItem();
|
QTreeWidgetItem *item = peerWidget -> currentItem();
|
||||||
if (!item)
|
if (!item)
|
||||||
{
|
{
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::cerr << "Invalid Current Item" << std::endl;
|
std::cerr << "Invalid Current Item" << std::endl;
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Display the columns of this item. */
|
/* Display the columns of this item. */
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
out << "CurrentPeerItem: " << std::endl;
|
out << "CurrentPeerItem: " << std::endl;
|
||||||
|
|
||||||
@ -442,13 +468,16 @@ QTreeWidgetItem *PhotoDialog::getCurrentLine()
|
|||||||
out << "\t" << i << ":" << txt.toStdString() << std::endl;
|
out << "\t" << i << ":" << txt.toStdString() << std::endl;
|
||||||
}
|
}
|
||||||
std::cerr << out.str();
|
std::cerr << out.str();
|
||||||
|
#endif
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhotoDialog::removePhoto()
|
void PhotoDialog::removePhoto()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *c = getCurrentLine();
|
QTreeWidgetItem *c = getCurrentLine();
|
||||||
|
#ifdef PHOTO_DEBUG
|
||||||
std::cerr << "PhotoDialog::removePhoto()" << std::endl;
|
std::cerr << "PhotoDialog::removePhoto()" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,6 +28,11 @@
|
|||||||
|
|
||||||
#include "rsiface/rsfiles.h"
|
#include "rsiface/rsfiles.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*****
|
||||||
|
* #define TRANSFER_DEBUG 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
TransferFeed::TransferFeed(QWidget *parent)
|
TransferFeed::TransferFeed(QWidget *parent)
|
||||||
: MainPage (parent)
|
: MainPage (parent)
|
||||||
@ -92,20 +97,27 @@ TransferFeed::TransferFeed(QWidget *parent)
|
|||||||
/* FeedHolder Functions (for FeedItem functionality) */
|
/* FeedHolder Functions (for FeedItem functionality) */
|
||||||
void TransferFeed::deleteFeedItem(QWidget *item, uint32_t type)
|
void TransferFeed::deleteFeedItem(QWidget *item, uint32_t type)
|
||||||
{
|
{
|
||||||
|
#ifdef TRANSFER_DEBUG
|
||||||
std::cerr << "TransferFeed::deleteFeedItem()";
|
std::cerr << "TransferFeed::deleteFeedItem()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferFeed::openChat(std::string peerId)
|
void TransferFeed::openChat(std::string peerId)
|
||||||
{
|
{
|
||||||
|
#ifdef TRANSFER_DEBUG
|
||||||
std::cerr << "TransferFeed::openChat()";
|
std::cerr << "TransferFeed::openChat()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
void TransferFeed::openMsg(uint32_t type, std::string grpId, std::string inReplyTo)
|
||||||
{
|
{
|
||||||
|
#ifdef TRANSFER_DEBUG
|
||||||
std::cerr << "TransferFeed::openMsg()";
|
std::cerr << "TransferFeed::openMsg()";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
GeneralMsgDialog *msgDialog = new GeneralMsgDialog(NULL);
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +27,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define DEBUG_ITEM 1
|
/****
|
||||||
|
* #define DEBUG_ITEM 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
BlogMsgItem::BlogMsgItem(FeedHolder *parent, uint32_t feedId, std::string peerId, std::string msgId, bool isHome)
|
BlogMsgItem::BlogMsgItem(FeedHolder *parent, uint32_t feedId, std::string peerId, std::string msgId, bool isHome)
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define DEBUG_ITEM 1
|
/****
|
||||||
|
* #define DEBUG_ITEM 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
ChanGroupItem::ChanGroupItem(std::string groupName)
|
ChanGroupItem::ChanGroupItem(std::string groupName)
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define DEBUG_ITEM 1
|
/****
|
||||||
|
* #define DEBUG_ITEM 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
ChanMenuItem::ChanMenuItem(std::string chanId)
|
ChanMenuItem::ChanMenuItem(std::string chanId)
|
||||||
|
@ -29,7 +29,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define DEBUG_ITEM 1
|
/****
|
||||||
|
* #define DEBUG_ITEM 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
ChanMsgItem::ChanMsgItem(FeedHolder *parent, uint32_t feedId, std::string chanId, std::string msgId, bool isHome)
|
ChanMsgItem::ChanMsgItem(FeedHolder *parent, uint32_t feedId, std::string chanId, std::string msgId, bool isHome)
|
||||||
|
@ -27,7 +27,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define DEBUG_ITEM 1
|
/****
|
||||||
|
* #define DEBUG_ITEM 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
ChanNewItem::ChanNewItem(FeedHolder *parent, uint32_t feedId, std::string chanId, bool isHome, bool isNew)
|
ChanNewItem::ChanNewItem(FeedHolder *parent, uint32_t feedId, std::string chanId, bool isHome, bool isNew)
|
||||||
|
@ -27,7 +27,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define DEBUG_ITEM 1
|
/****
|
||||||
|
* #define DEBUG_ITEM 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
ForumMsgItem::ForumMsgItem(FeedHolder *parent, uint32_t feedId, std::string forumId, std::string postId, bool isHome)
|
ForumMsgItem::ForumMsgItem(FeedHolder *parent, uint32_t feedId, std::string forumId, std::string postId, bool isHome)
|
||||||
|
@ -27,7 +27,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define DEBUG_ITEM 1
|
/****
|
||||||
|
* #define DEBUG_ITEM 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
ForumNewItem::ForumNewItem(FeedHolder *parent, uint32_t feedId, std::string forumId, bool isHome, bool isNew)
|
ForumNewItem::ForumNewItem(FeedHolder *parent, uint32_t feedId, std::string forumId, bool isHome, bool isNew)
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define DEBUG_ITEM 1
|
/****
|
||||||
|
* #define DEBUG_ITEM 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
MsgItem::MsgItem(FeedHolder *parent, uint32_t feedId, std::string msgId, bool isHome)
|
MsgItem::MsgItem(FeedHolder *parent, uint32_t feedId, std::string msgId, bool isHome)
|
||||||
|
@ -28,7 +28,9 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#define DEBUG_ITEM 1
|
/*****
|
||||||
|
* #define DEBUG_ITEM 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, std::string peerId, uint32_t type, bool isHome)
|
PeerItem::PeerItem(FeedHolder *parent, uint32_t feedId, std::string peerId, uint32_t type, bool isHome)
|
||||||
|
@ -29,7 +29,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define DEBUG_ITEM 1
|
/****
|
||||||
|
* #define DEBUG_ITEM 1
|
||||||
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
SubDestItem::SubDestItem(uint32_t type, std::string groupId, std::string inReplyTo)
|
SubDestItem::SubDestItem(uint32_t type, std::string groupId, std::string inReplyTo)
|
||||||
|
@ -26,7 +26,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define DEBUG_ITEM 1
|
/****
|
||||||
|
* #define DEBUG_ITEM 1
|
||||||
|
****/
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
* SubFileItem fully controls the file transfer from the gui side
|
* SubFileItem fully controls the file transfer from the gui side
|
||||||
|
@ -4,11 +4,14 @@
|
|||||||
|
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
/*****
|
||||||
|
* #define RDM_DEBUG
|
||||||
|
****/
|
||||||
|
|
||||||
RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
||||||
: QAbstractItemModel(parent),
|
: QAbstractItemModel(parent),
|
||||||
RemoteMode(mode), nIndex(1), indexSet(1) /* ass zero index cant be used */
|
RemoteMode(mode), nIndex(1), indexSet(1) /* ass zero index cant be used */
|
||||||
@ -544,7 +547,9 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
|||||||
/* Callback from */
|
/* Callback from */
|
||||||
void RemoteDirModel::preMods()
|
void RemoteDirModel::preMods()
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "RemoteDirModel::preMods()" << std::endl;
|
std::cerr << "RemoteDirModel::preMods()" << std::endl;
|
||||||
|
#endif
|
||||||
//modelAboutToBeReset();
|
//modelAboutToBeReset();
|
||||||
reset();
|
reset();
|
||||||
layoutAboutToBeChanged();
|
layoutAboutToBeChanged();
|
||||||
@ -553,7 +558,9 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
|||||||
/* Callback from */
|
/* Callback from */
|
||||||
void RemoteDirModel::postMods()
|
void RemoteDirModel::postMods()
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "RemoteDirModel::postMods()" << std::endl;
|
std::cerr << "RemoteDirModel::postMods()" << std::endl;
|
||||||
|
#endif
|
||||||
//modelReset();
|
//modelReset();
|
||||||
layoutChanged();
|
layoutChanged();
|
||||||
//reset();
|
//reset();
|
||||||
@ -562,8 +569,10 @@ RemoteDirModel::RemoteDirModel(bool mode, QObject *parent)
|
|||||||
|
|
||||||
void RemoteDirModel::update (const QModelIndex &index )
|
void RemoteDirModel::update (const QModelIndex &index )
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
//std::cerr << "Directory Request(" << id << ") : ";
|
//std::cerr << "Directory Request(" << id << ") : ";
|
||||||
//std::cerr << path << std::endl;
|
//std::cerr << path << std::endl;
|
||||||
|
#endif
|
||||||
//rsFiles -> RequestDirectories(id, path, 1);
|
//rsFiles -> RequestDirectories(id, path, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,7 +580,9 @@ void RemoteDirModel::downloadSelected(QModelIndexList list)
|
|||||||
{
|
{
|
||||||
if (!RemoteMode)
|
if (!RemoteMode)
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "Cannot download from local" << std::endl;
|
std::cerr << "Cannot download from local" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* so for all the selected .... get the name out,
|
/* so for all the selected .... get the name out,
|
||||||
@ -618,10 +629,14 @@ void RemoteDirModel::downloadSelected(QModelIndexList list)
|
|||||||
|
|
||||||
void RemoteDirModel::recommendSelected(QModelIndexList list)
|
void RemoteDirModel::recommendSelected(QModelIndexList list)
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "recommendSelected()" << std::endl;
|
std::cerr << "recommendSelected()" << std::endl;
|
||||||
|
#endif
|
||||||
if (RemoteMode)
|
if (RemoteMode)
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "Cannot recommend remote! (should download)" << std::endl;
|
std::cerr << "Cannot recommend remote! (should download)" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
/* Fire off requests */
|
/* Fire off requests */
|
||||||
QModelIndexList::iterator it;
|
QModelIndexList::iterator it;
|
||||||
@ -646,24 +661,32 @@ void RemoteDirModel::recommendSelected(QModelIndexList list)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "::::::::::::FileRecommend:::: " << std::endl;
|
std::cerr << "::::::::::::FileRecommend:::: " << std::endl;
|
||||||
std::cerr << "Name: " << details.name << std::endl;
|
std::cerr << "Name: " << details.name << std::endl;
|
||||||
std::cerr << "Hash: " << details.hash << std::endl;
|
std::cerr << "Hash: " << details.hash << std::endl;
|
||||||
std::cerr << "Size: " << details.count << std::endl;
|
std::cerr << "Size: " << details.count << std::endl;
|
||||||
std::cerr << "Path: " << details.path << std::endl;
|
std::cerr << "Path: " << details.path << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
rsFiles -> FileRecommend(details.name, details.hash, details.count);
|
rsFiles -> FileRecommend(details.name, details.hash, details.count);
|
||||||
}
|
}
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "::::::::::::Done FileRecommend" << std::endl;
|
std::cerr << "::::::::::::Done FileRecommend" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RemoteDirModel::recommendSelectedOnly(QModelIndexList list)
|
void RemoteDirModel::recommendSelectedOnly(QModelIndexList list)
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "recommendSelectedOnly()" << std::endl;
|
std::cerr << "recommendSelectedOnly()" << std::endl;
|
||||||
|
#endif
|
||||||
if (RemoteMode)
|
if (RemoteMode)
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "Cannot recommend remote! (should download)" << std::endl;
|
std::cerr << "Cannot recommend remote! (should download)" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
rsFiles->ClearInRecommend();
|
rsFiles->ClearInRecommend();
|
||||||
|
|
||||||
@ -690,16 +713,20 @@ void RemoteDirModel::recommendSelectedOnly(QModelIndexList list)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "::::::::::::FileRecommend:::: " << std::endl;
|
std::cerr << "::::::::::::FileRecommend:::: " << std::endl;
|
||||||
std::cerr << "Name: " << details.name << std::endl;
|
std::cerr << "Name: " << details.name << std::endl;
|
||||||
std::cerr << "Hash: " << details.hash << std::endl;
|
std::cerr << "Hash: " << details.hash << std::endl;
|
||||||
std::cerr << "Size: " << details.count << std::endl;
|
std::cerr << "Size: " << details.count << std::endl;
|
||||||
std::cerr << "Path: " << details.path << std::endl;
|
std::cerr << "Path: " << details.path << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
rsFiles -> FileRecommend(details.name, details.hash, details.count);
|
rsFiles -> FileRecommend(details.name, details.hash, details.count);
|
||||||
rsFiles -> SetInRecommend(details.name, true);
|
rsFiles -> SetInRecommend(details.name, true);
|
||||||
}
|
}
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "::::::::::::Done FileRecommend" << std::endl;
|
std::cerr << "::::::::::::Done FileRecommend" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -715,10 +742,14 @@ void RemoteDirModel::openSelected(QModelIndexList list)
|
|||||||
|
|
||||||
void RemoteDirModel::getFilePaths(QModelIndexList list, std::list<std::string> &fullpaths)
|
void RemoteDirModel::getFilePaths(QModelIndexList list, std::list<std::string> &fullpaths)
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "RemoteDirModel::getFilePaths()" << std::endl;
|
std::cerr << "RemoteDirModel::getFilePaths()" << std::endl;
|
||||||
|
#endif
|
||||||
if (RemoteMode)
|
if (RemoteMode)
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "No File Paths for remote files" << std::endl;
|
std::cerr << "No File Paths for remote files" << std::endl;
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* translate */
|
/* translate */
|
||||||
@ -733,32 +764,42 @@ void RemoteDirModel::getFilePaths(QModelIndexList list, std::list<std::string> &
|
|||||||
|
|
||||||
if (!rsFiles->RequestDirDetails(ref, details, flags))
|
if (!rsFiles->RequestDirDetails(ref, details, flags))
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "getFilePaths() Bad Request" << std::endl;
|
std::cerr << "getFilePaths() Bad Request" << std::endl;
|
||||||
|
#endif
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (details.type != DIR_TYPE_FILE)
|
if (details.type != DIR_TYPE_FILE)
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "getFilePaths() Not File" << std::endl;
|
std::cerr << "getFilePaths() Not File" << std::endl;
|
||||||
|
#endif
|
||||||
continue; /* not file! */
|
continue; /* not file! */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "::::::::::::File Details:::: " << std::endl;
|
std::cerr << "::::::::::::File Details:::: " << std::endl;
|
||||||
std::cerr << "Name: " << details.name << std::endl;
|
std::cerr << "Name: " << details.name << std::endl;
|
||||||
std::cerr << "Hash: " << details.hash << std::endl;
|
std::cerr << "Hash: " << details.hash << std::endl;
|
||||||
std::cerr << "Size: " << details.count << std::endl;
|
std::cerr << "Size: " << details.count << std::endl;
|
||||||
std::cerr << "Path: " << details.path << std::endl;
|
std::cerr << "Path: " << details.path << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
std::string filepath = details.path + "/";
|
std::string filepath = details.path + "/";
|
||||||
filepath += details.name;
|
filepath += details.name;
|
||||||
|
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "Constructed FilePath: " << filepath << std::endl;
|
std::cerr << "Constructed FilePath: " << filepath << std::endl;
|
||||||
|
#endif
|
||||||
if (fullpaths.end() == std::find(fullpaths.begin(), fullpaths.end(), filepath))
|
if (fullpaths.end() == std::find(fullpaths.begin(), fullpaths.end(), filepath))
|
||||||
{
|
{
|
||||||
fullpaths.push_back(filepath);
|
fullpaths.push_back(filepath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "::::::::::::Done getFilePaths" << std::endl;
|
std::cerr << "::::::::::::Done getFilePaths" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Drag and Drop Functionality */
|
/* Drag and Drop Functionality */
|
||||||
@ -790,21 +831,27 @@ QMimeData * RemoteDirModel::mimeData ( const QModelIndexList & indexes ) const
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "::::::::::::FileDrag:::: " << std::endl;
|
std::cerr << "::::::::::::FileDrag:::: " << std::endl;
|
||||||
std::cerr << "Name: " << details.name << std::endl;
|
std::cerr << "Name: " << details.name << std::endl;
|
||||||
std::cerr << "Hash: " << details.hash << std::endl;
|
std::cerr << "Hash: " << details.hash << std::endl;
|
||||||
std::cerr << "Size: " << details.count << std::endl;
|
std::cerr << "Size: " << details.count << std::endl;
|
||||||
std::cerr << "Path: " << details.path << std::endl;
|
std::cerr << "Path: " << details.path << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (details.type != DIR_TYPE_FILE)
|
if (details.type != DIR_TYPE_FILE)
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "RemoteDirModel::mimeData() Not File" << std::endl;
|
std::cerr << "RemoteDirModel::mimeData() Not File" << std::endl;
|
||||||
|
#endif
|
||||||
continue; /* not file! */
|
continue; /* not file! */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drags.end() != (dit = drags.find(details.hash)))
|
if (drags.end() != (dit = drags.find(details.hash)))
|
||||||
{
|
{
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "RemoteDirModel::mimeData() Duplicate" << std::endl;
|
std::cerr << "RemoteDirModel::mimeData() Duplicate" << std::endl;
|
||||||
|
#endif
|
||||||
continue; /* duplicate */
|
continue; /* duplicate */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -835,11 +882,13 @@ QMimeData * RemoteDirModel::mimeData ( const QModelIndexList & indexes ) const
|
|||||||
text += line;
|
text += line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RDM_DEBUG
|
||||||
std::cerr << "Created MimeData:";
|
std::cerr << "Created MimeData:";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
|
||||||
std::cerr << text;
|
std::cerr << text;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
QMimeData *data = new QMimeData();
|
QMimeData *data = new QMimeData();
|
||||||
data->setData("application/x-rsfilelist", QByteArray(text.c_str()));
|
data->setData("application/x-rsfilelist", QByteArray(text.c_str()));
|
||||||
|
@ -20,6 +20,10 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
/*****
|
||||||
|
* #define NOTIFY_DEBUG
|
||||||
|
****/
|
||||||
|
|
||||||
void NotifyQt::notifyErrorMsg(int list, int type, std::string msg)
|
void NotifyQt::notifyErrorMsg(int list, int type, std::string msg)
|
||||||
{
|
{
|
||||||
(void) list;
|
(void) list;
|
||||||
@ -37,7 +41,10 @@ void NotifyQt::notifyChat()
|
|||||||
void NotifyQt::notifyListChange(int list, int type)
|
void NotifyQt::notifyListChange(int list, int type)
|
||||||
{
|
{
|
||||||
(void) type;
|
(void) type;
|
||||||
|
|
||||||
|
#ifdef NOTIFY_DEBUG
|
||||||
std::cerr << "NotifyQt::notifyListChange()" << std::endl;
|
std::cerr << "NotifyQt::notifyListChange()" << std::endl;
|
||||||
|
#endif
|
||||||
switch(list)
|
switch(list)
|
||||||
{
|
{
|
||||||
case NOTIFY_LIST_NEIGHBOURS:
|
case NOTIFY_LIST_NEIGHBOURS:
|
||||||
@ -70,7 +77,9 @@ void NotifyQt::notifyListChange(int list, int type)
|
|||||||
|
|
||||||
void NotifyQt::notifyListPreChange(int list, int type)
|
void NotifyQt::notifyListPreChange(int list, int type)
|
||||||
{
|
{
|
||||||
|
#ifdef NOTIFY_DEBUG
|
||||||
std::cerr << "NotifyQt::notifyListPreChange()" << std::endl;
|
std::cerr << "NotifyQt::notifyListPreChange()" << std::endl;
|
||||||
|
#endif
|
||||||
switch(list)
|
switch(list)
|
||||||
{
|
{
|
||||||
case NOTIFY_LIST_NEIGHBOURS:
|
case NOTIFY_LIST_NEIGHBOURS:
|
||||||
@ -263,10 +272,12 @@ void NotifyQt::preDisplayDirectories()
|
|||||||
{
|
{
|
||||||
//iface->lockData(); /* Lock Interface */
|
//iface->lockData(); /* Lock Interface */
|
||||||
|
|
||||||
|
#ifdef NOTIFY_DEBUG
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
out << "NotifyQt::preDisplayDirectories()" << std::endl;
|
out << "NotifyQt::preDisplayDirectories()" << std::endl;
|
||||||
|
|
||||||
std::cerr << out.str();
|
std::cerr << out.str();
|
||||||
|
#endif
|
||||||
|
|
||||||
//iface->unlockData(); /* UnLock Interface */
|
//iface->unlockData(); /* UnLock Interface */
|
||||||
|
|
||||||
@ -282,10 +293,12 @@ void NotifyQt::displayDirectories()
|
|||||||
{
|
{
|
||||||
//iface->lockData(); /* Lock Interface */
|
//iface->lockData(); /* Lock Interface */
|
||||||
|
|
||||||
|
#ifdef NOTIFY_DEBUG
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
out << "NotifyQt::displayDirectories()" << std::endl;
|
out << "NotifyQt::displayDirectories()" << std::endl;
|
||||||
|
|
||||||
std::cerr << out.str();
|
std::cerr << out.str();
|
||||||
|
#endif
|
||||||
|
|
||||||
//iface->unlockData(); /* UnLock Interface */
|
//iface->unlockData(); /* UnLock Interface */
|
||||||
|
|
||||||
@ -302,8 +315,10 @@ void NotifyQt::displaySearch()
|
|||||||
{
|
{
|
||||||
iface->lockData(); /* Lock Interface */
|
iface->lockData(); /* Lock Interface */
|
||||||
|
|
||||||
|
#ifdef NOTIFY_DEBUG
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
std::cerr << out.str();
|
std::cerr << out.str();
|
||||||
|
#endif
|
||||||
|
|
||||||
iface->unlockData(); /* UnLock Interface */
|
iface->unlockData(); /* UnLock Interface */
|
||||||
}
|
}
|
||||||
@ -319,8 +334,10 @@ void NotifyQt::displayChat()
|
|||||||
{
|
{
|
||||||
iface->lockData(); /* Lock Interface */
|
iface->lockData(); /* Lock Interface */
|
||||||
|
|
||||||
|
#ifdef NOTIFY_DEBUG
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
std::cerr << out.str();
|
std::cerr << out.str();
|
||||||
|
#endif
|
||||||
|
|
||||||
iface->unlockData(); /* UnLock Interface */
|
iface->unlockData(); /* UnLock Interface */
|
||||||
|
|
||||||
@ -333,8 +350,10 @@ void NotifyQt::displayChannels()
|
|||||||
{
|
{
|
||||||
iface->lockData(); /* Lock Interface */
|
iface->lockData(); /* Lock Interface */
|
||||||
|
|
||||||
|
#ifdef NOTIFY_DEBUG
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
std::cerr << out.str();
|
std::cerr << out.str();
|
||||||
|
#endif
|
||||||
|
|
||||||
iface->unlockData(); /* UnLock Interface */
|
iface->unlockData(); /* UnLock Interface */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user