made Options tab in Profiles Details window be disabled when the profile is not a friend

This commit is contained in:
csoler 2021-09-19 20:05:19 +02:00
parent a2a55b06ce
commit 2bd3fbf977
2 changed files with 5 additions and 1 deletions

View File

@ -45,6 +45,8 @@
#include "util/DateTime.h"
#include "util/misc.h"
#define FRIEND_OPTIONS_TAB_INDEX 2
QMap<RsPgpId, PGPKeyDialog*> PGPKeyDialog::instances_pgp;
PGPKeyDialog *PGPKeyDialog::instance(const RsPgpId& pgp_id)
@ -199,11 +201,13 @@ void PGPKeyDialog::load()
{
ui.make_friend_button->hide();
ui.denyFriendButton->show();
ui.stabWidget->setTabEnabled(FRIEND_OPTIONS_TAB_INDEX,true);
}
else
{
ui.make_friend_button->show();
ui.denyFriendButton->hide();
ui.stabWidget->setTabEnabled(FRIEND_OPTIONS_TAB_INDEX,false);
}
//web of trust

View File

@ -393,7 +393,7 @@ p, li { white-space: pre-wrap; }
</widget>
<widget class="QWidget" name="option_Tab">
<attribute name="title">
<string>Options</string>
<string>Friend options</string>
</attribute>
<layout class="QVBoxLayout" name="option_Tab_VL">
<item>