GNOME Bugzilla – Bug 150672
Back button is broken
Last modified: 2004-12-22 21:47:04 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/.
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); }
fixed adding the locations visited using the back button to the history list.