mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 10:54:22 -05:00
added restore admin/publ keys to channels (todo: forums, blogs)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2958 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e48ede4841
commit
ee1477df10
@ -150,6 +150,9 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
|||||||
channeldetailsAct = new QAction(QIcon(":/images/info16.png"), tr( "Show Channel Details" ), this );
|
channeldetailsAct = new QAction(QIcon(":/images/info16.png"), tr( "Show Channel Details" ), this );
|
||||||
connect( channeldetailsAct , SIGNAL( triggered() ), this, SLOT( showChannelDetails() ) );
|
connect( channeldetailsAct , SIGNAL( triggered() ), this, SLOT( showChannelDetails() ) );
|
||||||
|
|
||||||
|
restoreKeysAct = new QAction(QIcon(":/images/settings16.png"), tr("Restore Publish Rights for Channel" ), this );
|
||||||
|
connect( restoreKeysAct , SIGNAL( triggered() ), this, SLOT( restoreChannelKeys() ) );
|
||||||
|
|
||||||
if (ci.channelFlags & RS_DISTRIB_PUBLISH)
|
if (ci.channelFlags & RS_DISTRIB_PUBLISH)
|
||||||
{
|
{
|
||||||
contextMnu.addAction( postchannelAct );
|
contextMnu.addAction( postchannelAct );
|
||||||
@ -158,15 +161,19 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
|||||||
}
|
}
|
||||||
else if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED)
|
else if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED)
|
||||||
{
|
{
|
||||||
|
|
||||||
contextMnu.addAction( unsubscribechannelAct );
|
contextMnu.addAction( unsubscribechannelAct );
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction( channeldetailsAct );;
|
contextMnu.addAction( channeldetailsAct );
|
||||||
|
contextMnu.addAction( restoreKeysAct );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
contextMnu.addAction( subscribechannelAct );
|
contextMnu.addAction( subscribechannelAct );
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction( channeldetailsAct );
|
contextMnu.addAction( channeldetailsAct );
|
||||||
|
contextMnu.addAction( restoreKeysAct );
|
||||||
}
|
}
|
||||||
|
|
||||||
contextMnu.exec(QCursor::pos());
|
contextMnu.exec(QCursor::pos());
|
||||||
@ -247,6 +254,11 @@ void ChannelFeed::selectChannel( std::string cId)
|
|||||||
updateChannelMsgs();
|
updateChannelMsgs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChannelFeed::restoreChannelKeys(){
|
||||||
|
|
||||||
|
rsChannels->channelRestoreKeys(mChannelId);
|
||||||
|
}
|
||||||
|
|
||||||
void ChannelFeed::selectChannel(const QModelIndex &index)
|
void ChannelFeed::selectChannel(const QModelIndex &index)
|
||||||
{
|
{
|
||||||
int row = index.row();
|
int row = index.row();
|
||||||
|
@ -72,6 +72,7 @@ private slots:
|
|||||||
void createMsg();
|
void createMsg();
|
||||||
|
|
||||||
void showChannelDetails();
|
void showChannelDetails();
|
||||||
|
void restoreChannelKeys();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -99,6 +100,7 @@ private:
|
|||||||
QAction* subscribechannelAct;
|
QAction* subscribechannelAct;
|
||||||
QAction* unsubscribechannelAct;
|
QAction* unsubscribechannelAct;
|
||||||
QAction* channeldetailsAct;
|
QAction* channeldetailsAct;
|
||||||
|
QAction* restoreKeysAct;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user