Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Yongha Hwang
thunar
Commits
3334a313
Commit
3334a313
authored
Jun 05, 2021
by
Alexander Schwinn
Browse files
Fix missing folder in history when opened in new tab (Issue #594)
Fixes #594
parent
19e070eb
Pipeline
#9612
passed with stage
in 14 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
thunar/thunar-history.c
View file @
3334a313
...
...
@@ -723,3 +723,20 @@ thunar_history_peek_forward (ThunarHistory *history)
return
result
;
}
/**
* thunar_history_add:
* @history : a #ThunarHistory
* @history : a #ThunarFile
*
* Manually adds the passed directory to the history
**/
void
thunar_history_add
(
ThunarHistory
*
history
,
ThunarFile
*
directory
)
{
thunar_history_set_current_directory
(
THUNAR_NAVIGATOR
(
history
),
directory
);
}
thunar/thunar-history.h
View file @
3334a313
...
...
@@ -63,6 +63,8 @@ void thunar_history_action_forward (ThunarHistory *history)
void
thunar_history_show_menu
(
ThunarHistory
*
history
,
ThunarHistoryMenuType
type
,
GtkWidget
*
parent
);
void
thunar_history_add
(
ThunarHistory
*
history
,
ThunarFile
*
directory
);
G_END_DECLS
;
...
...
thunar/thunar-window.c
View file @
3334a313
...
...
@@ -2106,7 +2106,13 @@ thunar_window_notebook_insert_page (ThunarWindow *window,
/* set the history of the view if a history is provided */
if
(
history
!=
NULL
)
thunar_standard_view_set_history
(
THUNAR_STANDARD_VIEW
(
view
),
history
);
{
/* history only is updated on 'change-directory' signal. */
/* For inserting a new tab, we need to update it manually */
thunar_history_add
(
history
,
directory
);
thunar_standard_view_set_history
(
THUNAR_STANDARD_VIEW
(
view
),
history
);
}
label_box
=
gtk_box_new
(
GTK_ORIENTATION_HORIZONTAL
,
0
);
...
...
@@ -2296,7 +2302,9 @@ thunar_window_notebook_add_new_tab (ThunarWindow *window,
/* save the history of the current view */
if
(
THUNAR_IS_STANDARD_VIEW
(
window
->
view
))
history
=
thunar_standard_view_copy_history
(
THUNAR_STANDARD_VIEW
(
window
->
view
));
{
history
=
thunar_standard_view_copy_history
(
THUNAR_STANDARD_VIEW
(
window
->
view
));
}
/* find the correct view type */
view_type
=
thunar_window_view_type_for_directory
(
window
,
directory
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment