diff -ru thunar-0.9.0.orig/thunar/thunar-history.c thunar-0.9.0/thunar/thunar-history.c --- thunar-0.9.0.orig/thunar/thunar-history.c 2007-12-02 05:46:33.000000000 -0800 +++ thunar-0.9.0/thunar/thunar-history.c 2008-06-23 15:55:48.000000000 -0700 @@ -312,41 +312,24 @@ 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) + /* clear the "forward" list */ + gtk_action_set_sensitive (history->action_forward, FALSE); + thunar_file_list_free (history->forward_list); + history->forward_list = NULL; + + /* prepend the previous current directory to the "back" list */ + if (G_LIKELY (history->current_directory != NULL)) { - /* go forward one step */ - thunar_history_go_forward (history, 1); + history->back_list = g_list_prepend (history->back_list, history->current_directory); + gtk_action_set_sensitive (history->action_back, TRUE); } - else - { - /* clear the "forward" list */ - gtk_action_set_sensitive (history->action_forward, FALSE); - thunar_file_list_free (history->forward_list); - history->forward_list = NULL; - /* prepend the previous current directory to the "back" list */ - if (G_LIKELY (history->current_directory != NULL)) - { - history->back_list = g_list_prepend (history->back_list, history->current_directory); - gtk_action_set_sensitive (history->action_back, TRUE); - } - - /* activate the new current directory */ - history->current_directory = current_directory; - - /* connect to the new current directory */ - if (G_LIKELY (current_directory != NULL)) - g_object_ref (G_OBJECT (current_directory)); - } + /* activate the new current directory */ + history->current_directory = current_directory; + + /* connect to the new current directory */ + if (G_LIKELY (current_directory != NULL)) + g_object_ref (G_OBJECT (current_directory)); /* notify listeners */ g_object_notify (G_OBJECT (history), "current-directory");