[geary/mjog/email-plugins: 56/61] ConversationListBox: Add convenience methods for email info bars



commit 44806d218c82e4201f8c869f8518b7aaffd44667
Author: Michael Gratton <mike vee net>
Date:   Sun Mar 22 18:05:02 2020 +1100

    ConversationListBox: Add convenience methods for email info bars

 .../conversation-viewer/conversation-list-box.vala     | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
---
diff --git a/src/client/conversation-viewer/conversation-list-box.vala 
b/src/client/conversation-viewer/conversation-list-box.vala
index 1560f133..2c45425a 100644
--- a/src/client/conversation-viewer/conversation-list-box.vala
+++ b/src/client/conversation-viewer/conversation-list-box.vala
@@ -926,6 +926,24 @@ public class ConversationListBox : Gtk.ListBox, Geary.BaseInterface {
         }
     }
 
+    /** Adds an info bar to the given email, if any. */
+    public void add_email_info_bar(Geary.EmailIdentifier id,
+                                   Gtk.InfoBar info_bar) {
+        var row = this.email_rows.get(id);
+        if (row != null) {
+            row.view.primary_message.info_bars.add(info_bar);
+        }
+    }
+
+    /** Adds an info bar to the given email, if any. */
+    public void remove_email_info_bar(Geary.EmailIdentifier id,
+                                      Gtk.InfoBar info_bar) {
+        var row = this.email_rows.get(id);
+        if (row != null) {
+            row.view.primary_message.info_bars.remove(info_bar);
+        }
+    }
+
     /**
      * Increases the magnification level used for displaying messages.
      */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]