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 734755 - Mismatch between sidebar selection and content view / path bar
Mismatch between sidebar selection and content view / path bar
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Sidebar
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-14 00:26 UTC by Allan Day
Modified: 2021-06-18 15:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: set places sidebar to the previous location on error (5.76 KB, patch)
2015-04-30 15:49 UTC, Georges Basile Stavracas Neto
none Details | Review
window: set places sidebar to the previous location on error (5.76 KB, patch)
2015-04-30 17:15 UTC, Georges Basile Stavracas Neto
none Details | Review
window: set places sidebar to the previous location on error (5.81 KB, patch)
2015-05-05 11:12 UTC, Georges Basile Stavracas Neto
none Details | Review
window: set places sidebar to the previous location on error (5.88 KB, patch)
2015-05-05 20:25 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Allan Day 2014-08-14 00:26:57 UTC
If I select an item in the sidebar that cannot be displayed, or is in the process of being loaded, the path bar and content view don't update. For example:

 * Select an unmounted volume, then cancel the authentication dialog that pops up. The volume is still selected in the sidebar, yet the path bar and content view show the previous location.

 * Select a network location which you can't connect to. After a while, an error dialog pops up. After dismissing the dialog, the previous location is again displayed in the pathbar and content view, even though the location is still selected in the sidebar.

To deal with this, we could:

 * Always make sure that the pathbar corresponds to the selected item in the sidebar.

 * Show a progress spinner in the content view if loading is taking a while.

 * Show an "unable to connect" or "volume not mounted" message in the content view, if the content of the location cannot be displayed.
Comment 1 Allan Day 2014-09-19 12:47:37 UTC
3.14 is over - move to the 3.16 target milestone.
Comment 2 Georges Basile Stavracas Neto 2015-04-30 15:49:32 UTC
Created attachment 302672 [details] [review]
window: set places sidebar to the previous location on error

By using nautilus_window_slot_open_location, we're ignoring
any error that can happen opening the location. This is needed
in order to return to the previous location when an error
happens.

By exporting the display_view_selection_failure function, we
can keep showing the error message related to the window slot.
Comment 3 Georges Basile Stavracas Neto 2015-04-30 17:15:30 UTC
Created attachment 302683 [details] [review]
window: set places sidebar to the previous location on error

By using nautilus_window_slot_open_location, we're ignoring
any error that can happen opening the location. This is needed
in order to return to the previous location when an error
happens.

By exporting the display_view_selection_failure function, we
can keep showing the error message related to the window slot.
Comment 4 Carlos Soriano 2015-05-04 12:48:16 UTC
Review of attachment 302683 [details] [review]:

The commit messages doesn't need to express every code change (like exposing some function or that we are going to use a different function).
Also this part is not clear "This is needed in order to return to the previous location when an error happens." (where? I though Nautilus did something when an error happens! Ah, on the sidebar? ok =) )
Although the title of the commit message is clear.

I would go with something like:
title (this one is already good)

(context) When gtk places sidebar reporterd a clciked location, we were opening that location on nautilus withouth further interaction with the sidebar.
(what happens, the problem) The problem is, if a location cannot be loaded, the nautilus view fallback to a previous location, but since we weren't interacting anymore with the sidebar, the selected row on the sidebar was still the one that the user selected that cannot be loaded.
(how you fix it) To fix it, set the previous location to the sidebar as well if there was some error on loading.

::: src/nautilus-window.c
@@ +998,3 @@
+
+	if (error) {
+                                 gpointer        user_data)

old_file. Nautilus use "file" for NautilusFile and "location" for the GFile.

Unfortunate, but better to keep the consistency.
Comment 5 Georges Basile Stavracas Neto 2015-05-05 11:12:11 UTC
Created attachment 302918 [details] [review]
window: set places sidebar to the previous location on error

Nautilus opened the location notified by GtkPlacesSidebar
whithout too much interaction with it.

With that, when a location fails to be opened, Nautilus
goes back to the previous valid location but, because of
the lack of interaction with the sidebar, it was not
updated to match the location.

To fix it, se the previous valid location to the sidebar
as well if there's some error loading a location.
Comment 6 Carlos Soriano 2015-05-05 19:57:10 UTC
Review of attachment 302918 [details] [review]:

The commit message is still a little confusing...

"whithout too much interaction with it"

 what does that mean? not too much? See how I wrote before "we were opening that location on nautilus withouth further interaction with the sidebar"

"but, because of
the lack of interaction with the sidebar, it was not
updated to match the location."

what was not updated? to match the location of what? lack of interaction before or after or what do you mean? the wording is a little confusing. see how I wrote "but since we weren't interacting anymore with the sidebar, the selected row on the sidebar was still the one that the user selected that cannot be loaded."

the last sentence looks fine.
Code looks fine.
Comment 7 Georges Basile Stavracas Neto 2015-05-05 20:25:30 UTC
Created attachment 302945 [details] [review]
window: set places sidebar to the previous location on error

Actually, Nautilus opens the location notified by GtkPlacesSidebar
without further interaction with it.

With that, when a location fails to open, Nautilus goes
back to the previous valid location but, because of we're
not interacting with the sidebar after the failure, the
sidebar was not updated to match these changes, i.e. kept
the old invalid row selected.

To fix it, set the previous valid location to the sidebar
as well if there's some error loading a location.
Comment 8 Carlos Soriano 2015-05-06 07:18:28 UTC
Review of attachment 302945 [details] [review]:

NOW!!! =D

Delete the "Actually" In the first sentence tho. "Actually" here sounds incorrect.

Be aware that the bug is not fixed, there are other issues Allan posted.
Comment 9 Georges Basile Stavracas Neto 2015-05-07 18:03:39 UTC
Comment on attachment 302945 [details] [review]
window: set places sidebar to the previous location on error

Attachment 302945 [details] pushed as 4059969 - window: set places sidebar to the previous location on error
Comment 10 André Klapper 2021-06-18 15:49:29 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of Files (nautilus), then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/nautilus/-/issues/

Thank you for your understanding and your help.