[Xfce-bugs] [Bug 12403] Weird history behaviour when opening directory in new tab

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Sat Jul 29 22:20:46 CEST 2017


https://bugzilla.xfce.org/show_bug.cgi?id=12403

Daniel Reichelt <hacking at nachtgeist.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hacking at nachtgeist.net

--- Comment #1 from Daniel Reichelt <hacking at nachtgeist.net> ---

Another problem, related to this is:

When you follow Michael's steps and, from the 'xfce4' tab, navigate one level
up, the 'xfce4' folder *should* be selected, but it isn't. Also, this is not a
problem when 'xfce4' was opened as a new window.

git-bisect'ing identified

https://git.xfce.org/xfce/thunar/commit/?id=aa5f8fca0e6e965a9592da30c36d2fa4afe44746

as the culprit.


Digging into this revealed actually two problems here:



1) thunar_window_notebook_insert(ThunarWindow *window, ThunarFile *directory)
creates a copy of the history for the new tab to use. For newly created tabs,
these histories are exact copies, lacking a history entry for the directoy of
the original tab itself (this is what Michael already explained).


So the obvious solution would be to just add

thunar_navigator_set_current_directory(THUNAR_NAVIGATOR(history), directory);

after the copied history has been set on the new tab.


HOWEVER:


2) Things get really interesting, when you open multiple new tabs at once, say,
not only 'xfce' but also 'xml' and 'zoneinfo':

Within thunar_window_notebook_insert(...), the call

history = thunar_standard_view_copy_history (THUNAR_STANDARD_VIEW
(window->view));

does not copy the history from the "originating tab", but from the most
recently active tab.
Since tabs get "activated" from within thunar_window_notebook_insert(), in
effect the history

- for the 'xfce' tab initially is a copy of the "original" tab's,

- for 'xml' it's a copy of the 'xfce' tab's,

- for 'zoneinfo' it's a copy of the 'xml' tab's and so on



Due to this, the fix above causes every later opened tab to have a history
entry for its predecessor.

I'm not sure how to fix that one...


Cheers
Daniel

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list