Commit 9da7961c authored by Cédric Bellegarde's avatar Cédric Bellegarde

Disconnect signals on destroy. WebView is always active because of delayed...

Disconnect signals on destroy. WebView is always active because of delayed destroying. Thanks to Christoph Reiter for help. GNOME/pygobject#195
parent 5a9e6a44
......@@ -195,6 +195,18 @@ class PagesManagerChild(Gtk.FlowBoxChild):
Destroy self
@param view as View
"""
self.__view.webview.disconnect_by_func(
self.__on_webview_snapshot_changed)
self.__view.webview.disconnect_by_func(
self.__on_webview_favicon_changed)
self.__view.webview.disconnect_by_func(
self.__on_webview_notify_is_playing_audio)
self.__view.webview.disconnect_by_func(
self.__on_webview_title_changed)
self.__view.webview.disconnect_by_func(
self.__on_webview_load_changed)
self.__view.webview.disconnect_by_func(
self.__on_webview_shown)
self.destroy()
def __on_webview_notify_is_playing_audio(self, webview, playing):
......
......@@ -60,6 +60,14 @@ class PageChildRow(Gtk.ListBoxRow):
view.webview.connect("title-changed", self.__on_webview_title_changed)
eventbox.connect("button-press-event", self.__on_button_press_event)
def destroy(self):
"""
Disconnect and destroy
"""
self.__view.webview.disconnect_by_func(self.__on_webview_load_changed)
self.__view.webview.disconnect_by_func(self.__on_webview_title_changed)
Gtk.ListBoxRow.destroy(self)
@property
def view(self):
"""
......
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