mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added sharekey feature to channel dialog
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3166 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ddb1094f68
commit
43e756148a
@ -33,6 +33,7 @@
|
||||
#include "gui/channels/ChannelDetails.h"
|
||||
#include "gui/channels/CreateChannelMsg.h"
|
||||
#include "gui/channels/EditChanDetails.h"
|
||||
#include "gui/channels/ShareKey.h"
|
||||
|
||||
#include "gui/ChanGroupDelegate.h"
|
||||
|
||||
@ -155,17 +156,22 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
||||
editChannelDetailAct = new QAction(QIcon(":/images/settings16.png"), tr("Edit Channel Details"), this);
|
||||
connect( editChannelDetailAct, SIGNAL( triggered() ), this, SLOT( editChannelDetail() ) );
|
||||
|
||||
if(ci.channelFlags & (RS_DISTRIB_PUBLISH | RS_DISTRIB_ADMIN)){
|
||||
shareKeyAct = new QAction(QIcon(":/images/gpgp_key_generate.png"), tr("Share Key"), this);
|
||||
connect( shareKeyAct, SIGNAL( triggered() ), this, SLOT( shareKey() ) );
|
||||
|
||||
if((ci.channelFlags & RS_DISTRIB_PUBLISH) && (ci.channelFlags & RS_DISTRIB_ADMIN)){
|
||||
contextMnu.addAction( postchannelAct );
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction( channeldetailsAct );
|
||||
contextMnu.addAction( editChannelDetailAct);
|
||||
contextMnu.addAction( shareKeyAct );
|
||||
}
|
||||
else if (ci.channelFlags & RS_DISTRIB_PUBLISH)
|
||||
{
|
||||
contextMnu.addAction( postchannelAct );
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction( channeldetailsAct );
|
||||
contextMnu.addAction( shareKeyAct );
|
||||
}
|
||||
else if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED)
|
||||
{
|
||||
@ -233,6 +239,14 @@ void ChannelFeed::editChannelDetail(){
|
||||
return;
|
||||
}
|
||||
|
||||
void ChannelFeed::shareKey()
|
||||
{
|
||||
ShareKey shareUi(this, 0, mChannelId);
|
||||
shareUi.exec();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ChannelFeed::createMsg()
|
||||
{
|
||||
if (mChannelId == "")
|
||||
|
@ -73,6 +73,7 @@ private slots:
|
||||
void showChannelDetails();
|
||||
void restoreChannelKeys();
|
||||
void editChannelDetail();
|
||||
void shareKey();
|
||||
|
||||
private:
|
||||
|
||||
@ -102,6 +103,7 @@ private:
|
||||
QAction* channeldetailsAct;
|
||||
QAction* restoreKeysAct;
|
||||
QAction* editChannelDetailAct;
|
||||
QAction* shareKeyAct;
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user