mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added Phenom's patch AddGxsIdDeleting_v0.6_7328.patch
Changed some context menu icons for GxsGroupFrameDialog git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7337 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d2bd938e82
commit
a9dcd24ba7
@ -53,13 +53,13 @@
|
|||||||
#define MSG_CLEANUP_PERIOD 60*5 // 5 minutes
|
#define MSG_CLEANUP_PERIOD 60*5 // 5 minutes
|
||||||
#define INTEGRITY_CHECK_PERIOD 60*30 // 30 minutes
|
#define INTEGRITY_CHECK_PERIOD 60*30 // 30 minutes
|
||||||
|
|
||||||
RsGenExchange::RsGenExchange(RsGeneralDataService *gds, RsNetworkExchangeService *ns,
|
RsGenExchange::RsGenExchange(RsGeneralDataService *gds, RsNetworkExchangeService *ns,
|
||||||
RsSerialType *serviceSerialiser, uint16_t servType, RsGixs* gixs,
|
RsSerialType *serviceSerialiser, uint16_t servType, RsGixs* gixs,
|
||||||
uint32_t authenPolicy, uint32_t messageStorePeriod)
|
uint32_t authenPolicy, uint32_t messageStorePeriod)
|
||||||
: mGenMtx("GenExchange"),
|
: mGenMtx("GenExchange"),
|
||||||
mDataStore(gds),
|
mDataStore(gds),
|
||||||
mNetService(ns),
|
mNetService(ns),
|
||||||
mSerialiser(serviceSerialiser),
|
mSerialiser(serviceSerialiser),
|
||||||
mServType(servType),
|
mServType(servType),
|
||||||
mGixs(gixs),
|
mGixs(gixs),
|
||||||
mAuthenPolicy(authenPolicy),
|
mAuthenPolicy(authenPolicy),
|
||||||
@ -130,12 +130,14 @@ void RsGenExchange::tick()
|
|||||||
publishGrps();
|
publishGrps();
|
||||||
|
|
||||||
publishMsgs();
|
publishMsgs();
|
||||||
|
|
||||||
processGroupUpdatePublish();
|
processGroupUpdatePublish();
|
||||||
|
|
||||||
processRecvdData();
|
processGroupDelete();
|
||||||
|
|
||||||
if(!mNotifications.empty())
|
processRecvdData();
|
||||||
|
|
||||||
|
if(!mNotifications.empty())
|
||||||
{
|
{
|
||||||
notifyChanges(mNotifications);
|
notifyChanges(mNotifications);
|
||||||
mNotifications.clear();
|
mNotifications.clear();
|
||||||
@ -1029,18 +1031,18 @@ bool RsGenExchange::subscribeToGroup(uint32_t& token, const RsGxsGroupId& grpId,
|
|||||||
setGroupSubscribeFlags(token, grpId, GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED,
|
setGroupSubscribeFlags(token, grpId, GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED,
|
||||||
(GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED | GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED));
|
(GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED | GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RsGenExchange::getGroupStatistic(const uint32_t& token, GxsGroupStatistic& stats)
|
bool RsGenExchange::getGroupStatistic(const uint32_t& /*token*/, GxsGroupStatistic& /*stats*/)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RsGenExchange::getServiceStatistic(const uint32_t& token, GxsServiceStatistic& stats)
|
bool RsGenExchange::getServiceStatistic(const uint32_t& /*token*/, GxsServiceStatistic& /*stats*/)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RsGenExchange::updated(bool willCallGrpChanged, bool willCallMsgChanged)
|
bool RsGenExchange::updated(bool willCallGrpChanged, bool willCallMsgChanged)
|
||||||
{
|
{
|
||||||
@ -1457,12 +1459,23 @@ void RsGenExchange::updateGroup(uint32_t& token, RsGxsGrpItem* grpItem)
|
|||||||
#ifdef GEN_EXCH_DEBUG
|
#ifdef GEN_EXCH_DEBUG
|
||||||
std::cerr << "RsGenExchange::updateGroup() token: " << token;
|
std::cerr << "RsGenExchange::updateGroup() token: " << token;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RsGenExchange::deleteGroup(uint32_t& token, RsGxsGrpItem* grpItem)
|
||||||
void RsGenExchange::publishMsg(uint32_t& token, RsGxsMsgItem *msgItem)
|
{
|
||||||
{
|
RsStackMutex stack(mGenMtx);
|
||||||
|
token = mDataAccess->generatePublicToken();
|
||||||
|
mGroupDeletePublish.push_back(GroupDeletePublish(grpItem, token));
|
||||||
|
|
||||||
|
#ifdef GEN_EXCH_DEBUG
|
||||||
|
std::cerr << "RsGenExchange::deleteGroup() token: " << token;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void RsGenExchange::publishMsg(uint32_t& token, RsGxsMsgItem *msgItem)
|
||||||
|
{
|
||||||
RsStackMutex stack(mGenMtx);
|
RsStackMutex stack(mGenMtx);
|
||||||
token = mDataAccess->generatePublicToken();
|
token = mDataAccess->generatePublicToken();
|
||||||
mMsgsToPublish.insert(std::make_pair(token, msgItem));
|
mMsgsToPublish.insert(std::make_pair(token, msgItem));
|
||||||
@ -1944,12 +1957,60 @@ void RsGenExchange::processGroupUpdatePublish()
|
|||||||
delete meta;
|
delete meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
mGroupUpdatePublish.clear();
|
mGroupUpdatePublish.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RsGenExchange::checkKeys(const RsTlvSecurityKeySet& keySet)
|
void RsGenExchange::processGroupDelete()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
RsStackMutex stack(mGenMtx);
|
||||||
|
|
||||||
|
// get keys for group delete publish
|
||||||
|
typedef std::pair<bool, RsGxsGroupId> GrpNote;
|
||||||
|
std::map<uint32_t, GrpNote> toNotify;
|
||||||
|
|
||||||
|
std::vector<GroupDeletePublish>::iterator vit = mGroupDeletePublish.begin();
|
||||||
|
for(; vit != mGroupDeletePublish.end(); vit++)
|
||||||
|
{
|
||||||
|
GroupDeletePublish& gdp = *vit;
|
||||||
|
uint32_t token = gdp.mToken;
|
||||||
|
const RsGxsGroupId& groupId = gdp.grpItem->meta.mGroupId;
|
||||||
|
std::vector<RsGxsGroupId> gprIds;
|
||||||
|
gprIds.push_back(groupId);
|
||||||
|
mDataStore->removeGroups(gprIds);
|
||||||
|
toNotify.insert(std::make_pair(
|
||||||
|
token, GrpNote(true, RsGxsGroupId())));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::list<RsGxsGroupId> grpDeleted;
|
||||||
|
std::map<uint32_t, GrpNote>::iterator mit = toNotify.begin();
|
||||||
|
for(; mit != toNotify.end(); mit++)
|
||||||
|
{
|
||||||
|
GrpNote& note = mit->second;
|
||||||
|
uint8_t status = note.first ? RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE
|
||||||
|
: RsTokenService::GXS_REQUEST_V2_STATUS_FAILED;
|
||||||
|
|
||||||
|
mGrpNotify.insert(std::make_pair(mit->first, note.second));
|
||||||
|
mDataAccess->updatePublicRequestStatus(mit->first, status);
|
||||||
|
|
||||||
|
if(note.first)
|
||||||
|
grpDeleted.push_back(note.second);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!grpDeleted.empty())
|
||||||
|
{
|
||||||
|
RsGxsGroupChange* gc = new RsGxsGroupChange(RsGxsNotify::TYPE_PUBLISH);
|
||||||
|
gc->mGrpIdList = grpDeleted;
|
||||||
|
mNotifications.push_back(gc);
|
||||||
|
}
|
||||||
|
|
||||||
|
mGroupDeletePublish.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool RsGenExchange::checkKeys(const RsTlvSecurityKeySet& keySet)
|
||||||
|
{
|
||||||
|
|
||||||
typedef std::map<std::string, RsTlvSecurityKey> keyMap;
|
typedef std::map<std::string, RsTlvSecurityKey> keyMap;
|
||||||
const keyMap& allKeys = keySet.keys;
|
const keyMap& allKeys = keySet.keys;
|
||||||
keyMap::const_iterator cit = allKeys.begin();
|
keyMap::const_iterator cit = allKeys.begin();
|
||||||
|
@ -526,22 +526,30 @@ protected:
|
|||||||
* Ownership of item passes to this rsgenexchange \n
|
* Ownership of item passes to this rsgenexchange \n
|
||||||
* @param token
|
* @param token
|
||||||
* @param grpItem
|
* @param grpItem
|
||||||
*/
|
*/
|
||||||
void publishGroup(uint32_t& token, RsGxsGrpItem* grpItem);
|
void publishGroup(uint32_t& token, RsGxsGrpItem* grpItem);
|
||||||
|
|
||||||
|
/*!
|
||||||
/*!
|
* Updates an existing group item \n
|
||||||
* Updates an existing group item \n
|
* This will induce a related change message \n
|
||||||
* This will induce a related change message \n
|
|
||||||
* Ownership of item passes to this rsgenexchange \n
|
* Ownership of item passes to this rsgenexchange \n
|
||||||
* @param token
|
* @param token
|
||||||
* @param grpItem
|
* @param grpItem
|
||||||
*/
|
*/
|
||||||
void updateGroup(uint32_t& token, RsGxsGrpItem* grpItem);
|
void updateGroup(uint32_t& token, RsGxsGrpItem* grpItem);
|
||||||
|
|
||||||
public:
|
/*!
|
||||||
/*!
|
* Deletes an existing group item \n
|
||||||
* Enables publication of a message item \n
|
* This will induce a related change message \n
|
||||||
|
* Ownership of item passes to this rsgenexchange \n
|
||||||
|
* @param token
|
||||||
|
* @param grpItem
|
||||||
|
*/
|
||||||
|
void deleteGroup(uint32_t& token, RsGxsGrpItem* grpItem);
|
||||||
|
|
||||||
|
public:
|
||||||
|
/*!
|
||||||
|
* Enables publication of a message item \n
|
||||||
* Setting mOrigMsgId meta member to blank \n
|
* Setting mOrigMsgId meta member to blank \n
|
||||||
* leads to this msg being an original msg \n
|
* leads to this msg being an original msg \n
|
||||||
* if mOrigMsgId is not blank the msgId then this msg is \n
|
* if mOrigMsgId is not blank the msgId then this msg is \n
|
||||||
@ -651,12 +659,14 @@ private:
|
|||||||
void processRecvdGroups();
|
void processRecvdGroups();
|
||||||
|
|
||||||
void publishGrps();
|
void publishGrps();
|
||||||
|
|
||||||
void processGroupUpdatePublish();
|
void processGroupUpdatePublish();
|
||||||
|
|
||||||
void publishMsgs();
|
void processGroupDelete();
|
||||||
|
|
||||||
/*!
|
void publishMsgs();
|
||||||
|
|
||||||
|
/*!
|
||||||
* processes msg local meta changes
|
* processes msg local meta changes
|
||||||
*/
|
*/
|
||||||
void processMsgMetaChanges();
|
void processMsgMetaChanges();
|
||||||
@ -864,9 +874,11 @@ private:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
std::vector<GroupUpdate> mGroupUpdates, mPeersGroupUpdate;
|
std::vector<GroupUpdate> mGroupUpdates, mPeersGroupUpdate;
|
||||||
|
|
||||||
std::vector<GroupUpdatePublish> mGroupUpdatePublish;
|
std::vector<GroupUpdatePublish> mGroupUpdatePublish;
|
||||||
|
|
||||||
};
|
std::vector<GroupDeletePublish> mGroupDeletePublish;
|
||||||
|
|
||||||
#endif // RSGENEXCHANGE_H
|
};
|
||||||
|
|
||||||
|
#endif // RSGENEXCHANGE_H
|
||||||
|
@ -148,4 +148,13 @@ public:
|
|||||||
uint32_t mToken;
|
uint32_t mToken;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class GroupDeletePublish
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GroupDeletePublish(RsGxsGrpItem* item, uint32_t token)
|
||||||
|
: grpItem(item), mToken(token) {}
|
||||||
|
RsGxsGrpItem* grpItem;
|
||||||
|
uint32_t mToken;
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* GXSUTIL_H_ */
|
#endif /* GXSUTIL_H_ */
|
||||||
|
@ -217,6 +217,7 @@ virtual bool submitOpinion(uint32_t& token, const RsGxsId &id,
|
|||||||
virtual bool createIdentity(uint32_t& token, RsIdentityParameters ¶ms) = 0;
|
virtual bool createIdentity(uint32_t& token, RsIdentityParameters ¶ms) = 0;
|
||||||
|
|
||||||
virtual bool updateIdentity(uint32_t& token, RsGxsIdGroup &group) = 0;
|
virtual bool updateIdentity(uint32_t& token, RsGxsIdGroup &group) = 0;
|
||||||
|
virtual bool deleteIdentity(uint32_t& token, RsGxsIdGroup &group) = 0;
|
||||||
|
|
||||||
virtual bool parseRecognTag(const RsGxsId &id, const std::string &nickname,
|
virtual bool parseRecognTag(const RsGxsId &id, const std::string &nickname,
|
||||||
const std::string &tag, RsRecognTagDetails &details) = 0;
|
const std::string &tag, RsRecognTagDetails &details) = 0;
|
||||||
|
@ -352,8 +352,20 @@ bool p3IdService::updateIdentity(uint32_t& token, RsGxsIdGroup &group)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool p3IdService::deleteIdentity(uint32_t& token, RsGxsIdGroup &group)
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << "p3IdService::deleteIdentity()";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool p3IdService::parseRecognTag(const RsGxsId &id, const std::string &nickname,
|
deleteGroup(token, group);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool p3IdService::parseRecognTag(const RsGxsId &id, const std::string &nickname,
|
||||||
const std::string &tag, RsRecognTagDetails &details)
|
const std::string &tag, RsRecognTagDetails &details)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_RECOGN
|
#ifdef DEBUG_RECOGN
|
||||||
@ -823,6 +835,74 @@ bool p3IdService::updateGroup(uint32_t& token, RsGxsIdGroup &group)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool p3IdService::deleteGroup(uint32_t& token, RsGxsIdGroup &group)
|
||||||
|
{
|
||||||
|
RsGxsId id = RsGxsId(group.mMeta.mGroupId.toStdString());
|
||||||
|
RsGxsIdGroupItem* item = new RsGxsIdGroupItem();
|
||||||
|
item->group = group;
|
||||||
|
item->meta = group.mMeta;
|
||||||
|
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << "p3IdService::deleteGroup() Deleting RsGxsId: " << id;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
RsGenExchange::deleteGroup(token, item);
|
||||||
|
|
||||||
|
// if its in the cache - clear it.
|
||||||
|
{
|
||||||
|
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
||||||
|
if (mPublicKeyCache.erase(id))
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << "p3IdService::deleteGroup() Removed from PublicKeyCache";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << "p3IdService::deleteGroup() Not in PublicKeyCache";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mPrivateKeyCache.erase(id))
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << "p3IdService::deleteGroup() Removed from PrivateKeyCache";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << "p3IdService::deleteGroup() Not in PrivateKeyCache";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
std::list<RsGxsId>::iterator lit = std::find( mOwnIds.begin(), mOwnIds.end(), id);
|
||||||
|
if (lit != mOwnIds.end())
|
||||||
|
{
|
||||||
|
mOwnIds.remove((RsGxsId)*lit);
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << "p3IdService::deleteGroup() Removed from OwnIds";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_IDS
|
||||||
|
std::cerr << "p3IdService::deleteGroup() Not in OwnIds";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
|
@ -242,6 +242,7 @@ virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsIdGroup> &grou
|
|||||||
// These are local - and not exposed via RsIdentity.
|
// These are local - and not exposed via RsIdentity.
|
||||||
virtual bool createGroup(uint32_t& token, RsGxsIdGroup &group);
|
virtual bool createGroup(uint32_t& token, RsGxsIdGroup &group);
|
||||||
virtual bool updateGroup(uint32_t& token, RsGxsIdGroup &group);
|
virtual bool updateGroup(uint32_t& token, RsGxsIdGroup &group);
|
||||||
|
virtual bool deleteGroup(uint32_t& token, RsGxsIdGroup &group);
|
||||||
//virtual bool createMsg(uint32_t& token, RsGxsIdOpinion &opinion);
|
//virtual bool createMsg(uint32_t& token, RsGxsIdOpinion &opinion);
|
||||||
|
|
||||||
/**************** RsIdentity External Interface.
|
/**************** RsIdentity External Interface.
|
||||||
@ -266,6 +267,7 @@ virtual bool submitOpinion(uint32_t& token, const RsGxsId &id,
|
|||||||
virtual bool createIdentity(uint32_t& token, RsIdentityParameters ¶ms);
|
virtual bool createIdentity(uint32_t& token, RsIdentityParameters ¶ms);
|
||||||
|
|
||||||
virtual bool updateIdentity(uint32_t& token, RsGxsIdGroup &group);
|
virtual bool updateIdentity(uint32_t& token, RsGxsIdGroup &group);
|
||||||
|
virtual bool deleteIdentity(uint32_t& token, RsGxsIdGroup &group);
|
||||||
|
|
||||||
virtual bool parseRecognTag(const RsGxsId &id, const std::string &nickname,
|
virtual bool parseRecognTag(const RsGxsId &id, const std::string &nickname,
|
||||||
const std::string &tag, RsRecognTagDetails &details);
|
const std::string &tag, RsRecognTagDetails &details);
|
||||||
|
@ -127,7 +127,9 @@ IdDialog::IdDialog(QWidget *parent)
|
|||||||
/* Connect signals */
|
/* Connect signals */
|
||||||
connect(ui.toolButton_NewId, SIGNAL(clicked()), this, SLOT(addIdentity()));
|
connect(ui.toolButton_NewId, SIGNAL(clicked()), this, SLOT(addIdentity()));
|
||||||
connect(ui.todoPushButton, SIGNAL(clicked()), this, SLOT(todo()));
|
connect(ui.todoPushButton, SIGNAL(clicked()), this, SLOT(todo()));
|
||||||
|
connect(ui.toolButton_Delete, SIGNAL(clicked()), this, SLOT(removeIdentity()));
|
||||||
connect(ui.toolButton_EditId, SIGNAL(clicked()), this, SLOT(editIdentity()));
|
connect(ui.toolButton_EditId, SIGNAL(clicked()), this, SLOT(editIdentity()));
|
||||||
|
connect(ui.removeIdentity, SIGNAL(triggered()), this, SLOT(removeIdentity()));
|
||||||
connect(ui.editIdentity, SIGNAL(triggered()), this, SLOT(editIdentity()));
|
connect(ui.editIdentity, SIGNAL(triggered()), this, SLOT(editIdentity()));
|
||||||
|
|
||||||
connect(ui.treeWidget_IdList, SIGNAL(itemSelectionChanged()), this, SLOT(updateSelection()));
|
connect(ui.treeWidget_IdList, SIGNAL(itemSelectionChanged()), this, SLOT(updateSelection()));
|
||||||
@ -171,7 +173,7 @@ void IdDialog::todo()
|
|||||||
{
|
{
|
||||||
QMessageBox::information(this, "Todo",
|
QMessageBox::information(this, "Todo",
|
||||||
"<b>Open points:</b><ul>"
|
"<b>Open points:</b><ul>"
|
||||||
"<li>Delete ID"
|
// "<li>Delete ID"
|
||||||
"<li>Reputation"
|
"<li>Reputation"
|
||||||
"<li>Load/save settings"
|
"<li>Load/save settings"
|
||||||
"</ul>");
|
"</ul>");
|
||||||
@ -494,10 +496,10 @@ void IdDialog::insertIdDetails(uint32_t token)
|
|||||||
if (isOwnId)
|
if (isOwnId)
|
||||||
{
|
{
|
||||||
mStateHelper->setWidgetEnabled(ui.toolButton_Reputation, false);
|
mStateHelper->setWidgetEnabled(ui.toolButton_Reputation, false);
|
||||||
// No Delete Ids yet!
|
mStateHelper->setWidgetEnabled(ui.toolButton_Delete, true);
|
||||||
mStateHelper->setWidgetEnabled(ui.toolButton_Delete, /*true*/ false);
|
|
||||||
mStateHelper->setWidgetEnabled(ui.toolButton_EditId, true);
|
mStateHelper->setWidgetEnabled(ui.toolButton_EditId, true);
|
||||||
ui.editIdentity->setEnabled(true);
|
ui.editIdentity->setEnabled(true);
|
||||||
|
ui.removeIdentity->setEnabled(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -506,6 +508,7 @@ void IdDialog::insertIdDetails(uint32_t token)
|
|||||||
mStateHelper->setWidgetEnabled(ui.toolButton_Delete, false);
|
mStateHelper->setWidgetEnabled(ui.toolButton_Delete, false);
|
||||||
mStateHelper->setWidgetEnabled(ui.toolButton_EditId, false);
|
mStateHelper->setWidgetEnabled(ui.toolButton_EditId, false);
|
||||||
ui.editIdentity->setEnabled(false);
|
ui.editIdentity->setEnabled(false);
|
||||||
|
ui.removeIdentity->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now fill in the reputation information */
|
/* now fill in the reputation information */
|
||||||
@ -618,6 +621,25 @@ void IdDialog::addIdentity()
|
|||||||
dlg.exec();
|
dlg.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IdDialog::removeIdentity()
|
||||||
|
{
|
||||||
|
QTreeWidgetItem *item = ui.treeWidget_IdList->currentItem();
|
||||||
|
if (!item)
|
||||||
|
{
|
||||||
|
std::cerr << "IdDialog::editIdentity() Invalid item";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string keyId = item->text(RSID_COL_KEYID).toStdString();
|
||||||
|
|
||||||
|
uint32_t dummyToken = 0;
|
||||||
|
RsGxsIdGroup group;
|
||||||
|
group.mMeta.mGroupId=RsGxsGroupId(keyId);
|
||||||
|
rsIdentity->deleteIdentity(dummyToken, group);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void IdDialog::editIdentity()
|
void IdDialog::editIdentity()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem *item = ui.treeWidget_IdList->currentItem();
|
QTreeWidgetItem *item = ui.treeWidget_IdList->currentItem();
|
||||||
@ -661,6 +683,7 @@ void IdDialog::requestRepList(const RsGxsGroupId &aboutId)
|
|||||||
|
|
||||||
void IdDialog::insertRepList(uint32_t token)
|
void IdDialog::insertRepList(uint32_t token)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(token)
|
||||||
mStateHelper->setLoading(IDDIALOG_REPLIST, false);
|
mStateHelper->setLoading(IDDIALOG_REPLIST, false);
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
@ -738,6 +761,7 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
|
|||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
|
|
||||||
contextMnu.addAction(ui.editIdentity);
|
contextMnu.addAction(ui.editIdentity);
|
||||||
|
contextMnu.addAction(ui.removeIdentity);
|
||||||
|
|
||||||
contextMnu.exec(QCursor::pos());
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,7 @@ private slots:
|
|||||||
void filterChanged(const QString &text);
|
void filterChanged(const QString &text);
|
||||||
|
|
||||||
void addIdentity();
|
void addIdentity();
|
||||||
|
void removeIdentity();
|
||||||
void editIdentity();
|
void editIdentity();
|
||||||
|
|
||||||
void updateSelection();
|
void updateSelection();
|
||||||
|
@ -682,6 +682,15 @@
|
|||||||
<string>Edit Identity</string>
|
<string>Edit Identity</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="removeIdentity">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/delete.png</normaloff>:/images/delete.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete Identity</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
@ -152,7 +152,7 @@
|
|||||||
#define IMAGE_MINIMIZE ":/images/window_nofullscreen.png"
|
#define IMAGE_MINIMIZE ":/images/window_nofullscreen.png"
|
||||||
#define IMAGE_MAXIMIZE ":/images/window_fullscreen.png"
|
#define IMAGE_MAXIMIZE ":/images/window_fullscreen.png"
|
||||||
#define IMG_HELP ":/images/help24.png"
|
#define IMG_HELP ":/images/help24.png"
|
||||||
#define IMAGE_NEWSFEED ":/images/newsfeed128.png"
|
#define IMAGE_NEWSFEED ":/images/newsfeed/news-feed-32.png"
|
||||||
#define IMAGE_PLUGINS ":/images/extension_32.png"
|
#define IMAGE_PLUGINS ":/images/extension_32.png"
|
||||||
#define IMAGE_NOONLINE ":/images/logo/logo_24_0.png"
|
#define IMAGE_NOONLINE ":/images/logo/logo_24_0.png"
|
||||||
#define IMAGE_ONEONLINE ":/images/logo/logo_24_1.png"
|
#define IMAGE_ONEONLINE ":/images/logo/logo_24_1.png"
|
||||||
|
@ -42,6 +42,8 @@
|
|||||||
#define IMAGE_INFO ":/images/info16.png"
|
#define IMAGE_INFO ":/images/info16.png"
|
||||||
//#define IMAGE_GROUPAUTHD ":/images/konv_message2.png"
|
//#define IMAGE_GROUPAUTHD ":/images/konv_message2.png"
|
||||||
#define IMAGE_COPYLINK ":/images/copyrslink.png"
|
#define IMAGE_COPYLINK ":/images/copyrslink.png"
|
||||||
|
#define IMAGE_EDIT ":/images/edit_16.png"
|
||||||
|
#define IMAGE_SHARE ":/images/share-icon-16.png"
|
||||||
|
|
||||||
#define TOKEN_TYPE_LISTING 1
|
#define TOKEN_TYPE_LISTING 1
|
||||||
#define TOKEN_TYPE_SUBSCRIBE_CHANGE 2
|
#define TOKEN_TYPE_SUBSCRIBE_CHANGE 2
|
||||||
@ -230,10 +232,10 @@ void GxsGroupFrameDialog::groupTreeCustomPopupMenu(QPoint /*point*/)
|
|||||||
action = contextMnu.addAction(QIcon(IMAGE_INFO), tr("Show Details"), this, SLOT(showGroupDetails()));
|
action = contextMnu.addAction(QIcon(IMAGE_INFO), tr("Show Details"), this, SLOT(showGroupDetails()));
|
||||||
action->setEnabled (!mGroupId.isNull());
|
action->setEnabled (!mGroupId.isNull());
|
||||||
|
|
||||||
action = contextMnu.addAction(QIcon(":/images/settings16.png"), tr("Edit Details"), this, SLOT(editGroupDetails()));
|
action = contextMnu.addAction(QIcon(IMAGE_EDIT), tr("Edit Details"), this, SLOT(editGroupDetails()));
|
||||||
action->setEnabled (!mGroupId.isNull() && isAdmin);
|
action->setEnabled (!mGroupId.isNull() && isAdmin);
|
||||||
|
|
||||||
action = contextMnu.addAction(QIcon(":/images/gpgp_key_generate.png"), tr("Share"), this, SLOT(shareKey()));
|
action = contextMnu.addAction(QIcon(IMAGE_SHARE), tr("Share"), this, SLOT(shareKey()));
|
||||||
action->setEnabled(!mGroupId.isNull() && isAdmin);
|
action->setEnabled(!mGroupId.isNull() && isAdmin);
|
||||||
|
|
||||||
if (!mGroupId.isNull() && isPublisher && !isAdmin) {
|
if (!mGroupId.isNull() && isPublisher && !isAdmin) {
|
||||||
|
@ -674,7 +674,10 @@
|
|||||||
<file>images/tags/dev-patcher.png</file>
|
<file>images/tags/dev-patcher.png</file>
|
||||||
<file>images/tags/developer.png</file>
|
<file>images/tags/developer.png</file>
|
||||||
<file>images/circles/circles_32.png</file>
|
<file>images/circles/circles_32.png</file>
|
||||||
<file>images/circles/circles_64.png</file>
|
<file>images/circles/circles_64.png</file>
|
||||||
|
<file>images/newsfeed/news-feed-32.png</file>
|
||||||
|
<file>images/newsfeed/news-feed-notify-32.png</file>
|
||||||
|
<file>images/share-icon-16.png</file>
|
||||||
<file>help/version.html</file>
|
<file>help/version.html</file>
|
||||||
<file>images/view-certificate-sign-48.png</file>
|
<file>images/view-certificate-sign-48.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
BIN
retroshare-gui/src/gui/images/newsfeed/news-feed-32.png
Normal file
BIN
retroshare-gui/src/gui/images/newsfeed/news-feed-32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
retroshare-gui/src/gui/images/newsfeed/news-feed-notify-32.png
Normal file
BIN
retroshare-gui/src/gui/images/newsfeed/news-feed-notify-32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
retroshare-gui/src/gui/images/share-icon-16.png
Normal file
BIN
retroshare-gui/src/gui/images/share-icon-16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 691 B |
BIN
retroshare-gui/src/gui/images/share-icon-24.png
Normal file
BIN
retroshare-gui/src/gui/images/share-icon-24.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
retroshare-gui/src/gui/images/share-icon-32.png
Normal file
BIN
retroshare-gui/src/gui/images/share-icon-32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Loading…
Reference in New Issue
Block a user