[meld: 1/2] multi-window ui: fix closing after async file save



commit 492f21b8dfecbcbacce20755c669013155d47bb0
Author: Vasily Galkin <galkin-vv ya ru>
Date:   Tue Mar 31 22:22:54 2020 +0300

    multi-window ui: fix closing after async file save
    
    At least with gtk 3.24 meld (both master and 3.20 branch)
    has a following problem:
    if last tab with modified file in non-last window is closed
    and saving file is approved - the window becomes clear gray.
    
    Simplest steps to reproduce in meld checkout:
    
    * bin/meld &; sleep 5; bin/meld bin/meld
    * edit some comments, press close
    * Approve saving
    * Result: empty gray window is shown
    
    The commit history doesn't reveal any notice why MeldWindow
    destroys widget by emit-with-name instead of method-call.
    It maybe coincidence. Changing this to method call resolves issue.
    All other destroys in meld code including self-destroys are done
    via method call and I'm not sure that emit('destroy')
    is a way "supported" by gtk.

 meld/meldwindow.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index 1c408af2..73535233 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -295,7 +295,7 @@ class MeldWindow(Gtk.ApplicationWindow):
                 cancelled = self.emit(
                     'delete-event', Gdk.Event.new(Gdk.EventType.DELETE))
                 if not cancelled:
-                    self.emit('destroy')
+                    self.destroy()
 
     def on_page_state_changed(self, page, old_state, new_state):
         if self.should_close and old_state == ComparisonState.Closing:


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