[evince] Disable history action while history is frozen



commit 878979a833d03c53c61a2ad8ef6e9879632104cb
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Sun Jul 14 12:56:59 2013 +0200

    Disable history action while history is frozen
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704184

 shell/ev-history.c |    2 +-
 shell/ev-history.h |    1 +
 shell/ev-window.c  |    3 +++
 3 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/shell/ev-history.c b/shell/ev-history.c
index 6e02370..182ad08 100644
--- a/shell/ev-history.c
+++ b/shell/ev-history.c
@@ -137,7 +137,7 @@ ev_history_init (EvHistory *history)
        history->priv = G_TYPE_INSTANCE_GET_PRIVATE (history, EV_TYPE_HISTORY, EvHistoryPrivate);
 }
 
-static gboolean
+gboolean
 ev_history_is_frozen (EvHistory *history)
 {
         return history->priv->frozen > 0;
diff --git a/shell/ev-history.h b/shell/ev-history.h
index 41f55b7..f3d6f89 100644
--- a/shell/ev-history.h
+++ b/shell/ev-history.h
@@ -69,6 +69,7 @@ GList          *ev_history_get_forward_list (EvHistory       *history);
 
 void            ev_history_freeze           (EvHistory       *history);
 void            ev_history_thaw             (EvHistory       *history);
+gboolean        ev_history_is_frozen        (EvHistory       *history);
 
 G_END_DECLS
 
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 2c9edf3..db25972 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -547,6 +547,9 @@ ev_window_update_actions_sensitivity (EvWindow *ev_window)
                ev_window_set_action_sensitive (ev_window, "GoLastPage", FALSE);
                ev_window_set_action_sensitive (ev_window, "GoToPage", FALSE);
        }
+
+       ev_window_set_action_sensitive (ev_window, "History",
+                                       !ev_history_is_frozen (ev_window->priv->history));
 }
 
 static void


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