diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index a973bc1ef..ff54d48a1 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -1112,6 +1112,7 @@ static void addMessageChanged(std::map > void RsGenExchange::receiveChanges(std::vector& changes) { + std::cerr << "*********************************** RsGenExchange::receiveChanges()" << std::endl; #ifdef GEN_EXCH_DEBUG std::cerr << "RsGenExchange::receiveChanges()" << std::endl; #endif diff --git a/libretroshare/src/retroshare/rsidentity.h b/libretroshare/src/retroshare/rsidentity.h index 2874ccc91..d30e55978 100644 --- a/libretroshare/src/retroshare/rsidentity.h +++ b/libretroshare/src/retroshare/rsidentity.h @@ -309,6 +309,7 @@ enum class RsGxsIdentityEventCode: uint8_t UNKNOWN = 0x00, NEW_IDENTITY = 0x01, DELETED_IDENTITY = 0x02, + UPDATED_IDENTITY = 0x03, }; struct RsGxsIdentityEvent: public RsEvent diff --git a/libretroshare/src/services/p3postbase.cc b/libretroshare/src/services/p3postbase.cc index 309c3ee16..faaa1efb3 100644 --- a/libretroshare/src/services/p3postbase.cc +++ b/libretroshare/src/services/p3postbase.cc @@ -174,11 +174,6 @@ void p3PostBase::notifyChanges(std::vector &changes) delete *it; } - -#ifdef POSTBASE_DEBUG - std::cerr << "p3PostBase::notifyChanges() -> receiveChanges()"; - std::cerr << std::endl; -#endif } void p3PostBase::service_tick() @@ -615,7 +610,9 @@ void p3PostBase::background_loadMsgs(const uint32_t &token, bool unprocessed) #endif changes.push_back(msgChanges); - receiveHelperChanges(changes); + //receiveHelperChanges(changes); + + notifyChanges(changes); } else { @@ -768,7 +765,8 @@ void p3PostBase::background_updateVoteCounts(const uint32_t &token) #endif changes.push_back(msgChanges); - receiveHelperChanges(changes); + //receiveHelperChanges(changes); + notifyChanges(changes); } else { diff --git a/libretroshare/src/services/p3postbase.h b/libretroshare/src/services/p3postbase.h index 1e63b0dcd..8fc305b45 100644 --- a/libretroshare/src/services/p3postbase.h +++ b/libretroshare/src/services/p3postbase.h @@ -72,9 +72,6 @@ class p3PostBase: public RsGenExchange, public GxsTokenQueue, public RsTickEvent virtual void service_tick(); - // This should be overloaded to call RsGxsIfaceHelper::receiveChanges(). -virtual void receiveHelperChanges(std::vector& changes) = 0; - protected: virtual void notifyChanges(std::vector& changes); diff --git a/libretroshare/src/services/p3posted.h b/libretroshare/src/services/p3posted.h index 402f69298..494a6cf5d 100644 --- a/libretroshare/src/services/p3posted.h +++ b/libretroshare/src/services/p3posted.h @@ -53,11 +53,6 @@ virtual void notifyChanges(std::vector& changes) public: -virtual void receiveHelperChanges(std::vector& changes) -{ - return RsGxsIfaceHelper::receiveChanges(changes); -} - // Posted Specific DataTypes. virtual bool getGroupData(const uint32_t &token, std::vector &groups); virtual bool getPostData(const uint32_t &token, std::vector &posts, std::vector &cmts); diff --git a/libretroshare/src/services/p3wiki.cc b/libretroshare/src/services/p3wiki.cc index 26c33881a..1d770b5e5 100644 --- a/libretroshare/src/services/p3wiki.cc +++ b/libretroshare/src/services/p3wiki.cc @@ -102,8 +102,6 @@ void p3Wiki::notifyChanges(std::vector& changes) { std::cerr << "p3Wiki::notifyChanges() New stuff"; std::cerr << std::endl; - - RsGxsIfaceHelper::receiveChanges(changes); } /* Specific Service Data */ diff --git a/libretroshare/src/services/p3wire.cc b/libretroshare/src/services/p3wire.cc index 23d31198f..fda88f7a2 100644 --- a/libretroshare/src/services/p3wire.cc +++ b/libretroshare/src/services/p3wire.cc @@ -88,8 +88,6 @@ void p3Wire::notifyChanges(std::vector& changes) { std::cerr << "p3Wire::notifyChanges() New stuff"; std::cerr << std::endl; - - RsGxsIfaceHelper::receiveChanges(changes); } /* Specific Service Data */ diff --git a/retroshare-gui/src/gui/Circles/CirclesDialog.cpp b/retroshare-gui/src/gui/Circles/CirclesDialog.cpp index 64dff16df..41fd4e9f2 100644 --- a/retroshare-gui/src/gui/Circles/CirclesDialog.cpp +++ b/retroshare-gui/src/gui/Circles/CirclesDialog.cpp @@ -50,7 +50,7 @@ /** Constructor */ CirclesDialog::CirclesDialog(QWidget *parent) - : RsGxsUpdateBroadcastPage(rsGxsCircles, parent) + : MainPage(parent) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); diff --git a/retroshare-gui/src/gui/Circles/CirclesDialog.h b/retroshare-gui/src/gui/Circles/CirclesDialog.h index ecaff3f29..4d39986ac 100644 --- a/retroshare-gui/src/gui/Circles/CirclesDialog.h +++ b/retroshare-gui/src/gui/Circles/CirclesDialog.h @@ -31,7 +31,7 @@ class UIStateHelper; -class CirclesDialog : public RsGxsUpdateBroadcastPage, public TokenResponse +class CirclesDialog : public MainPage, public TokenResponse { Q_OBJECT diff --git a/retroshare-gui/src/gui/Identity/IdDialog.cpp b/retroshare-gui/src/gui/Identity/IdDialog.cpp index cb9a2242d..bf93ded07 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdDialog.cpp @@ -37,7 +37,7 @@ #include "gui/common/UIStateHelper.h" #include "gui/common/UserNotify.h" #include "gui/gxs/GxsIdDetails.h" -#include "gui/gxs/RsGxsUpdateBroadcastBase.h" +//#include "gui/gxs/RsGxsUpdateBroadcastBase.h" #include "gui/msgs/MessageComposer.h" #include "gui/settings/rsharesettings.h" #include "util/qtthreadsutils.h" @@ -142,9 +142,7 @@ class TreeWidgetItem : public QTreeWidgetItem }; /** Constructor */ -IdDialog::IdDialog(QWidget *parent) : - RsGxsUpdateBroadcastPage(rsIdentity, parent), - ui(new Ui::IdDialog) +IdDialog::IdDialog(QWidget *parent) : MainPage(parent), ui(new Ui::IdDialog) { ui->setupUi(this); @@ -156,9 +154,9 @@ IdDialog::IdDialog(QWidget *parent) : mEventHandlerId_circles = 0; rsEvents->registerEventsHandler(RsEventType::GXS_CIRCLES, [this](std::shared_ptr event) { RsQThreadUtils::postToObject( [=]() { handleEvent_main_thread(event); }, this ); }, mEventHandlerId_circles ); - // 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))); + // 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))); ownItem = new QTreeWidgetItem(); ownItem->setText(0, tr("My own identities")); @@ -419,8 +417,14 @@ void IdDialog::handleEvent_main_thread(std::shared_ptr event) { case RsGxsIdentityEventCode::DELETED_IDENTITY: case RsGxsIdentityEventCode::NEW_IDENTITY: + case RsGxsIdentityEventCode::UPDATED_IDENTITY: requestIdList(); + + if(!mId.isNull() && mId == e->mIdentityId) + requestIdDetails(); + + break; default: break; } @@ -2205,16 +2209,16 @@ void IdDialog::updateDisplay(bool complete) } requestCircleGroupMeta(); - std::set grpIds; - getAllGrpIds(grpIds); - if (!getGrpIds().empty()) { - requestIdList(); - - if (!mId.isNull() && grpIds.find(mId)!=grpIds.end()) { - requestIdDetails(); - requestRepList(); - } - } +// std::set grpIds; +// getAllGrpIds(grpIds); +// if (!getGrpIds().empty()) { +// requestIdList(); +// +// if (!mId.isNull() && grpIds.find(mId)!=grpIds.end()) { +// requestIdDetails(); +// requestRepList(); +// } +// } } void IdDialog::addIdentity() diff --git a/retroshare-gui/src/gui/Identity/IdDialog.h b/retroshare-gui/src/gui/Identity/IdDialog.h index e4c73229d..40a975eb8 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.h +++ b/retroshare-gui/src/gui/Identity/IdDialog.h @@ -45,7 +45,7 @@ struct CircleUpdateOrder uint32_t action ; }; -class IdDialog : public RsGxsUpdateBroadcastPage, public TokenResponse +class IdDialog : public MainPage, public TokenResponse { Q_OBJECT diff --git a/retroshare-gui/src/gui/People/PeopleDialog.cpp b/retroshare-gui/src/gui/People/PeopleDialog.cpp index 626df8206..ca7075c00 100644 --- a/retroshare-gui/src/gui/People/PeopleDialog.cpp +++ b/retroshare-gui/src/gui/People/PeopleDialog.cpp @@ -25,7 +25,7 @@ #include "gui/msgs/MessageComposer.h" #include "gui/RetroShareLink.h" #include "gui/gxs/GxsIdDetails.h" -#include "gui/gxs/RsGxsUpdateBroadcastBase.h" +//#include "gui/gxs/RsGxsUpdateBroadcastBase.h" #include "gui/Identity/IdDetailsDialog.h" #include "gui/Identity/IdDialog.h" #include "gui/MainWindow.h" @@ -53,7 +53,7 @@ const uint32_t PeopleDialog::PD_CIRCLES = 0x0004 ; /** Constructor */ PeopleDialog::PeopleDialog(QWidget *parent) - : RsGxsUpdateBroadcastPage(rsIdentity, parent) + : MainPage(parent) { setupUi(this); @@ -61,8 +61,8 @@ PeopleDialog::PeopleDialog(QWidget *parent) mIdentityQueue = new TokenQueue(rsIdentity->getTokenService(), this); mCirclesQueue = new TokenQueue(rsGxsCircles->getTokenService(), this); // 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))); + //mCirclesBroadcastBase = new RsGxsUpdateBroadcastBase(rsGxsCircles, this); + //connect(mCirclesBroadcastBase, SIGNAL(fillDisplay(bool)), this, SLOT(updateCirclesDisplay(bool))); tabWidget->removeTab(1); diff --git a/retroshare-gui/src/gui/People/PeopleDialog.h b/retroshare-gui/src/gui/People/PeopleDialog.h index bf8e7b1ea..808c61a26 100644 --- a/retroshare-gui/src/gui/People/PeopleDialog.h +++ b/retroshare-gui/src/gui/People/PeopleDialog.h @@ -33,7 +33,7 @@ #define IMAGE_IDENTITY ":/icons/png/people.png" -class PeopleDialog : public RsGxsUpdateBroadcastPage, public Ui::PeopleDialog, public TokenResponse +class PeopleDialog : public MainPage, public Ui::PeopleDialog, public TokenResponse { Q_OBJECT @@ -97,7 +97,7 @@ private: TokenQueue *mIdentityQueue; TokenQueue *mCirclesQueue; - RsGxsUpdateBroadcastBase *mCirclesBroadcastBase ; + //RsGxsUpdateBroadcastBase *mCirclesBroadcastBase ; FlowLayout *_flowLayoutExt; std::map _gxs_identity_widgets ; diff --git a/retroshare-gui/src/gui/Posted/PostedDialog.cpp b/retroshare-gui/src/gui/Posted/PostedDialog.cpp index e696db36c..b7a098f60 100644 --- a/retroshare-gui/src/gui/Posted/PostedDialog.cpp +++ b/retroshare-gui/src/gui/Posted/PostedDialog.cpp @@ -60,13 +60,7 @@ void PostedDialog::handleEvent_main_thread(std::shared_ptr event) switch(e->mPostedEventCode) { case RsPostedEventCode::NEW_MESSAGE: - updateMessageSummaryList(e->mPostedGroupId); - break; - case RsPostedEventCode::UPDATED_MESSAGE: // [[fallthrough]]; - updateDisplay(false); - break; - case RsPostedEventCode::READ_STATUS_CHANGED: // [[fallthrough]]; updateMessageSummaryList(e->mPostedGroupId); break; diff --git a/retroshare-gui/src/gui/common/FriendSelectionWidget.cpp b/retroshare-gui/src/gui/common/FriendSelectionWidget.cpp index 2770622fe..9cad929e0 100644 --- a/retroshare-gui/src/gui/common/FriendSelectionWidget.cpp +++ b/retroshare-gui/src/gui/common/FriendSelectionWidget.cpp @@ -80,7 +80,7 @@ static void setSelected(FriendSelectionWidget::Modus modus, QTreeWidgetItem *ite } FriendSelectionWidget::FriendSelectionWidget(QWidget *parent) - : RsGxsUpdateBroadcastPage(rsIdentity,parent), ui(new Ui::FriendSelectionWidget) + : QWidget(parent), ui(new Ui::FriendSelectionWidget) { ui->setupUi(this); diff --git a/retroshare-gui/src/gui/common/FriendSelectionWidget.h b/retroshare-gui/src/gui/common/FriendSelectionWidget.h index 3b7a3db6c..50fb30f07 100644 --- a/retroshare-gui/src/gui/common/FriendSelectionWidget.h +++ b/retroshare-gui/src/gui/common/FriendSelectionWidget.h @@ -34,7 +34,7 @@ class FriendSelectionWidget; class QTreeWidgetItem; class RSTreeWidgetItemCompareRole; -class FriendSelectionWidget : public RsGxsUpdateBroadcastPage, public TokenResponse +class FriendSelectionWidget : public QWidget, public TokenResponse { Q_OBJECT diff --git a/retroshare-gui/src/gui/gxs/GxsFeedItem.cpp b/retroshare-gui/src/gui/gxs/GxsFeedItem.cpp index 98873445a..2f11fe00e 100644 --- a/retroshare-gui/src/gui/gxs/GxsFeedItem.cpp +++ b/retroshare-gui/src/gui/gxs/GxsFeedItem.cpp @@ -86,6 +86,7 @@ void GxsFeedItem::copyMessageLink() } } +#ifdef TO_REMOVE void GxsFeedItem::fillDisplay(RsGxsUpdateBroadcastBase *updateBroadcastBase, bool complete) { GxsGroupFeedItem::fillDisplay(updateBroadcastBase, complete); @@ -101,6 +102,7 @@ void GxsFeedItem::fillDisplay(RsGxsUpdateBroadcastBase *updateBroadcastBase, boo requestMessage(); } } +#endif void GxsFeedItem::requestMessage() { diff --git a/retroshare-gui/src/gui/gxs/GxsFeedItem.h b/retroshare-gui/src/gui/gxs/GxsFeedItem.h index 9b0fa9474..91fda9cf6 100644 --- a/retroshare-gui/src/gui/gxs/GxsFeedItem.h +++ b/retroshare-gui/src/gui/gxs/GxsFeedItem.h @@ -50,7 +50,7 @@ protected: /* GxsGroupFeedItem */ virtual bool isLoading(); - virtual void fillDisplay(RsGxsUpdateBroadcastBase *updateBroadcastBase, bool complete); + //virtual void fillDisplay(RsGxsUpdateBroadcastBase *updateBroadcastBase, bool complete); /* TokenResponse */ virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req); diff --git a/retroshare-gui/src/gui/gxs/GxsGroupFeedItem.cpp b/retroshare-gui/src/gui/gxs/GxsGroupFeedItem.cpp index 1f5b09cb8..b8d60dd24 100644 --- a/retroshare-gui/src/gui/gxs/GxsGroupFeedItem.cpp +++ b/retroshare-gui/src/gui/gxs/GxsGroupFeedItem.cpp @@ -51,6 +51,7 @@ GxsGroupFeedItem::GxsGroupFeedItem(FeedHolder *feedHolder, uint32_t feedId, cons mLoadQueue = NULL; +#ifdef TO_REMOVE if (mGxsIface && autoUpdate) { /* Connect to update broadcast */ mUpdateBroadcastBase = new RsGxsUpdateBroadcastBase(mGxsIface); @@ -58,6 +59,7 @@ GxsGroupFeedItem::GxsGroupFeedItem(FeedHolder *feedHolder, uint32_t feedId, cons } else { mUpdateBroadcastBase = NULL; } +#endif } GxsGroupFeedItem::~GxsGroupFeedItem() @@ -71,10 +73,12 @@ GxsGroupFeedItem::~GxsGroupFeedItem() delete mLoadQueue; } +#ifdef TO_REMOVE if (mUpdateBroadcastBase) { delete(mUpdateBroadcastBase); } +#endif } bool GxsGroupFeedItem::initLoadQueue() @@ -139,9 +143,11 @@ void GxsGroupFeedItem::copyGroupLink() void GxsGroupFeedItem::fillDisplaySlot(bool complete) { - fillDisplay(mUpdateBroadcastBase, complete); + requestGroup(); +// fillDisplay(mUpdateBroadcastBase, complete); } +#ifdef TO_REMOVE void GxsGroupFeedItem::fillDisplay(RsGxsUpdateBroadcastBase *updateBroadcastBase, bool /*complete*/) { std::set grpIds; @@ -150,6 +156,7 @@ void GxsGroupFeedItem::fillDisplay(RsGxsUpdateBroadcastBase *updateBroadcastBase if (grpIds.find(groupId()) != grpIds.end()) requestGroup(); } +#endif /***********************************************************/ diff --git a/retroshare-gui/src/gui/gxs/GxsGroupFeedItem.h b/retroshare-gui/src/gui/gxs/GxsGroupFeedItem.h index 9696490d9..6c9c8d21d 100644 --- a/retroshare-gui/src/gui/gxs/GxsGroupFeedItem.h +++ b/retroshare-gui/src/gui/gxs/GxsGroupFeedItem.h @@ -56,7 +56,7 @@ protected: virtual void loadGroup(const uint32_t &token) = 0; virtual RetroShareLink::enumType getLinkType() = 0; virtual QString groupName() = 0; - virtual void fillDisplay(RsGxsUpdateBroadcastBase *updateBroadcastBase, bool complete); + //virtual void fillDisplay(RsGxsUpdateBroadcastBase *updateBroadcastBase, bool complete); /* TokenResponse */ virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req); @@ -77,7 +77,7 @@ private slots: private: RsGxsGroupId mGroupId; - RsGxsUpdateBroadcastBase *mUpdateBroadcastBase; +// RsGxsUpdateBroadcastBase *mUpdateBroadcastBase; uint32_t mNextTokenType; uint32_t mTokenTypeGroup; }; diff --git a/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.cpp b/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.cpp index d2aa30ce3..bb092454b 100644 --- a/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.cpp +++ b/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.cpp @@ -68,7 +68,7 @@ /** Constructor */ GxsGroupFrameDialog::GxsGroupFrameDialog(RsGxsIfaceHelper *ifaceImpl, QWidget *parent,bool allow_dist_sync) -: RsGxsUpdateBroadcastPage(ifaceImpl, parent) +: MainPage(parent) { /* Invoke the Qt Designer generated object setup routine */ ui = new Ui::GxsGroupFrameDialog(); @@ -179,7 +179,9 @@ void GxsGroupFrameDialog::showEvent(QShowEvent *event) initUi(); } - RsGxsUpdateBroadcastPage::showEvent(event); + updateDisplay(true); + +// RsGxsUpdateBroadcastPage::showEvent(event); } void GxsGroupFrameDialog::processSettings(bool load) @@ -239,25 +241,15 @@ void GxsGroupFrameDialog::setHideTabBarWithOneTab(bool hideTabBarWithOneTab) void GxsGroupFrameDialog::updateDisplay(bool complete) { - if (complete || !getGrpIds().empty() || !getGrpIdsMeta().empty()) { - /* Update group list */ - requestGroupSummary(); - } else { - /* Update all groups of changed messages */ - std::map > msgIds; - getAllMsgIds(msgIds); - - for (auto msgIt = msgIds.begin(); msgIt != msgIds.end(); ++msgIt) { - updateMessageSummaryList(msgIt->first); - } - } + if(complete) // || !getGrpIds().empty() || !getGrpIdsMeta().empty()) { + requestGroupSummary(); /* Update group list */ updateSearchResults() ; } void GxsGroupFrameDialog::updateSearchResults() { - const std::set& reqs = getSearchResults(); + const std::set& reqs = getSearchRequests(); for(auto it(reqs.begin());it!=reqs.end();++it) { diff --git a/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.h b/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.h index 29a22d781..86cf3252a 100644 --- a/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.h +++ b/retroshare-gui/src/gui/gxs/GxsGroupFrameDialog.h @@ -44,7 +44,7 @@ class UIStateHelper; struct RsGxsCommentService; class GxsCommentDialog; -class GxsGroupFrameDialog : public RsGxsUpdateBroadcastPage, public TokenResponse +class GxsGroupFrameDialog : public MainPage, public TokenResponse { Q_OBJECT @@ -98,6 +98,7 @@ protected: void updateMessageSummaryList(RsGxsGroupId groupId); + virtual const std::set getSearchRequests() const { return std::set(); } // overload this for subclasses that provide distant search private slots: void todo(); diff --git a/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp b/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp index e4e20dfd8..60d813111 100644 --- a/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp +++ b/retroshare-gui/src/gui/gxs/GxsIdChooser.cpp @@ -51,8 +51,8 @@ GxsIdChooser::GxsIdChooser(QWidget *parent) : QComboBox(parent), mFlags(IDCHOOSER_ANON_DEFAULT) { - mBase = new RsGxsUpdateBroadcastBase(rsIdentity, this); - connect(mBase, SIGNAL(fillDisplay(bool)), this, SLOT(fillDisplay(bool))); +// mBase = new RsGxsUpdateBroadcastBase(rsIdentity, this); +// connect(mBase, SIGNAL(fillDisplay(bool)), this, SLOT(fillDisplay(bool))); /* Initialize ui */ setSizeAdjustPolicy(QComboBox::AdjustToContents); @@ -94,7 +94,8 @@ void GxsIdChooser::fillDisplay(bool complete) void GxsIdChooser::showEvent(QShowEvent *event) { - mBase->showEvent(event); +// mBase->showEvent(event); + updateDisplay(true); QComboBox::showEvent(event); } diff --git a/retroshare-gui/src/gui/gxs/GxsIdChooser.h b/retroshare-gui/src/gui/gxs/GxsIdChooser.h index dbd9fb91f..3cee770eb 100644 --- a/retroshare-gui/src/gui/gxs/GxsIdChooser.h +++ b/retroshare-gui/src/gui/gxs/GxsIdChooser.h @@ -86,7 +86,7 @@ private: uint32_t mAllowedCount ; std::set mConstraintIdsSet ; // leave empty if all allowed - RsGxsUpdateBroadcastBase *mBase; +// RsGxsUpdateBroadcastBase *mBase; }; #endif diff --git a/retroshare-gui/src/gui/gxs/GxsMessageFramePostWidget.cpp b/retroshare-gui/src/gui/gxs/GxsMessageFramePostWidget.cpp index bff646b01..ed7e910d2 100644 --- a/retroshare-gui/src/gui/gxs/GxsMessageFramePostWidget.cpp +++ b/retroshare-gui/src/gui/gxs/GxsMessageFramePostWidget.cpp @@ -55,7 +55,7 @@ void GxsMessageFramePostWidget::groupIdChanged() emit groupChanged(this); - fillComplete(); + updateDisplay(true); } QString GxsMessageFramePostWidget::groupName(bool /*withUnreadCount*/) @@ -107,6 +107,7 @@ void GxsMessageFramePostWidget::updateDisplay(bool complete) return; } +#ifdef TO_REMOVE bool updateGroup = false; const std::set &grpIdsMeta = getGrpIdsMeta(); @@ -133,6 +134,7 @@ void GxsMessageFramePostWidget::updateDisplay(bool complete) if (updateGroup) { requestGroupData(); } +#endif } void GxsMessageFramePostWidget::fillThreadAddPost(const QVariant &post, bool related, int current, int count) diff --git a/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.cpp b/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.cpp index 4e8780435..8d9a89a47 100644 --- a/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.cpp +++ b/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.cpp @@ -24,7 +24,7 @@ #include GxsMessageFrameWidget::GxsMessageFrameWidget(RsGxsIfaceHelper *ifaceImpl, QWidget *parent) - : RsGxsUpdateBroadcastWidget(ifaceImpl, parent) + : QWidget(parent) { mNextTokenType = 0; diff --git a/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.h b/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.h index 41b98dc6b..9b9a8e34e 100644 --- a/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.h +++ b/retroshare-gui/src/gui/gxs/GxsMessageFrameWidget.h @@ -27,7 +27,7 @@ struct RsGxsIfaceHelper; class UIStateHelper; -class GxsMessageFrameWidget : public RsGxsUpdateBroadcastWidget, public TokenResponse +class GxsMessageFrameWidget : public QWidget, public TokenResponse { Q_OBJECT diff --git a/retroshare-gui/src/gui/gxs/GxsUserNotify.cpp b/retroshare-gui/src/gui/gxs/GxsUserNotify.cpp index ec2e0b09a..bca319e9a 100644 --- a/retroshare-gui/src/gui/gxs/GxsUserNotify.cpp +++ b/retroshare-gui/src/gui/gxs/GxsUserNotify.cpp @@ -19,7 +19,7 @@ *******************************************************************************/ #include "GxsUserNotify.h" -#include "gui/gxs/RsGxsUpdateBroadcastBase.h" +//#include "gui/gxs/RsGxsUpdateBroadcastBase.h" #include "retroshare/rsgxsifacehelper.h" @@ -36,8 +36,8 @@ GxsUserNotify::GxsUserNotify(RsGxsIfaceHelper *ifaceImpl, QObject *parent) : mTokenService = mInterface->getTokenService(); mTokenQueue = new TokenQueue(mInterface->getTokenService(), this); - mBase = new RsGxsUpdateBroadcastBase(ifaceImpl); - connect(mBase, SIGNAL(fillDisplay(bool)), this, SLOT(updateIcon())); + //mBase = new RsGxsUpdateBroadcastBase(ifaceImpl); + //connect(mBase, SIGNAL(fillDisplay(bool)), this, SLOT(updateIcon())); } GxsUserNotify::~GxsUserNotify() @@ -45,9 +45,9 @@ GxsUserNotify::~GxsUserNotify() if (mTokenQueue) { delete(mTokenQueue); } - if (mBase) { - delete(mBase); - } + //if (mBase) { + //delete(mBase); + //} } void GxsUserNotify::startUpdate() diff --git a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.h b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.h index ef19a1967..8c603ae84 100644 --- a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.h +++ b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastBase.h @@ -47,7 +47,7 @@ public: const std::map > &getMsgIds() { return mMsgIds; } const std::map > &getMsgIdsMeta() { return mMsgIdsMeta; } void getAllMsgIds(std::map > &msgIds); - const std::set& getSearchResults() { return mTurtleResults ; } + const std::set& getSearchRequests() { return mTurtleResults ; } protected: void fillComplete(); diff --git a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastPage.h b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastPage.h index ebf1000af..2e13e0910 100644 --- a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastPage.h +++ b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastPage.h @@ -52,7 +52,7 @@ public: const std::map > &getMsgIdsMeta(); void getAllMsgIds(std::map > &msgIds); - virtual const std::set getSearchResults() const { return std::set(); } // overload this for subclasses that provide distant search + virtual const std::set getSearchRequests() const { return std::set(); } // overload this for subclasses that provide distant search protected: virtual void showEvent(QShowEvent *event); diff --git a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.cpp b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.cpp index 98c6354e1..07e55cd94 100644 --- a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.cpp +++ b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.cpp @@ -49,10 +49,12 @@ const std::set &RsGxsUpdateBroadcastWidget::getGrpIds() return mBase->getGrpIds(); } +#ifdef TO_REMOVE const std::set& RsGxsUpdateBroadcastWidget::getSearchResults() { return mBase->getSearchResults(); } +#endif const std::set &RsGxsUpdateBroadcastWidget::getGrpIdsMeta() { return mBase->getGrpIdsMeta(); diff --git a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.h b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.h index d1404b656..016c58214 100644 --- a/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.h +++ b/retroshare-gui/src/gui/gxs/RsGxsUpdateBroadcastWidget.h @@ -51,7 +51,7 @@ public: const std::map > &getMsgIds(); const std::map > &getMsgIdsMeta(); void getAllMsgIds(std::map > &msgIds); - const std::set& getSearchResults() ; + const std::set& getSearchquests() ; RsGxsIfaceHelper *interfaceHelper() { return mInterfaceHelper; } diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp index e8534e8f7..6588d85c2 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp @@ -65,13 +65,7 @@ void GxsChannelDialog::handleEvent_main_thread(std::shared_ptr ev switch(e->mChannelEventCode) { case RsChannelEventCode::NEW_MESSAGE: - updateMessageSummaryList(e->mChannelGroupId); - break; - case RsChannelEventCode::UPDATED_MESSAGE: // [[fallthrough]]; - updateDisplay(false); - break; - case RsChannelEventCode::READ_STATUS_CHANGED: updateMessageSummaryList(e->mChannelGroupId); break; diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.h b/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.h index 1ab59ca1e..9413b3057 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.h +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.h @@ -48,7 +48,7 @@ protected: virtual QString getHelpString() const ; virtual void groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo, GroupItemInfo &groupItemInfo, const RsUserdata *userdata); virtual bool getDistantSearchResults(TurtleRequestId id, std::map& group_infos); - virtual const std::set getSearchResults() const override { return mSearchResults ; } + virtual const std::set getSearchRequests() const override { return mSearchResults ; } virtual TurtleRequestId distantSearch(const QString& search_string) ; virtual void checkRequestGroup(const RsGxsGroupId& grpId) ; diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index 85343fdb8..f47f0a1d0 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -311,7 +311,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget { ui->setupUi(this); - setUpdateWhenInvisible(true); + //setUpdateWhenInvisible(true); //mUpdating = false; mUnreadCount = 0; @@ -680,6 +680,7 @@ void GxsForumThreadWidget::updateDisplay(bool complete) complete = true; } +#ifdef TO_REMOVE if(!complete) { #ifdef DEBUG_FORUMS @@ -725,6 +726,7 @@ void GxsForumThreadWidget::updateDisplay(bool complete) } } } +#endif if(complete) // need to update the group data, reload the messages etc. { diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp index 71766ca63..f37d88736 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp @@ -60,13 +60,7 @@ void GxsForumsDialog::handleEvent_main_thread(std::shared_ptr eve switch(e->mForumEventCode) { case RsForumEventCode::NEW_MESSAGE: - updateMessageSummaryList(e->mForumGroupId); - break; - case RsForumEventCode::UPDATED_MESSAGE: // [[fallthrough]]; - updateDisplay(false); - break; - case RsForumEventCode::READ_STATUS_CHANGED: updateMessageSummaryList(e->mForumGroupId); break; diff --git a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp index b5a42264e..cde8c74da 100644 --- a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp +++ b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp @@ -78,7 +78,7 @@ //#define DEBUG_GXSTRANS_STATS 1 GxsTransportStatistics::GxsTransportStatistics(QWidget *parent) - : RsGxsUpdateBroadcastPage(rsGxsTrans,parent) + : MainPage(parent) { setupUi(this) ; diff --git a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.h b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.h index a1591ad16..2cf8c78b4 100644 --- a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.h +++ b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.h @@ -60,7 +60,7 @@ public: std::map messages_metas ; }; -class GxsTransportStatistics: public RsGxsUpdateBroadcastPage, public TokenResponse, public Ui::GxsTransportStatistics +class GxsTransportStatistics: public MainPage, public TokenResponse, public Ui::GxsTransportStatistics { Q_OBJECT diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index 188bd9546..8f49a1525 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -1394,9 +1394,9 @@ gxsgui { gui/gxs/GxsMessageFramePostWidget.h \ gui/gxs/GxsGroupFeedItem.h \ gui/gxs/GxsFeedItem.h \ - gui/gxs/RsGxsUpdateBroadcastBase.h \ - gui/gxs/RsGxsUpdateBroadcastWidget.h \ - gui/gxs/RsGxsUpdateBroadcastPage.h \ +# gui/gxs/RsGxsUpdateBroadcastBase.h \ +# gui/gxs/RsGxsUpdateBroadcastWidget.h \ +# gui/gxs/RsGxsUpdateBroadcastPage.h \ gui/gxs/GxsGroupShareKey.h \ gui/gxs/GxsUserNotify.h \ gui/gxs/GxsFeedWidget.h \ @@ -1431,9 +1431,9 @@ gxsgui { gui/gxs/GxsMessageFramePostWidget.cpp \ gui/gxs/GxsGroupFeedItem.cpp \ gui/gxs/GxsFeedItem.cpp \ - gui/gxs/RsGxsUpdateBroadcastBase.cpp \ - gui/gxs/RsGxsUpdateBroadcastWidget.cpp \ - gui/gxs/RsGxsUpdateBroadcastPage.cpp \ +# gui/gxs/RsGxsUpdateBroadcastBase.cpp \ +# gui/gxs/RsGxsUpdateBroadcastWidget.cpp \ +# gui/gxs/RsGxsUpdateBroadcastPage.cpp \ gui/gxs/GxsUserNotify.cpp \ gui/gxs/GxsFeedWidget.cpp \ util/TokenQueue.cpp \ diff --git a/tests/unittests/libretroshare/services/gxs/gxstestservice.cc b/tests/unittests/libretroshare/services/gxs/gxstestservice.cc index e30309942..8d1799507 100644 --- a/tests/unittests/libretroshare/services/gxs/gxstestservice.cc +++ b/tests/unittests/libretroshare/services/gxs/gxstestservice.cc @@ -82,8 +82,6 @@ void GxsTestService::notifyChanges(std::vector& changes) { std::cerr << "GxsTestService::notifyChanges() New stuff"; std::cerr << std::endl; - - RsGxsIfaceHelper::receiveChanges(changes); } /* Specific Service Data */