From ee1477df10b742178809988e9659f82c044e47b3 Mon Sep 17 00:00:00 2001 From: chrisparker126 Date: Wed, 19 May 2010 22:43:07 +0000 Subject: [PATCH] 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 --- retroshare-gui/src/gui/ChannelFeed.cpp | 14 +++++++++++++- retroshare-gui/src/gui/ChannelFeed.h | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/ChannelFeed.cpp b/retroshare-gui/src/gui/ChannelFeed.cpp index cad9d2ac3..a43697f4c 100644 --- a/retroshare-gui/src/gui/ChannelFeed.cpp +++ b/retroshare-gui/src/gui/ChannelFeed.cpp @@ -150,6 +150,9 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point ) channeldetailsAct = new QAction(QIcon(":/images/info16.png"), tr( "Show Channel Details" ), this ); 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) { contextMnu.addAction( postchannelAct ); @@ -158,15 +161,19 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point ) } else if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED) { + contextMnu.addAction( unsubscribechannelAct ); contextMnu.addSeparator(); - contextMnu.addAction( channeldetailsAct );; + contextMnu.addAction( channeldetailsAct ); + contextMnu.addAction( restoreKeysAct ); } else { + contextMnu.addAction( subscribechannelAct ); contextMnu.addSeparator(); contextMnu.addAction( channeldetailsAct ); + contextMnu.addAction( restoreKeysAct ); } contextMnu.exec(QCursor::pos()); @@ -247,6 +254,11 @@ void ChannelFeed::selectChannel( std::string cId) updateChannelMsgs(); } +void ChannelFeed::restoreChannelKeys(){ + + rsChannels->channelRestoreKeys(mChannelId); +} + void ChannelFeed::selectChannel(const QModelIndex &index) { int row = index.row(); diff --git a/retroshare-gui/src/gui/ChannelFeed.h b/retroshare-gui/src/gui/ChannelFeed.h index 19d1dab97..9c6779978 100644 --- a/retroshare-gui/src/gui/ChannelFeed.h +++ b/retroshare-gui/src/gui/ChannelFeed.h @@ -72,6 +72,7 @@ private slots: void createMsg(); void showChannelDetails(); + void restoreChannelKeys(); private: @@ -99,6 +100,7 @@ private: QAction* subscribechannelAct; QAction* unsubscribechannelAct; QAction* channeldetailsAct; + QAction* restoreKeysAct; };