From 73f224422aea23d6b3b57958256e3468e1210334 Mon Sep 17 00:00:00 2001 From: Jannis Pohlmann Date: Sun, 30 Nov 2008 16:45:50 +0000 Subject: * thunar/thunar-history.c (thunar_history_set_current_directory): If the new directory is the first one in the forward list, we just go one step forward instead of clearing the whole forward history. Don't try to be intelligent anymore if the new directory is the first one in the backward history. (Old svn revision: 28956) --- thunar/thunar-history.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'thunar/thunar-history.c') diff --git a/thunar/thunar-history.c b/thunar/thunar-history.c index e9e73004..7cba6ed0 100644 --- a/thunar/thunar-history.c +++ b/thunar/thunar-history.c @@ -312,20 +312,11 @@ thunar_history_set_current_directory (ThunarNavigator *navigator, if (G_UNLIKELY (current_directory == history->current_directory)) return; - /* we try to be smart and check if the new current directory - * is the first element on either "back" or "forward" and if - * so, perform the appropriate operation. - */ - if (history->back_list != NULL && history->back_list->data == current_directory) - { - /* go back one step */ - thunar_history_go_back (history, 1); - } - else if (history->forward_list != NULL && history->forward_list->data == current_directory) - { - /* go forward one step */ - thunar_history_go_forward (history, 1); - } + /* if the new directory is the first one in the forward history, we + * just move forward one step instead of clearing the whole forward + * history */ + if (history->forward_list != NULL && history->forward_list->data == current_directory) + thunar_history_go_forward (history, 1); else { /* clear the "forward" list */ -- cgit v1.2.1