After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 150672 - Back button is broken
Back button is broken
Status: RESOLVED FIXED
Product: file-roller
Classification: Applications
Component: general
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2004-08-20 21:25 UTC by Ken Harris
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ken Harris 2004-08-20 21:25:40 UTC
1.  Open an archive with folders.  For example, go to http://fileroller.sf.net/
and click the "download" link, and choose to open it with File Roller.

2.  File Roller opens, and shows the folder ('file-roller-2.6.1').  Double-click
it.  Now, double-click another folder to open it, like 'src'.  (You're now in
/file-roller-2.6.1/src/)  Now click 'Back'.

3.  Now double-click a different folder, like 'component'.  Now click 'Back' again.

You would expect that going Back here would put you back in /file-roller-2.6.1/,
but you end up in /file-roller-2.6.1/src/ again.  You have to click Back a
second time to go back to /file-roller-2.6.1/.
Comment 1 Ken Harris 2004-08-20 22:06:12 UTC
I took a quick glance at the source code.  Here's my guess, based on looking at
the code for about 5 minutes:

The bug appears to be in src/window.c, function _window_history_add(), around
line 121.  There's a list, window->history, and a ptr into that list,
window->history_current.  When the user goes to a new folder, file-roller simply
prepends the new path to window->history, and sets window->history_current to
the same thing.  It *should* (but doesn't?) check to see if
window->history_current is the front of the list, and if it isn't, to delete
everything in window->history that comes before it.

My situation looks like this:

          src --- file-roller-2.6.1 --- /
          ^       ^
          |       |
          |       window->history_current
          |
          window->history

(You descended from / into file-roller-2.6.1, then into src, then back up one.)

What it's doing right now, when you descend into the folder 'component', is
simply prepending 'component' to the front (left) of this list, and setting
window->history and window->history_current to that new node.

So I'm thinking a solution would be to add something like this right after line 120:

    while (window->history != window->history_current) {
        window->history = g_list_delete_link(window->history, window->history);
    }
Comment 2 Paolo Bacchilega 2004-08-21 06:30:44 UTC
fixed adding the locations visited using the back button to the history list.