[Bug 12403] New: Weird history behaviour when opening directory in new tab

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 12403] New: Weird history behaviour when opening directory in new tab

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

            Bug ID: 12403
           Summary: Weird history behaviour when opening directory in new
                    tab
    Classification: Xfce
           Product: Thunar
           Version: 1.6.10
          Hardware: PC (x86_64)
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Medium
         Component: general
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email], [hidden email]

When opening a directory in a new tab, the history of the previous tab is
copied into the new one, but the newly opened directory is not stored in the
history.

For example:
* Navigate to root ('File System')
* Navigate to the 'usr' directory
* Navigate to the 'share' directory

The top two entries should now say 'usr' and 'File System'.

* Right click the xfce4 directory and click on 'Open in New Tab'

Note that this new tab has the same history as the old one.

* Navigate to the 'applications' directory

Note that the 'share' directory has now been added to the history, but the
'xfce4' directory has not.  When you use the back button at this point, you
will indeed end up in /usr/share and not in /usr/share/xfce4.

This odd behaviour does not occur when opening a directory in a new *window*.


Expected behaviour:
* Opening a directory in a new tab should give the new tab a fresh history, as
in web browsers with tabs.
* The directory that is opened in the new tab should be recorded in the history
of that new tab.


Version info:
I am using version 1.6.10-2 on amd64, as provided by packages of Debian
Stretch.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Xfce-bugs mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce-bugs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

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

Michael <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Xfce-bugs mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce-bugs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugzilla.xfce.org/show_bug.cgi?id=12403

Vince C. <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Xfce-bugs mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce-bugs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugzilla.xfce.org/show_bug.cgi?id=12403

Daniel Reichelt <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from Daniel Reichelt <[hidden email]> ---

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.
_______________________________________________
Xfce-bugs mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce-bugs
Loading...