Commit 7682c9d6 authored by Zain's avatar Zain Committed by Kai Willadsen

Fix: bgo #753358 stderr errors when Alt-F4 is used

Problem:
  When meld is launched from console, usecase is git difftool,
  After closing App using Alt+F4 console displays multiple error messages
  Error Messages look like
  (meld:18521): Gtk-CRITICAL **: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed

Cause:
  closing window triggers do_window_removed
  Unlike when Quit is choosen from Menu, self.quit() is never called
  Gtk complains and adds error messages on STDERR

Solution:
  When do_window_removed is called check if there are any active windows
  If there is no active window, call self.quit()
parent 7dcfef03
......@@ -98,6 +98,8 @@ class MeldApp(Gtk.Application):
def do_window_removed(self, widget):
widget.meldwindow = None
Gtk.Application.do_window_removed(self, widget)
if not len(self.get_windows()):
self.quit()
# We can't override do_local_command_line because it has no introspection
# annotations: https://bugzilla.gnome.org/show_bug.cgi?id=687912
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment