[geary] Make ComposerWidget implement BaseInterface to track refcounting



commit 61799fe03074d3ce31fc1f16a98d9c27e9011ff6
Author: Michael Gratton <mike vee net>
Date:   Sun Feb 10 21:06:45 2019 +1100

    Make ComposerWidget implement BaseInterface to track refcounting

 src/client/composer/composer-widget.vala | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index c01581b7..525d6275 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -13,7 +13,7 @@ private errordomain AttachmentError {
 
 // The actual widget for sending messages. Should be put in a ComposerContainer
 [GtkTemplate (ui = "/org/gnome/Geary/composer-widget.ui")]
-public class ComposerWidget : Gtk.EventBox {
+public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
 
 
     public enum ComposeType {
@@ -397,6 +397,7 @@ public class ComposerWidget : Gtk.EventBox {
                           ContactListStoreCache contact_list_store_cache,
                           ComposeType compose_type,
                           Configuration config) {
+        base_ref();
         this.account = account;
         this.contact_list_store_cache = contact_list_store_cache;
         this.config = config;
@@ -525,6 +526,10 @@ public class ComposerWidget : Gtk.EventBox {
         load_entry_completions();
     }
 
+    ~ComposerWidget() {
+        base_unref();
+    }
+
     public override void destroy() {
         this.draft_timer.reset();
         if (this.draft_manager_opening != null) {


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