+
+static void
+history_index_changed_cb (EvHistory *history,
+ GParamSpec *pspec,
+ EvView *view)
+{
+ int index;
+
+ index = ev_history_get_current_index (history);
+ go_to_index (view, index);
+}
+
+void
+ev_view_set_history (EvView *view,
+ EvHistory *history)
+{
+ if (view->history) {
+ g_object_unref (view->history);
+ }
+
+ view->history = g_object_ref (history);
+ ev_history_add_page (view->history, ev_view_get_page (view));
+
+ g_signal_connect (view->history, "notify::index",
+ G_CALLBACK (history_index_changed_cb),
+ view);
+}