#include "config.h"
#include <glib/gi18n.h>
#include <string.h>
#include "ev-history.h"
Go to the source code of this file.
|
static void | ev_history_set_model (EvHistory *history, EvDocumentModel *model) |
|
static void | clear_list (GList *list) |
|
static void | ev_history_clear (EvHistory *history) |
|
static void | ev_history_prune (EvHistory *history) |
|
static void | ev_history_finalize (GObject *object) |
|
static void | ev_history_class_init (EvHistoryClass *class) |
|
static void | ev_history_init (EvHistory *history) |
|
gboolean | ev_history_is_frozen (EvHistory *history) |
|
void | ev_history_add_link (EvHistory *history, EvLink *link) |
|
static void | ev_history_activate_current_link (EvHistory *history) |
|
gboolean | ev_history_can_go_back (EvHistory *history) |
|
void | ev_history_go_back (EvHistory *history) |
|
gboolean | ev_history_can_go_forward (EvHistory *history) |
|
void | ev_history_go_forward (EvHistory *history) |
|
static gint | compare_link (EvLink *a, EvLink *b) |
|
gboolean | ev_history_go_to_link (EvHistory *history, EvLink *link) |
|
GList * | ev_history_get_back_list (EvHistory *history) |
|
GList * | ev_history_get_forward_list (EvHistory *history) |
|
void | ev_history_freeze (EvHistory *history) |
|
void | ev_history_thaw (EvHistory *history) |
|
static gint | ev_history_get_current_page (EvHistory *history) |
|
static void | ev_history_add_link_for_page (EvHistory *history, gint page) |
|
static void | page_changed_cb (EvDocumentModel *model, gint old_page, gint new_page, EvHistory *history) |
|
static void | document_changed_cb (EvDocumentModel *model, GParamSpec *pspec, EvHistory *history) |
|
EvHistory * | ev_history_new (EvDocumentModel *model) |
|
#define EV_HISTORY_MAX_LENGTH (32) |
Enumerator |
---|
CHANGED |
|
ACTIVATE_LINK |
|
N_SIGNALS |
|
Definition at line 27 of file ev-history.c.
static void clear_list |
( |
GList * |
list) | |
|
|
static |
Definition at line 54 of file ev-history.c.
56 g_list_free_full (list, (GDestroyNotify) g_object_unref);
static void ev_history_activate_current_link |
( |
EvHistory * |
history) | |
|
|
static |
Definition at line 147 of file ev-history.c.
158 priv = history->
priv;
167 priv->
current = g_list_append (NULL, g_object_ref (link));
static void ev_history_add_link_for_page |
( |
EvHistory * |
history, |
|
|
gint |
page |
|
) |
| |
|
static |
Definition at line 402 of file ev-history.c.
426 title = g_strdup_printf (
_(
"Page %s"), page_label);
431 g_object_unref (dest);
434 g_object_unref (action);
438 g_object_unref (link);
gboolean ev_history_can_go_back |
( |
EvHistory * |
history) | |
|
gboolean ev_history_can_go_forward |
( |
EvHistory * |
history) | |
|
Definition at line 106 of file ev-history.c.
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,
static void ev_history_clear |
( |
EvHistory * |
history) | |
|
|
static |
static void ev_history_finalize |
( |
GObject * |
object) | |
|
|
static |
Definition at line 95 of file ev-history.c.
102 G_OBJECT_CLASS (ev_history_parent_class)->finalize (
object);
void ev_history_freeze |
( |
EvHistory * |
history) | |
|
GList* ev_history_get_back_list |
( |
EvHistory * |
history) | |
|
ev_history_get_back_list: : a EvHistory
Returns: (transfer container): the back history
Definition at line 306 of file ev-history.c.
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);
static gint ev_history_get_current_page |
( |
EvHistory * |
history) | |
|
|
static |
GList* ev_history_get_forward_list |
( |
EvHistory * |
history) | |
|
ev_history_get_forward_list: : a EvHistory
Returns: (transfer container): the forward history
Definition at line 332 of file ev-history.c.
void ev_history_go_back |
( |
EvHistory * |
history) | |
|
void ev_history_go_forward |
( |
EvHistory * |
history) | |
|
static void ev_history_init |
( |
EvHistory * |
history) | |
|
|
static |
gboolean ev_history_is_frozen |
( |
EvHistory * |
history) | |
|
static void ev_history_prune |
( |
EvHistory * |
history) | |
|
|
static |
Definition at line 69 of file ev-history.c.
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)
Definition at line 461 of file ev-history.c.
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",
Definition at line 442 of file ev-history.c.
447 if (ABS (new_page - old_page) > 1)