[evince] ev-history: Freeze the history while activating current link



commit 068a358607bd634c53572c288b7e41514c172024
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Sat Apr 20 17:50:52 2013 +0200

    ev-history: Freeze the history while activating current link
    
    Instead of using a custom boolean for that

 shell/ev-history.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/shell/ev-history.c b/shell/ev-history.c
index 21788d1..a6d8703 100644
--- a/shell/ev-history.c
+++ b/shell/ev-history.c
@@ -40,7 +40,6 @@ struct _EvHistoryPrivate {
 
         EvDocumentModel *model;
         gulong           page_changed_handler_id;
-        gboolean         activating_current_link;
 
         guint            frozen;
 };
@@ -121,7 +120,7 @@ ev_history_add_link (EvHistory *history,
        g_return_if_fail (EV_IS_HISTORY (history));
        g_return_if_fail (EV_IS_LINK (link));
 
-        if (ev_history_is_frozen (history) || history->priv->activating_current_link)
+        if (ev_history_is_frozen (history))
                 return;
 
         if (ev_history_go_to_link (history, link))
@@ -145,11 +144,11 @@ ev_history_add_link (EvHistory *history,
 static void
 ev_history_activate_current_link (EvHistory *history)
 {
-        history->priv->activating_current_link = TRUE;
+        ev_history_freeze (history);
         g_signal_handler_block (history->priv->model, history->priv->page_changed_handler_id);
         g_signal_emit (history, signals[ACTIVATE_LINK], 0, history->priv->current);
         g_signal_handler_unblock (history->priv->model, history->priv->page_changed_handler_id);
-        history->priv->activating_current_link = FALSE;
+        ev_history_thaw (history);
 
         g_signal_emit (history, signals[CHANGED], 0);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]