diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2005-01-20 11:35:19 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2005-01-20 11:35:19 (GMT) |
commit | a601c252dae06def4379c838ed176955903b34c9 (patch) | |
tree | 73ebfd2e9265c0df9a963c04a19517ea33fcd200 /shell/ev-view.c | |
parent | dd089d0260316824ae2ad76160cf7b37499a854d (diff) |
Ensure thumbnails selection, toolbar page control and current page are in
2005-01-20 Marco Pesenti Gritti <marco@gnome.org>
* shell/ev-sidebar-thumbnails.c:
(ev_sidebar_tree_selection_changed),
(ev_sidebar_thumbnails_select_page):
* shell/ev-sidebar-thumbnails.h:
* shell/ev-view.c: (ev_view_set_document), (ev_view_can_go_back),
(ev_view_can_go_forward):
* shell/ev-window.c: (ev_window_open_page),
(ev_window_setup_document), (update_current_page),
(view_page_changed_cb), (ev_window_init):
* shell/ev-window.h:
Ensure thumbnails selection, toolbar page control and
current page are in sync.
Diffstat (limited to 'shell/ev-view.c')
-rw-r--r-- | shell/ev-view.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c index 7ca3630..2033962 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -1060,8 +1060,6 @@ ev_view_set_document (EvView *view, g_return_if_fail (EV_IS_VIEW (view)); if (document != view->document) { - int old_page = ev_view_get_page (view); - if (view->document) { g_signal_handlers_disconnect_by_func (view->document, found_results_callback, @@ -1093,8 +1091,7 @@ ev_view_set_document (EvView *view, gtk_widget_queue_resize (GTK_WIDGET (view)); - if (old_page != ev_view_get_page (view)) - g_signal_emit (view, page_changed_signal, 0); + g_signal_emit (view, page_changed_signal, 0); } } @@ -1166,7 +1163,9 @@ ev_view_can_go_back (EvView *view) { int index, n; - g_return_val_if_fail (EV_IS_HISTORY (view->history), FALSE); + if (view->history == NULL) { + return FALSE; + } index = ev_history_get_current_index (view->history); n = ev_history_get_n_links (view->history); @@ -1199,7 +1198,9 @@ ev_view_can_go_forward (EvView *view) { int index, n; - g_return_val_if_fail (EV_IS_HISTORY (view->history), FALSE); + if (view->history == NULL) { + return FALSE; + } index = ev_history_get_current_index (view->history); n = ev_history_get_n_links (view->history); |