mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added selection box to show only friends (already translated) in message composer
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6708 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
cd7e2df37e
commit
dd6fbe44ab
@ -56,6 +56,7 @@ public:
|
||||
};
|
||||
|
||||
enum ShowType {
|
||||
SHOW_NONE = 0,
|
||||
SHOW_GROUP = 1,
|
||||
SHOW_GPG = 2,
|
||||
SHOW_SSL = 4,
|
||||
|
@ -193,6 +193,10 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WFlags flags)
|
||||
|
||||
connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged()));
|
||||
|
||||
connect(ui.onlyTrustedKeys, SIGNAL(clicked(bool)), this, SLOT(toggleShowNonFriend(bool)));
|
||||
ui.onlyTrustedKeys->setMinimumWidth(20);
|
||||
ui.onlyTrustedKeys->setChecked(Settings->valueFromGroup("MessageComposer", "ShowOnlyTrustedKeys",false).toBool());
|
||||
|
||||
connect(ui.addToButton, SIGNAL(clicked(void)), this, SLOT(addTo()));
|
||||
connect(ui.addCcButton, SIGNAL(clicked(void)), this, SLOT(addCc()));
|
||||
connect(ui.addBccButton, SIGNAL(clicked(void)), this, SLOT(addBcc()));
|
||||
@ -209,7 +213,9 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WFlags flags)
|
||||
/* initialize friends list */
|
||||
ui.friendSelectionWidget->setHeaderText(tr("Send To:"));
|
||||
ui.friendSelectionWidget->setModus(FriendSelectionWidget::MODUS_MULTI);
|
||||
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP | FriendSelectionWidget::SHOW_SSL | FriendSelectionWidget::SHOW_NON_FRIEND_GPG );
|
||||
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP
|
||||
| FriendSelectionWidget::SHOW_SSL
|
||||
| (ui.onlyTrustedKeys->isChecked()? FriendSelectionWidget::SHOW_NONE : FriendSelectionWidget::SHOW_NON_FRIEND_GPG));
|
||||
//ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP | FriendSelectionWidget::SHOW_SSL );
|
||||
ui.friendSelectionWidget->start();
|
||||
|
||||
@ -2320,6 +2326,14 @@ void MessageComposer::addContact(enumType type)
|
||||
}
|
||||
}
|
||||
|
||||
void MessageComposer::toggleShowNonFriend(bool bValue)
|
||||
{
|
||||
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP
|
||||
| FriendSelectionWidget::SHOW_SSL
|
||||
| (bValue?FriendSelectionWidget::SHOW_NONE : FriendSelectionWidget::SHOW_NON_FRIEND_GPG));
|
||||
Settings->setValueToGroup("MessageComposer", "ShowOnlyTrustedKeys", bValue);
|
||||
}
|
||||
|
||||
void MessageComposer::addTo()
|
||||
{
|
||||
addContact(TO);
|
||||
|
@ -133,6 +133,7 @@ private slots:
|
||||
void titleChanged();
|
||||
|
||||
// Add to To/Cc/Bcc address fields
|
||||
void toggleShowNonFriend(bool bValue);
|
||||
void addTo();
|
||||
void addCc();
|
||||
void addBcc();
|
||||
|
@ -102,6 +102,13 @@
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="onlyTrustedKeys">
|
||||
<property name="text">
|
||||
<string>Only show people you trusted</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
|
Loading…
Reference in New Issue
Block a user