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 785323 - Sidebar visibility setting should be persistent
Sidebar visibility setting should be persistent
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Sidebar
3.22.x
Other Linux
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-23 20:35 UTC by Jason Crain
Modified: 2017-08-17 13:59 UTC
See Also:
GNOME target: ---
GNOME version: 3.21/3.22


Attachments
Save-sidebar-visibility-state.patch (1.66 KB, patch)
2017-07-23 21:45 UTC, Jason Crain
none Details | Review
Save-sidebar-visibility-state.patch [g_settings_bind_with_mapping] (4.12 KB, patch)
2017-08-15 04:50 UTC, Jason Crain
committed Details | Review

Description Jason Crain 2017-07-23 20:35:49 UTC
Forwarding from https://bugs.debian.org/869269
----------

The sidebar (inactive) option between sessions is not maintained

* What led to the situation? Uncheck sidebar via "Preferences" from the
nautilus menu. During the session the configuration is maintained, but
in the next session that starts, the sidebar reappears.
* What exactly did (or did not) do that was effective
ineffective)? Override the sidebar through the nautilus "preferences"
menu. Standard user.
* What was the result of this action? The sidebar remains hidden during
the session.
* What result did you expect instead? When you re-open session on the
same user perform the view configuration without sidebar in the
nautilus windows.

----------

I can confirm that on Debian with nautilus version 3.22.3-1, changing the Sidebar option in the AppMenu does not save this setting to dconf and closing and relaunching nautilus does not remember the state of the sidebar.  I think it would make sense for the sidebar visibility setting to persist.
Comment 1 Jason Crain 2017-07-23 21:45:01 UTC
Created attachment 356247 [details] [review]
Save-sidebar-visibility-state.patch

This patch saves the sidebar state to the "start-with-sidebar" key whenever the sidebar visibility changes.  Though there are more complicated ways this could be done such as with g_settings_bind_with_mapping.
Comment 2 Carlos Soriano 2017-08-07 11:00:01 UTC
Review of attachment 356247 [details] [review]:

Hey Jason, thanks for your work!

I definitely like your proposal for using g_settings_bind_with_mapping, could you?
Comment 3 Jason Crain 2017-08-15 04:50:36 UTC
Created attachment 357605 [details] [review]
Save-sidebar-visibility-state.patch [g_settings_bind_with_mapping]

(In reply to Carlos Soriano from comment #2)
> I definitely like your proposal for using g_settings_bind_with_mapping,
> could you?

This patch uses g_settings_bind_with_mapping to save the sidebar state. This listens for GAction's notify::state signal instead of using the change_state callback because the callback is not called when 'bind' changes the state.
Comment 4 Carlos Soriano 2017-08-15 19:02:27 UTC
Review of attachment 357605 [details] [review]:

Looks good, thanks!!