+2008-08-24 Carlos Garcia Campos <carlosgc@gnome.org>
+
+ * shell/ev-window.c: (ev_window_setup_document),
+ (ev_window_set_document), (ev_window_dispose):
+
+ Remove the idle function for setting the document up when the
+ window is destroyed. Fixes bug #549163.
+
2008-08-22 Carlos Garcia Campos <carlosgc@gnome.org>
* shell/ev-jobs.[ch]: (ev_job_attachments_init),
gboolean unlink_temp_file;
gboolean in_reload;
EvFileMonitor *monitor;
+ guint setup_document_idle;
EvDocument *document;
EvHistory *history;
EvDocument *document = ev_window->priv->document;
EvSidebar *sidebar = EV_SIDEBAR (ev_window->priv->sidebar);
GtkAction *action;
+
+ ev_window->priv->setup_document_idle = 0;
if (EV_IS_DOCUMENT_FIND (document)) {
g_signal_connect_object (G_OBJECT (document),
_("The document contains no pages"));
}
- g_idle_add ((GSourceFunc)ev_window_setup_document, ev_window);
+ if (ev_window->priv->setup_document_idle > 0)
+ g_source_remove (ev_window->priv->setup_document_idle);
+ ev_window->priv->setup_document_idle = g_idle_add ((GSourceFunc)ev_window_setup_document, ev_window);
}
static void
}
#endif /* ENABLE_DBUS */
+ if (priv->setup_document_idle > 0) {
+ g_source_remove (priv->setup_document_idle);
+ priv->setup_document_idle = 0;
+ }
+
if (priv->monitor) {
g_object_unref (priv->monitor);
priv->monitor = NULL;