mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 08:29:26 -05:00
renamed a few constants of GXS notify system into more consistent values
This commit is contained in:
parent
c79ceba4ee
commit
5cb48c27de
@ -1643,7 +1643,7 @@ void RsGenExchange::notifyReceivePublishKey(const RsGxsGroupId &grpId)
|
|||||||
{
|
{
|
||||||
RS_STACK_MUTEX(mGenMtx);
|
RS_STACK_MUTEX(mGenMtx);
|
||||||
|
|
||||||
RsGxsGroupChange* gc = new RsGxsGroupChange(RsGxsNotify::TYPE_PUBLISHKEY, true);
|
RsGxsGroupChange* gc = new RsGxsGroupChange(RsGxsNotify::TYPE_RECEIVED_PUBLISHKEY, true);
|
||||||
gc->mGrpIdList.push_back(grpId);
|
gc->mGrpIdList.push_back(grpId);
|
||||||
mNotifications.push_back(gc);
|
mNotifications.push_back(gc);
|
||||||
}
|
}
|
||||||
@ -2314,7 +2314,7 @@ void RsGenExchange::publishMsgs()
|
|||||||
|
|
||||||
if(!msgChangeMap.empty())
|
if(!msgChangeMap.empty())
|
||||||
{
|
{
|
||||||
RsGxsMsgChange* ch = new RsGxsMsgChange(RsGxsNotify::TYPE_PUBLISH, false);
|
RsGxsMsgChange* ch = new RsGxsMsgChange(RsGxsNotify::TYPE_PUBLISHED, false);
|
||||||
ch->msgChangeMap = msgChangeMap;
|
ch->msgChangeMap = msgChangeMap;
|
||||||
mNotifications.push_back(ch);
|
mNotifications.push_back(ch);
|
||||||
}
|
}
|
||||||
@ -2451,7 +2451,7 @@ void RsGenExchange::processGroupDelete()
|
|||||||
|
|
||||||
if(!grpDeleted.empty())
|
if(!grpDeleted.empty())
|
||||||
{
|
{
|
||||||
RsGxsGroupChange* gc = new RsGxsGroupChange(RsGxsNotify::TYPE_PUBLISH, false);
|
RsGxsGroupChange* gc = new RsGxsGroupChange(RsGxsNotify::TYPE_PUBLISHED, false);
|
||||||
gc->mGrpIdList = grpDeleted;
|
gc->mGrpIdList = grpDeleted;
|
||||||
mNotifications.push_back(gc);
|
mNotifications.push_back(gc);
|
||||||
}
|
}
|
||||||
@ -2760,7 +2760,7 @@ void RsGenExchange::publishGrps()
|
|||||||
|
|
||||||
if(!grpChanged.empty())
|
if(!grpChanged.empty())
|
||||||
{
|
{
|
||||||
RsGxsGroupChange* gc = new RsGxsGroupChange(RsGxsNotify::TYPE_RECEIVE, true);
|
RsGxsGroupChange* gc = new RsGxsGroupChange(RsGxsNotify::TYPE_RECEIVED_NEW, true);
|
||||||
gc->mGrpIdList = grpChanged;
|
gc->mGrpIdList = grpChanged;
|
||||||
mNotifications.push_back(gc);
|
mNotifications.push_back(gc);
|
||||||
#ifdef GEN_EXCH_DEBUG
|
#ifdef GEN_EXCH_DEBUG
|
||||||
@ -3026,7 +3026,7 @@ void RsGenExchange::processRecvdMessages()
|
|||||||
#endif
|
#endif
|
||||||
mDataStore->storeMessage(msgs_to_store);
|
mDataStore->storeMessage(msgs_to_store);
|
||||||
|
|
||||||
RsGxsMsgChange* c = new RsGxsMsgChange(RsGxsNotify::TYPE_RECEIVE, false);
|
RsGxsMsgChange* c = new RsGxsMsgChange(RsGxsNotify::TYPE_RECEIVED_NEW, false);
|
||||||
c->msgChangeMap = msgIds;
|
c->msgChangeMap = msgIds;
|
||||||
mNotifications.push_back(c);
|
mNotifications.push_back(c);
|
||||||
}
|
}
|
||||||
@ -3159,7 +3159,7 @@ void RsGenExchange::processRecvdGroups()
|
|||||||
|
|
||||||
if(!grpIds.empty())
|
if(!grpIds.empty())
|
||||||
{
|
{
|
||||||
RsGxsGroupChange* c = new RsGxsGroupChange(RsGxsNotify::TYPE_RECEIVE, false);
|
RsGxsGroupChange* c = new RsGxsGroupChange(RsGxsNotify::TYPE_RECEIVED_NEW, false);
|
||||||
c->mGrpIdList = grpIds;
|
c->mGrpIdList = grpIds;
|
||||||
mNotifications.push_back(c);
|
mNotifications.push_back(c);
|
||||||
mDataStore->storeGroup(grps_to_store);
|
mDataStore->storeGroup(grps_to_store);
|
||||||
@ -3243,7 +3243,7 @@ void RsGenExchange::performUpdateValidation()
|
|||||||
}
|
}
|
||||||
// notify the client
|
// notify the client
|
||||||
|
|
||||||
RsGxsGroupChange* c = new RsGxsGroupChange(RsGxsNotify::TYPE_RECEIVE, true);
|
RsGxsGroupChange* c = new RsGxsGroupChange(RsGxsNotify::TYPE_RECEIVED_NEW, true);
|
||||||
|
|
||||||
for(uint32_t i=0;i<mGroupUpdates.size();++i)
|
for(uint32_t i=0;i<mGroupUpdates.size();++i)
|
||||||
if(mGroupUpdates[i].newGrp != NULL)
|
if(mGroupUpdates[i].newGrp != NULL)
|
||||||
|
@ -18,7 +18,7 @@ typedef std::map<RsGxsGrpMsgIdPair, std::vector<RsMsgMetaData> > GxsMsgRelatedMe
|
|||||||
struct RsGxsNotify
|
struct RsGxsNotify
|
||||||
{
|
{
|
||||||
enum NotifyType
|
enum NotifyType
|
||||||
{ TYPE_PUBLISH, TYPE_RECEIVE, TYPE_PROCESSED, TYPE_PUBLISHKEY };
|
{ TYPE_PUBLISHED, TYPE_RECEIVED_NEW, TYPE_PROCESSED, TYPE_RECEIVED_PUBLISHKEY };
|
||||||
|
|
||||||
virtual ~RsGxsNotify() {}
|
virtual ~RsGxsNotify() {}
|
||||||
virtual NotifyType getType() = 0;
|
virtual NotifyType getType() = 0;
|
||||||
|
@ -237,7 +237,7 @@ void p3GxsChannels::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
RsGxsMsgChange *msgChange = dynamic_cast<RsGxsMsgChange *>(*it);
|
RsGxsMsgChange *msgChange = dynamic_cast<RsGxsMsgChange *>(*it);
|
||||||
if (msgChange)
|
if (msgChange)
|
||||||
{
|
{
|
||||||
if (msgChange->getType() == RsGxsNotify::TYPE_RECEIVE)
|
if (msgChange->getType() == RsGxsNotify::TYPE_RECEIVED_NEW)
|
||||||
{
|
{
|
||||||
/* message received */
|
/* message received */
|
||||||
if (notify)
|
if (notify)
|
||||||
@ -296,10 +296,10 @@ void p3GxsChannels::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
switch (grpChange->getType())
|
switch (grpChange->getType())
|
||||||
{
|
{
|
||||||
case RsGxsNotify::TYPE_PROCESSED:
|
case RsGxsNotify::TYPE_PROCESSED:
|
||||||
case RsGxsNotify::TYPE_PUBLISH:
|
case RsGxsNotify::TYPE_PUBLISHED:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RsGxsNotify::TYPE_RECEIVE:
|
case RsGxsNotify::TYPE_RECEIVED_NEW:
|
||||||
{
|
{
|
||||||
/* group received */
|
/* group received */
|
||||||
std::list<RsGxsGroupId> &grpList = grpChange->mGrpIdList;
|
std::list<RsGxsGroupId> &grpList = grpChange->mGrpIdList;
|
||||||
@ -317,7 +317,7 @@ void p3GxsChannels::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case RsGxsNotify::TYPE_PUBLISHKEY:
|
case RsGxsNotify::TYPE_RECEIVED_PUBLISHKEY:
|
||||||
{
|
{
|
||||||
/* group received */
|
/* group received */
|
||||||
std::list<RsGxsGroupId> &grpList = grpChange->mGrpIdList;
|
std::list<RsGxsGroupId> &grpList = grpChange->mGrpIdList;
|
||||||
|
@ -218,7 +218,7 @@ void p3GxsCircles::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
std::cerr << " Msgs for Group: " << mit->first << std::endl;
|
std::cerr << " Msgs for Group: " << mit->first << std::endl;
|
||||||
#endif
|
#endif
|
||||||
force_cache_reload(RsGxsCircleId(mit->first));
|
force_cache_reload(RsGxsCircleId(mit->first));
|
||||||
if (notify && (c->getType() == RsGxsNotify::TYPE_RECEIVE) )
|
if (notify && (c->getType() == RsGxsNotify::TYPE_RECEIVED_NEW) )
|
||||||
for (std::vector<RsGxsMessageId>::const_iterator msgIdIt(mit->second.begin()), end(mit->second.end()); msgIdIt != end; ++msgIdIt)
|
for (std::vector<RsGxsMessageId>::const_iterator msgIdIt(mit->second.begin()), end(mit->second.end()); msgIdIt != end; ++msgIdIt)
|
||||||
{
|
{
|
||||||
const RsGxsMessageId& msgId = *msgIdIt;
|
const RsGxsMessageId& msgId = *msgIdIt;
|
||||||
@ -261,7 +261,7 @@ void p3GxsCircles::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
std::cerr << " forcing cache loading for circle " << *git << " in order to trigger subscribe update." << std::endl;
|
std::cerr << " forcing cache loading for circle " << *git << " in order to trigger subscribe update." << std::endl;
|
||||||
#endif
|
#endif
|
||||||
force_cache_reload(RsGxsCircleId(*git)) ;
|
force_cache_reload(RsGxsCircleId(*git)) ;
|
||||||
if (notify && (c->getType() == RsGxsNotify::TYPE_RECEIVE) )
|
if (notify && (c->getType() == RsGxsNotify::TYPE_RECEIVED_NEW) )
|
||||||
notify->AddFeedItem(RS_FEED_ITEM_CIRCLE_INVIT_REC,RsGxsCircleId(*git).toStdString(),"");
|
notify->AddFeedItem(RS_FEED_ITEM_CIRCLE_INVIT_REC,RsGxsCircleId(*git).toStdString(),"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,10 +197,10 @@ void p3GxsForums::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
switch (c->getType())
|
switch (c->getType())
|
||||||
{
|
{
|
||||||
case RsGxsNotify::TYPE_PROCESSED:
|
case RsGxsNotify::TYPE_PROCESSED:
|
||||||
case RsGxsNotify::TYPE_PUBLISH:
|
case RsGxsNotify::TYPE_PUBLISHED:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RsGxsNotify::TYPE_RECEIVE:
|
case RsGxsNotify::TYPE_RECEIVED_NEW:
|
||||||
{
|
{
|
||||||
RsGxsMsgChange *msgChange = dynamic_cast<RsGxsMsgChange*>(c);
|
RsGxsMsgChange *msgChange = dynamic_cast<RsGxsMsgChange*>(c);
|
||||||
if (msgChange)
|
if (msgChange)
|
||||||
@ -242,7 +242,7 @@ void p3GxsForums::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case RsGxsNotify::TYPE_PUBLISHKEY:
|
case RsGxsNotify::TYPE_RECEIVED_PUBLISHKEY:
|
||||||
{
|
{
|
||||||
RsGxsGroupChange *grpChange = dynamic_cast<RsGxsGroupChange *>(*it);
|
RsGxsGroupChange *grpChange = dynamic_cast<RsGxsGroupChange *>(*it);
|
||||||
if (grpChange)
|
if (grpChange)
|
||||||
|
@ -123,7 +123,7 @@ void p3PostBase::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
// It could be taken a step further and directly request these msgs for an update.
|
// It could be taken a step further and directly request these msgs for an update.
|
||||||
addGroupForProcessing(mit->first);
|
addGroupForProcessing(mit->first);
|
||||||
|
|
||||||
if (notify && msgChange->getType() == RsGxsNotify::TYPE_RECEIVE)
|
if (notify && msgChange->getType() == RsGxsNotify::TYPE_RECEIVED_NEW)
|
||||||
{
|
{
|
||||||
std::vector<RsGxsMessageId>::iterator mit1;
|
std::vector<RsGxsMessageId>::iterator mit1;
|
||||||
for (mit1 = mit->second.begin(); mit1 != mit->second.end(); ++mit1)
|
for (mit1 = mit->second.begin(); mit1 != mit->second.end(); ++mit1)
|
||||||
@ -151,7 +151,7 @@ void p3PostBase::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (notify && groupChange->getType() == RsGxsNotify::TYPE_RECEIVE)
|
if (notify && groupChange->getType() == RsGxsNotify::TYPE_RECEIVED_NEW)
|
||||||
{
|
{
|
||||||
notify->AddFeedItem(RS_FEED_ITEM_POSTED_NEW, git->toStdString());
|
notify->AddFeedItem(RS_FEED_ITEM_POSTED_NEW, git->toStdString());
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ GxsGroupFrameDialog::GxsGroupFrameDialog(RsGxsIfaceHelper *ifaceImpl, QWidget *p
|
|||||||
mStateHelper->addWidget(TOKEN_TYPE_GROUP_SUMMARY, ui->loadingLabel, UISTATE_LOADING_VISIBLE);
|
mStateHelper->addWidget(TOKEN_TYPE_GROUP_SUMMARY, ui->loadingLabel, UISTATE_LOADING_VISIBLE);
|
||||||
|
|
||||||
connect(ui->groupTreeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT(groupTreeCustomPopupMenu(QPoint)));
|
connect(ui->groupTreeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT(groupTreeCustomPopupMenu(QPoint)));
|
||||||
connect(ui->groupTreeWidget, SIGNAL(treeCurrentItemChanged(QString)), this, SLOT(changedGroup(QString)));
|
connect(ui->groupTreeWidget, SIGNAL(treeCurrentItemChanged(QString)), this, SLOT(changedCurrentGroup(QString)));
|
||||||
connect(ui->groupTreeWidget->treeWidget(), SIGNAL(signalMouseMiddleButtonClicked(QTreeWidgetItem*)), this, SLOT(groupTreeMiddleButtonClicked(QTreeWidgetItem*)));
|
connect(ui->groupTreeWidget->treeWidget(), SIGNAL(signalMouseMiddleButtonClicked(QTreeWidgetItem*)), this, SLOT(groupTreeMiddleButtonClicked(QTreeWidgetItem*)));
|
||||||
connect(ui->groupTreeWidget, SIGNAL(distantSearchRequested(const QString&)), this, SLOT(searchNetwork(const QString&)));
|
connect(ui->groupTreeWidget, SIGNAL(distantSearchRequested(const QString&)), this, SLOT(searchNetwork(const QString&)));
|
||||||
connect(ui->messageTabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(messageTabCloseRequested(int)));
|
connect(ui->messageTabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(messageTabCloseRequested(int)));
|
||||||
@ -630,7 +630,7 @@ bool GxsGroupFrameDialog::navigate(const RsGxsGroupId &groupId, const RsGxsMessa
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
changedGroup(groupIdString);
|
changedCurrentGroup(groupIdString);
|
||||||
|
|
||||||
/* search exisiting tab */
|
/* search exisiting tab */
|
||||||
GxsMessageFrameWidget *msgWidget = messageWidget(mGroupId, false);
|
GxsMessageFrameWidget *msgWidget = messageWidget(mGroupId, false);
|
||||||
@ -691,7 +691,7 @@ GxsCommentDialog *GxsGroupFrameDialog::commentWidget(const RsGxsMessageId& msgId
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxsGroupFrameDialog::changedGroup(const QString &groupId)
|
void GxsGroupFrameDialog::changedCurrentGroup(const QString &groupId)
|
||||||
{
|
{
|
||||||
if (mInFill) {
|
if (mInFill) {
|
||||||
return;
|
return;
|
||||||
|
@ -108,7 +108,7 @@ private slots:
|
|||||||
void restoreGroupKeys();
|
void restoreGroupKeys();
|
||||||
void newGroup();
|
void newGroup();
|
||||||
|
|
||||||
void changedGroup(const QString &groupId);
|
void changedCurrentGroup(const QString &groupId);
|
||||||
void groupTreeMiddleButtonClicked(QTreeWidgetItem *item);
|
void groupTreeMiddleButtonClicked(QTreeWidgetItem *item);
|
||||||
void openInNewTab();
|
void openInNewTab();
|
||||||
void messageTabCloseRequested(int index);
|
void messageTabCloseRequested(int index);
|
||||||
|
Loading…
Reference in New Issue
Block a user