Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2008-08-24 14:23:23 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2008-08-24 14:23:23 (GMT)
commit8a7ab24a48a337a55b9054d2baf1d04f60df61b5 (patch)
tree2d600ece4484b0194b58104902ece99ab7be5574 /shell
parent27dce4e648c04fc784527610af77c30cf1318111 (diff)
Remove the idle function for setting the document up when the window is
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. svn path=/trunk/; revision=3117
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-window.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 0293229..7b5a770 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -166,6 +166,7 @@ struct _EvWindowPrivate {
gboolean unlink_temp_file;
gboolean in_reload;
EvFileMonitor *monitor;
+ guint setup_document_idle;
EvDocument *document;
EvHistory *history;
@@ -1138,6 +1139,8 @@ ev_window_setup_document (EvWindow *ev_window)
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),
@@ -1203,7 +1206,9 @@ ev_window_set_document (EvWindow *ev_window, EvDocument *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
@@ -4168,6 +4173,11 @@ ev_window_dispose (GObject *object)
}
#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;