From 2380ada377881c8e6bf00368f713ebd72e355dda Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Mon, 6 Jun 2005 23:37:15 +0000 Subject: [PATCH] Cleanup links job on exit --- ChangeLog | 6 ++++++ shell/ev-sidebar-links.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7dd10577..5612ca13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-06-07 Nickolay V. Shmyrev <> + + * shell/ev-sidebar-links.c: (ev_sidebar_links_dispose): + + Cleanup links job on exit. + 2005-06-07 Nickolay V. Shmyrev * cut-n-paste/toolbar-editor/egg-editable-toolbar.c: diff --git a/shell/ev-sidebar-links.c b/shell/ev-sidebar-links.c index ac34bac4..68820073 100644 --- a/shell/ev-sidebar-links.c +++ b/shell/ev-sidebar-links.c @@ -67,6 +67,8 @@ static void row_activated_callback (GtkTreeView *treeview, GtkTreePath *arg1, GtkTreeViewColumn *arg2, gpointer user_data); +static void job_finished_callback (EvJobLinks *job, + EvSidebarLinks *sidebar_links); static void ev_sidebar_links_page_iface_init (EvSidebarPageIface *iface); static void ev_sidebar_links_set_document (EvSidebarPage *sidebar_page, EvDocument *document); @@ -143,6 +145,14 @@ ev_sidebar_links_dispose (GObject *object) sidebar->priv->page_cache = NULL; } + if (sidebar->priv->job) { + g_signal_handlers_disconnect_by_func (sidebar->priv->job, + job_finished_callback, sidebar); + ev_job_queue_remove_job (sidebar->priv->job); + g_object_unref (sidebar->priv->job); + sidebar->priv->job = NULL; + } + G_OBJECT_CLASS (ev_sidebar_links_parent_class)->dispose (object); } -- 2.43.5