diff --git a/retroshare-gui/src/gui/Identity/IdDialog.cpp b/retroshare-gui/src/gui/Identity/IdDialog.cpp index cafd1588e..7e580bda0 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdDialog.cpp @@ -30,6 +30,7 @@ #include "ui_IdDialog.h" #include "IdEditDialog.h" #include "gui/gxs/GxsIdDetails.h" +#include "gui/gxs/RsGxsUpdateBroadcastBase.h" #include "gui/common/UIStateHelper.h" #include "gui/chat/ChatDialog.h" #include "gui/settings/rsharesettings.h" @@ -119,6 +120,10 @@ IdDialog::IdDialog(QWidget *parent) : mIdQueue = NULL; + // This is used to grab the broadcast of changes from p3GxsCircles, which is discarded by the current dialog, since it expects data for p3Identity only. + mCirclesBroadcastBase = new RsGxsUpdateBroadcastBase(rsGxsCircles, this); + connect(mCirclesBroadcastBase, SIGNAL(fillDisplay(bool)), this, SLOT(updateCirclesDisplay(bool))); + allItem = new QTreeWidgetItem(); allItem->setText(0, tr("All")); @@ -272,6 +277,11 @@ IdDialog::IdDialog(QWidget *parent) : requestCircleGroupMeta(); } +void IdDialog::updateCirclesDisplay(bool) +{ + std::cerr << "!!Updating circles display!" << std::endl; + requestCircleGroupMeta() ; +} /************************** Request / Response *************************/ /*** Loading Main Index ***/ @@ -1190,10 +1200,10 @@ void IdDialog::updateDisplay(bool complete) requestIdList(); requestIdDetails(); requestRepList(); - requestCircleGroupMeta(); return; } + requestCircleGroupMeta(); std::list grpIds; getAllGrpIds(grpIds); diff --git a/retroshare-gui/src/gui/Identity/IdDialog.h b/retroshare-gui/src/gui/Identity/IdDialog.h index 0c2bdf0b7..32c52608c 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.h +++ b/retroshare-gui/src/gui/Identity/IdDialog.h @@ -61,6 +61,7 @@ protected: private slots: void createExternalCircle(); void showEditExistingCircle(); + void updateCirclesDisplay(bool); void filterComboBoxChanged(); void filterChanged(const QString &text); @@ -121,6 +122,7 @@ private: QTreeWidgetItem *mExternalSubCircleItem; QTreeWidgetItem *mExternalOtherCircleItem; QTreeWidgetItem *mExternalAdminCircleItem; + RsGxsUpdateBroadcastBase *mCirclesBroadcastBase ; RsGxsGroupId mId; diff --git a/retroshare-gui/src/util/RsGxsUpdateBroadcast.cpp b/retroshare-gui/src/util/RsGxsUpdateBroadcast.cpp index 08838ee90..947e85f14 100644 --- a/retroshare-gui/src/util/RsGxsUpdateBroadcast.cpp +++ b/retroshare-gui/src/util/RsGxsUpdateBroadcast.cpp @@ -45,8 +45,24 @@ void RsGxsUpdateBroadcast::onChangesReceived(const RsGxsChanges& changes) { std::cerr << "onChangesReceived()" << std::endl; + { + std::cerr << "Received changes for service " << (void*)changes.mService << ", expecting service " << (void*)mIfaceImpl->getTokenService() << std::endl; + std::cerr << " changes content: " << std::endl; + for(std::list::const_iterator it(changes.mGrps.begin());it!=changes.mGrps.end();++it) std::cerr << " grp id: " << *it << std::endl; + for(std::list::const_iterator it(changes.mGrpsMeta.begin());it!=changes.mGrpsMeta.end();++it) std::cerr << " grp meta: " << *it << std::endl; + for(std::map >::const_iterator it(changes.mMsgs.begin());it!=changes.mMsgs.end();++it) + for(uint32_t i=0;isecond.size();++i) + std::cerr << " grp id: " << it->first << ". Msg ID " << it->second[i] << std::endl; + for(std::map >::const_iterator it(changes.mMsgsMeta.begin());it!=changes.mMsgsMeta.end();++it) + for(uint32_t i=0;isecond.size();++i) + std::cerr << " grp id: " << it->first << ". Msg Meta " << it->second[i] << std::endl; + } if(changes.mService != mIfaceImpl->getTokenService()) + { + std::cerr << "(EE) Incorrect service. Dropping." << std::endl; + return; + } if (!changes.mMsgs.empty() || !changes.mMsgsMeta.empty()) {