Disabled the context menu actions "Subscribe to Forum" and "Unsubscribe to Forum" in forums tree, when no forum is selected.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3947 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-12-31 22:32:08 +00:00
parent ad67844c7a
commit e576c56e27

View File

@ -258,10 +258,10 @@ void ForumsDialog::forumListCustomPopupMenu( QPoint point )
QMenu contextMnu( this );
QAction *action = contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Subscribe to Forum"), this, SLOT(subscribeToForum()));
action->setDisabled (m_bIsForumSubscribed);
action->setDisabled (mCurrForumId.empty() || m_bIsForumSubscribed);
action = contextMnu.addAction(QIcon(IMAGE_UNSUBSCRIBE), tr("Unsubscribe to Forum"), this, SLOT(unsubscribeToForum()));
action->setEnabled (m_bIsForumSubscribed);
action->setEnabled (!mCurrForumId.empty() && m_bIsForumSubscribed);
contextMnu.addSeparator();