From ef56b199b86c0750bbe337feaa9e2190bb4fa78b Mon Sep 17 00:00:00 2001 From: chrisparker126 Date: Fri, 4 Jun 2010 22:52:01 +0000 Subject: [PATCH] added edit channel info git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3061 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/ChannelFeed.cpp | 20 +++++++++++++++++++- retroshare-gui/src/gui/ChannelFeed.h | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/ChannelFeed.cpp b/retroshare-gui/src/gui/ChannelFeed.cpp index f98842edf..e6f2f5b8f 100644 --- a/retroshare-gui/src/gui/ChannelFeed.cpp +++ b/retroshare-gui/src/gui/ChannelFeed.cpp @@ -32,6 +32,7 @@ #include "gui/channels/CreateChannel.h" #include "gui/channels/ChannelDetails.h" #include "gui/channels/CreateChannelMsg.h" +#include "gui/channels/EditChanDetails.h" #include "gui/ChanGroupDelegate.h" @@ -151,7 +152,16 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point ) 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) + 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)){ + contextMnu.addAction( postchannelAct ); + contextMnu.addSeparator(); + contextMnu.addAction( channeldetailsAct ); + contextMnu.addAction( editChannelDetailAct); + } + else if (ci.channelFlags & RS_DISTRIB_PUBLISH) { contextMnu.addAction( postchannelAct ); contextMnu.addSeparator(); @@ -215,6 +225,14 @@ void ChannelFeed::openChat(std::string peerId) return; } +void ChannelFeed::editChannelDetail(){ + + EditChanDetails editUi(this, 0, mChannelId); + editUi.exec(); + + return; +} + void ChannelFeed::createMsg() { if (mChannelId == "") diff --git a/retroshare-gui/src/gui/ChannelFeed.h b/retroshare-gui/src/gui/ChannelFeed.h index 1a9da4f2f..255ccd29a 100644 --- a/retroshare-gui/src/gui/ChannelFeed.h +++ b/retroshare-gui/src/gui/ChannelFeed.h @@ -72,6 +72,7 @@ private slots: void showChannelDetails(); void restoreChannelKeys(); + void editChannelDetail(); private: @@ -100,6 +101,7 @@ private: QAction* unsubscribechannelAct; QAction* channeldetailsAct; QAction* restoreKeysAct; + QAction* editChannelDetailAct; };