From e576c56e27a644fbc01a5ec01bb1c26960518fc5 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Fri, 31 Dec 2010 22:32:08 +0000 Subject: [PATCH] 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 --- retroshare-gui/src/gui/ForumsDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/ForumsDialog.cpp b/retroshare-gui/src/gui/ForumsDialog.cpp index d18c88228..a669e059f 100644 --- a/retroshare-gui/src/gui/ForumsDialog.cpp +++ b/retroshare-gui/src/gui/ForumsDialog.cpp @@ -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();