Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-12-31 17:10:25 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2004-12-31 17:10:25 (GMT)
commitcd303522106f5ce836d426697f8ce3334d955d60 (patch)
tree4044bfb374d38d185dce942a6f73432ae5800a6b /shell
parent41b5830e4bedb14c4db9a8ed01ccc204692eae3c (diff)
Add a changed event that is emitted when the page content changes. This is
2004-12-31 Marco Pesenti Gritti <marco@gnome.org> * backend/ev-document.c: (ev_document_base_init), (ev_document_changed): * backend/ev-document.h: Add a changed event that is emitted when the page content changes. This is necessary to deal with the fact that in ps backend rendering happen asycrounously. This makes the ps backend mostly work. * pdf/xpdf/pdf-document.cc: Emit changed event * ps/gtkgs.c: (set_up_page), (gtk_gs_widget_event), (ps_document_set_target): Emit changed event * shell/ev-view.c: (document_changed_callback), (ev_view_set_document), (ev_view_set_page): Redraw on the changed signal
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-view.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 07fdecd..bde7d33 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -596,6 +596,13 @@ ev_view_new (void)
return g_object_new (EV_TYPE_VIEW, NULL);
}
+static void
+document_changed_callback (EvDocument *document,
+ EvView *view)
+{
+ gtk_widget_queue_draw (GTK_WIDGET (view));
+}
+
void
ev_view_set_document (EvView *view,
EvDocument *document)
@@ -624,6 +631,10 @@ ev_view_set_document (EvView *view,
"found",
G_CALLBACK (found_results_callback),
view);
+ g_signal_connect (view->document,
+ "changed",
+ G_CALLBACK (document_changed_callback),
+ view);
}
if (GTK_WIDGET_REALIZED (view))
@@ -648,9 +659,7 @@ ev_view_set_page (EvView *view,
g_signal_emit (view, page_changed_signal, 0);
view->find_percent_complete = 0.0;
- update_find_results (view);
-
- gtk_widget_queue_draw (GTK_WIDGET (view));
+ update_find_results (view);
}
}
}