22 #include <glib/gi18n.h>
34 #define EV_HISTORY_MAX_LENGTH (32)
56 g_list_free_full (list, (GDestroyNotify) g_object_unref);
75 g_assert (priv->
current->next == NULL);
77 for (i = 0, l = priv->
current; i < EV_HISTORY_MAX_LENGTH && l != NULL; i++, l = l->prev)
102 G_OBJECT_CLASS (ev_history_parent_class)->finalize (
object);
108 GObjectClass *object_class = G_OBJECT_CLASS (
class);
113 g_signal_new (
"changed",
114 G_OBJECT_CLASS_TYPE (object_class),
115 G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
118 g_cclosure_marshal_VOID__VOID,
122 g_signal_new (
"activate-link",
123 G_OBJECT_CLASS_TYPE (object_class),
124 G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
127 g_cclosure_marshal_VOID__OBJECT,
158 priv = history->
priv;
167 priv->
current = g_list_append (NULL, g_object_ref (link));
199 priv = history->
priv;
213 priv = history->
priv;
231 priv = history->
priv;
245 priv = history->
priv;
285 priv = history->
priv;
313 priv = history->
priv;
319 for (l = priv->
current->prev; l != NULL; l = l->prev)
320 list = g_list_prepend (list, l->data);
322 return g_list_reverse (list);
426 title = g_strdup_printf (
_(
"Page %s"), page_label);
431 g_object_unref (dest);
434 g_object_unref (action);
438 g_object_unref (link);
447 if (ABS (new_page - old_page) > 1)
468 g_object_remove_weak_pointer (G_OBJECT (history->
priv->
model),
472 g_signal_handler_disconnect (history->
priv->
model,
482 g_object_add_weak_pointer (G_OBJECT (model),
485 g_signal_connect (history->
priv->
model,
"notify::document",
489 g_signal_connect (history->
priv->
model,
"page-changed",