[geary/wip/disconnect-lambdas-726295] Revert "Disconnect lambdas on shutdown"



commit b30443f0fca7bdd2d570844401ac69d03e9f6c53
Author: Charles Lindsay <chaz yorba org>
Date:   Fri Mar 14 11:59:26 2014 -0700

    Revert "Disconnect lambdas on shutdown"
    
    This reverts commit fedc984a9d3dacb1f517ee2a56f39e6de7455ff3.
    
    That didn't work, and looking at the stack trace, that was probably the
    wrong place to try to fix.  Shot in the dark, man.

 .../conversation-viewer/conversation-viewer.vala   |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala 
b/src/client/conversation-viewer/conversation-viewer.vala
index e7fea71..d81fb1c 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -148,7 +148,6 @@ public class ConversationViewer : Gtk.Box {
     private Geary.State.Machine fsm;
     private DisplayMode display_mode = DisplayMode.NONE;
     private uint select_conversation_timeout_id = 0;
-    private Gee.ArrayList<ulong> closure_connections = new Gee.ArrayList<ulong>();
     
     public ConversationViewer() {
         Object(orientation: Gtk.Orientation.VERTICAL, spacing: 0);
@@ -181,14 +180,11 @@ public class ConversationViewer : Gtk.Box {
         
GearyApplication.instance.controller.conversation_count_changed.connect(on_conversation_count_changed);
         
         web_view.hovering_over_link.connect(on_hovering_over_link);
-        closure_connections.add(
-            web_view.context_menu.connect(() => { return true; })); // Suppress default context menu.
-        closure_connections.add(
-            web_view.realize.connect( () => { web_view.get_vadjustment().value_changed.connect(mark_read); 
}));
+        web_view.context_menu.connect(() => { return true; }); // Suppress default context menu.
+        web_view.realize.connect( () => { web_view.get_vadjustment().value_changed.connect(mark_read); });
         web_view.size_allocate.connect(mark_read);
 
-        closure_connections.add(
-            web_view.link_selected.connect((link) => { link_selected(link); }));
+        web_view.link_selected.connect((link) => { link_selected(link); });
         
         Gtk.ScrolledWindow conversation_viewer_scrolled = new Gtk.ScrolledWindow(null, null);
         conversation_viewer_scrolled.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
@@ -200,17 +196,11 @@ public class ConversationViewer : Gtk.Box {
         
         conversation_find_bar = new ConversationFindBar(web_view);
         conversation_find_bar.no_show_all = true;
-        closure_connections.add(
-            conversation_find_bar.close.connect(() => { fsm.issue(SearchEvent.CLOSE_FIND_BAR); }));
+        conversation_find_bar.close.connect(() => { fsm.issue(SearchEvent.CLOSE_FIND_BAR); });
         
         pack_start(conversation_find_bar, false);
     }
     
-    ~ConversationViewer() {
-        foreach (ulong id in closure_connections)
-            disconnect(id);
-    }
-    
     public Geary.Email? get_last_message() {
         return messages.is_empty ? null : messages.last();
     }


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