summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wx/recipients_panel.cc14
-rw-r--r--src/wx/recipients_panel.h2
2 files changed, 11 insertions, 5 deletions
diff --git a/src/wx/recipients_panel.cc b/src/wx/recipients_panel.cc
index ff19c0227..ff4b12c36 100644
--- a/src/wx/recipients_panel.cc
+++ b/src/wx/recipients_panel.cc
@@ -177,14 +177,18 @@ RecipientsPanel::remove_recipient_clicked ()
list<DKDMRecipient>
-RecipientsPanel::recipients () const
+RecipientsPanel::recipients() const
{
- list<DKDMRecipient> all;
DKDMRecipientList recipients;
- for (auto const& recipient: recipients.dkdm_recipients()) {
- all.push_back(recipient.second);
+
+ list<DKDMRecipient> result;
+ for (auto sel: _selected) {
+ if (auto recipient = recipients.dkdm_recipient(sel.second)) {
+ result.push_back(*recipient);
+ }
}
- return all;
+
+ return result;
}
diff --git a/src/wx/recipients_panel.h b/src/wx/recipients_panel.h
index d252b8d06..cecfa3d33 100644
--- a/src/wx/recipients_panel.h
+++ b/src/wx/recipients_panel.h
@@ -44,7 +44,9 @@ public:
void setup_sensitivity ();
+ /** @return List of selected recipients */
std::list<DKDMRecipient> recipients() const;
+
boost::signals2::signal<void ()> RecipientsChanged;
private: