[Xfce4-commits] [xfce/thunar] 03/04: Make new tabs inherit the history of the origin view (bug #5538)
noreply at xfce.org
noreply at xfce.org
Thu Apr 9 11:12:30 CEST 2015
This is an automated email from the git hooks/post-receive script.
hjudt pushed a commit to branch master
in repository xfce/thunar.
commit aa5f8fca0e6e965a9592da30c36d2fa4afe44746
Author: Harald Judt <h.judt at gmx.at>
Date: Wed Apr 8 20:04:17 2015 +0200
Make new tabs inherit the history of the origin view (bug #5538)
---
thunar/thunar-window.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 2e863ef..d626106 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -1707,13 +1707,14 @@ static void
thunar_window_notebook_insert (ThunarWindow *window,
ThunarFile *directory)
{
- GtkWidget *view;
- gint page_num;
- GtkWidget *label;
- GtkWidget *label_box;
- GtkWidget *button;
- GtkWidget *icon;
- GtkRcStyle *style;
+ ThunarHistory *history = NULL;
+ GtkWidget *view;
+ gint page_num;
+ GtkWidget *label;
+ GtkWidget *label_box;
+ GtkWidget *button;
+ GtkWidget *icon;
+ GtkRcStyle *style;
_thunar_return_if_fail (THUNAR_IS_WINDOW (window));
_thunar_return_if_fail (THUNAR_IS_FILE (directory));
@@ -1723,10 +1724,18 @@ thunar_window_notebook_insert (ThunarWindow *window,
if (directory == NULL)
return;
+ /* save the history of the origin view */
+ if (THUNAR_IS_STANDARD_VIEW (window->view))
+ history = thunar_standard_view_copy_history (THUNAR_STANDARD_VIEW (window->view));
+
/* allocate and setup a new view */
view = g_object_new (window->view_type, "current-directory", directory, NULL);
gtk_widget_show (view);
+ /* use the history of the origin view if available */
+ if (history != NULL)
+ thunar_standard_view_set_history (THUNAR_STANDARD_VIEW (view), history);
+
label_box = gtk_hbox_new (FALSE, 0);
label = gtk_label_new (NULL);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list