Philipp Hörist pushed to branch master at gajim / gajim

Commits:
a25a38ed by Philipp Hörist at 2017-08-10T11:04:21+02:00
Correctly destroy all windows on quit()

Not all Dialogs have a window instance, some inherit Gtk.Window

- - - - -
5a7a6766 by Philipp Hörist at 2017-08-10T11:07:57+02:00
Fix rare bug in scroll_to_end()

- - - - -


2 changed files:

- gajim/gtkgui_helpers.py
- gajim/roster_window.py


Changes:

=====================================
gajim/gtkgui_helpers.py
=====================================
--- a/gajim/gtkgui_helpers.py
+++ b/gajim/gtkgui_helpers.py
@@ -334,6 +334,10 @@ def scroll_to_end(widget):
         bool: The return value is False so it can be used with GLib.idle_add.
     """
     adj_v = widget.get_vadjustment()
+    if adj_v is None:
+        # This can happen when the Widget is already destroyed when called
+        # from GLib.idle_add
+        return False
     max_scroll_pos = adj_v.get_upper() - adj_v.get_page_size()
     adj_v.set_value(max_scroll_pos)
 


=====================================
gajim/roster_window.py
=====================================
--- a/gajim/roster_window.py
+++ b/gajim/roster_window.py
@@ -2395,7 +2395,10 @@ class RosterWindow:
             if isinstance(w, dict):
                 self.close_all_from_dict(w)
             else:
-                w.window.destroy()
+                try:
+                    w.window.destroy()
+                except AttributeError:
+                    w.destroy()
 
     def close_all(self, account, force=False):
         """



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/174e88024dcee6ea7a225c9fb62ce824c5c6887f...5a7a6766b8240ff0a7f8b9c5fe9ba0185b4b0b5a

---
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/174e88024dcee6ea7a225c9fb62ce824c5c6887f...5a7a6766b8240ff0a7f8b9c5fe9ba0185b4b0b5a
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to