diff --git a/retroshare-gui/src/gui/common/FriendSelectionWidget.ui b/retroshare-gui/src/gui/common/FriendSelectionWidget.ui
index b371dfe82..2ad0972b0 100644
--- a/retroshare-gui/src/gui/common/FriendSelectionWidget.ui
+++ b/retroshare-gui/src/gui/common/FriendSelectionWidget.ui
@@ -14,6 +14,34 @@
0
+ -
+
+
+ Search :
+
+
+
+ -
+
+
-
+
+
+ -
+
+
+ All
+
+
+
+ -
+
+
+ None
+
+
+
+
+
-
@@ -44,34 +72,6 @@
- -
-
-
-
-
-
- Search :
-
-
-
- -
-
-
- -
-
-
- All
-
-
-
- -
-
-
- None
-
-
-
-
-
diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.cpp b/retroshare-gui/src/gui/msgs/MessageComposer.cpp
index 992b7da78..45ba4e8a1 100644
--- a/retroshare-gui/src/gui/msgs/MessageComposer.cpp
+++ b/retroshare-gui/src/gui/msgs/MessageComposer.cpp
@@ -195,10 +195,8 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
connect(ui.msgText, SIGNAL(copyAvailable(bool)), actionCopy, SLOT(setEnabled(bool)));
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.filterComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterComboBoxChanged(int)));
connect(ui.addToButton, SIGNAL(clicked(void)), this, SLOT(addTo()));
connect(ui.addCcButton, SIGNAL(clicked(void)), this, SLOT(addCc()));
@@ -218,7 +216,7 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
ui.friendSelectionWidget->setModus(FriendSelectionWidget::MODUS_MULTI);
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP
| FriendSelectionWidget::SHOW_SSL
- | (ui.onlyTrustedKeys->isChecked() ? FriendSelectionWidget::SHOW_NONE : FriendSelectionWidget::SHOW_GXS));
+ | FriendSelectionWidget::SHOW_GXS);
ui.friendSelectionWidget->start();
QActionGroup *grp = new QActionGroup(this);
@@ -240,15 +238,12 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
setupFormatActions();
ui.respond_to_CB->setFlags(IDCHOOSER_ID_REQUIRED) ;
-
- /*ui.comboStyle->addItem("Standard");
- ui.comboStyle->addItem("Bullet List (Disc)");
- ui.comboStyle->addItem("Bullet List (Circle)");
- ui.comboStyle->addItem("Bullet List (Square)");
- ui.comboStyle->addItem("Ordered List (Decimal)");
- ui.comboStyle->addItem("Ordered List (Alpha lower)");
- ui.comboStyle->addItem("Ordered List (Alpha upper)");*/
- //connect(ui.comboStyle, SIGNAL(activated(int)),this, SLOT(textStyle(int)));
+
+ /* Add filter types */
+ ui.filterComboBox->addItem(tr("All"));
+ ui.filterComboBox->addItem(tr("Friends"));
+ ui.filterComboBox->addItem(tr("Friends of Friends"));
+ ui.filterComboBox->setCurrentIndex(0);
connect(ui.comboStyle, SIGNAL(activated(int)),this, SLOT(changeFormatType(int)));
connect(ui.comboFont, SIGNAL(activated(const QString &)), this, SLOT(textFamily(const QString &)));
@@ -257,7 +252,7 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
QFontDatabase db;
foreach(int size, db.standardSizes())
- ui.comboSize->addItem(QString::number(size));
+ ui.comboSize->addItem(QString::number(size));
connect(ui.comboSize, SIGNAL(activated(const QString &)),this, SLOT(textSize(const QString &)));
ui.comboSize->setCurrentIndex(ui.comboSize->findText(QString::number(QApplication::font().pointSize())));
@@ -350,6 +345,11 @@ void MessageComposer::processSettings(bool bLoad)
// state of splitter
ui.splitter->restoreState(Settings->value("Splitter").toByteArray());
ui.splitter_2->restoreState(Settings->value("Splitter2").toByteArray());
+
+ // state of filter combobox
+ int index = Settings->value("ShowType", 0).toInt();
+ ui.filterComboBox->setCurrentIndex(index);
+
} else {
// save settings
@@ -359,6 +359,10 @@ void MessageComposer::processSettings(bool bLoad)
// state of splitter
Settings->setValue("Splitter", ui.splitter->saveState());
Settings->setValue("Splitter2", ui.splitter_2->saveState());
+
+ // state of filter combobox
+ Settings->setValue("ShowType", ui.filterComboBox->currentIndex());
+
}
Settings->endGroup();
@@ -2357,13 +2361,24 @@ void MessageComposer::addContact(enumType type)
addRecipient(type, *idIt);
}
-void MessageComposer::toggleShowNonFriend(bool bValue)
+void MessageComposer::filterComboBoxChanged(int i)
{
- ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP
+ switch(i)
+ {
+ case 0: ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP
| FriendSelectionWidget::SHOW_SSL
- | (bValue?FriendSelectionWidget::SHOW_NONE : FriendSelectionWidget::SHOW_GXS));
+ | FriendSelectionWidget::SHOW_GXS) ;
+ break ;
+
+ case 1: ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP
+ | FriendSelectionWidget::SHOW_SSL) ;
+ break ;
+
+ case 2: ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GXS) ;
+ break ;
+ default: ;
+ }
- Settings->setValueToGroup("MessageComposer", "ShowOnlyTrustedKeys", bValue);
}
void MessageComposer::addTo()
diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.h b/retroshare-gui/src/gui/msgs/MessageComposer.h
index ee5b3db0e..a6806ffc0 100644
--- a/retroshare-gui/src/gui/msgs/MessageComposer.h
+++ b/retroshare-gui/src/gui/msgs/MessageComposer.h
@@ -95,6 +95,7 @@ private slots:
void buildCompleter();
void updatecontactsviewicons();
+ void filterComboBoxChanged(int);
void fileNew();
void fileOpen();
@@ -136,7 +137,6 @@ private slots:
void titleChanged();
// Add to To/Cc/Bcc address fields
- void toggleShowNonFriend(bool bValue);
void addTo();
void addCc();
void addBcc();
diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.ui b/retroshare-gui/src/gui/msgs/MessageComposer.ui
index bb6929a87..f162fba89 100644
--- a/retroshare-gui/src/gui/msgs/MessageComposer.ui
+++ b/retroshare-gui/src/gui/msgs/MessageComposer.ui
@@ -63,7 +63,7 @@
1
- -
+
-
@@ -100,15 +100,8 @@
- -
+
-
-
-
-
-
- Only show people you trusted
-
-
-
-
-
@@ -175,6 +168,23 @@
+ -
+
+
+ 0
+
+
-
+
+
+ Show:
+
+
+
+ -
+
+
+
+