From 72fc0a73ea845307d6a109678952a0d07f6a1af4 Mon Sep 17 00:00:00 2001 From: Nickolay V. Shmyrev Date: Sun, 28 Jan 2007 13:29:10 +0000 Subject: History finally works as expected. 2007-01-28 Nickolay V. Shmyrev * shell/ev-navigation-action.c: (activate_menu_item_cb), (ev_navigation_action_class_init): * shell/ev-navigation-action.h: * shell/ev-page-action.c: (activate_cb): * shell/ev-page-cache.c: (ev_page_cache_class_init), (ev_page_cache_set_current_page_history): * shell/ev-page-cache.h: * shell/ev-sidebar-thumbnails.c: (ev_sidebar_tree_selection_changed), (ev_sidebar_icon_selection_changed), (page_changed_cb): * shell/ev-view-private.h: * shell/ev-view.c: (ev_view_handle_link), (ev_view_class_init): * shell/ev-view.h: * shell/ev-window.c: (page_changed_cb), (history_changed_cb), (ev_window_setup_document), (ev_window_load_job_cb): * shell/ev-window.h: History finally works as expected. svn path=/trunk/; revision=2259 --- (limited to 'shell/ev-sidebar-thumbnails.c') diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c index eac7073..aa83dee 100644 --- a/shell/ev-sidebar-thumbnails.c +++ b/shell/ev-sidebar-thumbnails.c @@ -433,7 +433,7 @@ ev_sidebar_tree_selection_changed (GtkTreeSelection *selection, page = gtk_tree_path_get_indices (path)[0]; gtk_tree_path_free (path); - ev_page_cache_set_current_page (priv->page_cache, page); + ev_page_cache_set_current_page_history (priv->page_cache, page); } static void @@ -458,7 +458,7 @@ ev_sidebar_icon_selection_changed (GtkIconView *icon_view, gtk_tree_path_free (path); g_list_free (selected); - ev_page_cache_set_current_page (priv->page_cache, page); + ev_page_cache_set_current_page_history (priv->page_cache, page); } static void @@ -563,7 +563,17 @@ page_changed_cb (EvPageCache *page_cache, gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE); gtk_tree_view_scroll_to_cell (tree_view, path, NULL, FALSE, 0.0, 0.0); } else if (sidebar->priv->icon_view) { + + g_signal_handlers_block_by_func + (sidebar->priv->icon_view, + G_CALLBACK (ev_sidebar_icon_selection_changed), sidebar); + gtk_icon_view_select_path (GTK_ICON_VIEW (sidebar->priv->icon_view), path); + + g_signal_handlers_unblock_by_func + (sidebar->priv->icon_view, + G_CALLBACK (ev_sidebar_icon_selection_changed), sidebar); + gtk_icon_view_set_cursor (GTK_ICON_VIEW (sidebar->priv->icon_view), path, NULL, FALSE); } -- cgit v0.9.1