summaryrefslogtreecommitdiff
path: root/thunar/thunar-history.c
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis@xfce.org>2008-11-30 16:45:50 +0000
committerJannis Pohlmann <jannis@xfce.org>2008-11-30 16:45:50 +0000
commit73f224422aea23d6b3b57958256e3468e1210334 (patch)
tree81e3493d9b57f87860203ad877ca810ab6a780cf /thunar/thunar-history.c
parent3b190f0dcdc76b0632e4108ede8151bce82f3d30 (diff)
downloadthunar-73f224422aea23d6b3b57958256e3468e1210334.tar.gz
* 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)
Diffstat (limited to 'thunar/thunar-history.c')
-rw-r--r--thunar/thunar-history.c19
1 files changed, 5 insertions, 14 deletions
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 */