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 745669 - desktop is 'cluttered'
desktop is 'cluttered'
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Desktop
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-05 11:13 UTC by Matthias Clasen
Modified: 2015-03-11 09:53 UTC
See Also:
GNOME target: 3.16
GNOME version: ---


Attachments
screenshot (589.62 KB, image/png)
2015-03-05 11:13 UTC, Matthias Clasen
  Details
desktop-canvas-view: reorder icons once after upgrading (4.72 KB, patch)
2015-03-06 18:07 UTC, Carlos Soriano
needs-work Details | Review
desktop-canvas-view: Reorder if icon size changes (7.92 KB, patch)
2015-03-10 15:57 UTC, Carlos Soriano
reviewed Details | Review
desktop-canvas-view: reorder if icon size changes (7.86 KB, patch)
2015-03-11 09:50 UTC, Carlos Soriano
committed Details | Review

Description Matthias Clasen 2015-03-05 11:13:17 UTC
Created attachment 298623 [details]
screenshot

Seeing this in classic mode with 3.15.91. I've been told to just 'organize my desktop' and that this was fallout from the default zoom level change. But coming up like this is just not acceptable.
Comment 1 Carlos Soriano 2015-03-05 11:16:44 UTC
So ideas are:
- create a separate zoom for desktop and match what we had previously.
- rearrange icons once the first time we start nautilus with this new version.

Cosimo, do you have any ideas?
Comment 2 Cosimo Cecchi 2015-03-06 00:46:14 UTC
One design question is whether the desktop should have the same default zoom level as the regular icon view:
- if not, I don't think we have many other choices than going for something like your first option here
- if so, is it ever desirable to store overlapping icon positions like that? Maybe the desktop metadata should also store which zoom level the icon positions were saved for, and force a rearrange when at startup the zoom level doesn't match anymore
Comment 3 Carlos Soriano 2015-03-06 12:47:30 UTC
(In reply to Cosimo Cecchi from comment #2)
> One design question is whether the desktop should have the same default zoom
> level as the regular icon view:
> - if not, I don't think we have many other choices than going for something
> like your first option here
> - if so, is it ever desirable to store overlapping icon positions like that?
> Maybe the desktop metadata should also store which zoom level the icon
> positions were saved for, and force a rearrange when at startup the zoom
> level doesn't match anymore

ok, so I think the *only* way forward is the second option.

The first option is a burden, and we will need to add some preference in nautilus UI to deal with the zoom of the desktop and that UI option will simply disappear when we do the split of the desktop and we won't have any way to configure it from the UI.

I'm implementing the second option. Mathias, does it sound fine to you?
Comment 4 Matthias Clasen 2015-03-06 12:51:41 UTC
> I'm implementing the second option. Mathias, does it sound fine to you?

I'm fine as long as the desktop comes up acceptably.
Comment 5 Carlos Soriano 2015-03-06 18:07:37 UTC
Created attachment 298747 [details] [review]
desktop-canvas-view: reorder icons once after upgrading

We changed the icons zoom levels meaning, which works fine on
the common nautilus window since the icons are positioned every time
we create a new view, etc.

The desktop view save the icon positions, so when we changed to a
larger size of icons by default the icons overlapped each one, looking
really bad for the people who update from an older version of nautilus.
This doesn't happen in clean installs, since there is not saved
positions of the icons.

To fix this rearrange the icons the first time Nautilus is run in the
installed system. For fresh install it won't affect nothing, since
the position of the icons already match what this does. For upgrades it
will re-position icons sorted by name. I think this is the less evil of
the options.
Comment 6 Carlos Soriano 2015-03-06 18:09:20 UTC
(In reply to Cosimo Cecchi from comment #2)
> One design question is whether the desktop should have the same default zoom
> level as the regular icon view:
> - if not, I don't think we have many other choices than going for something
> like your first option here
> - if so, is it ever desirable to store overlapping icon positions like that?
> Maybe the desktop metadata should also store which zoom level the icon
> positions were saved for, and force a rearrange when at startup the zoom
> level doesn't match anymore

The desktop view is actually more or less adapting to new changes on the zoom.
The problem now is that the zoom didn't change...we changed the icons sizes, so it's not adapting the new size as we would like to.

So for that, I think we need even less, just reorder the first time we run nautilus in the installed system.
Comment 7 Cosimo Cecchi 2015-03-09 16:45:34 UTC
Review of attachment 298747 [details] [review]:

Using GSettings is really wrong for this; the desktop metadata is saved in a keyfile already though (see libnautilus-private/nautilus-desktop-metadata), so the way I was imagining this could work is to also save the desktop icon size in the keyfile. When the value is missing or does not match the one we would lay out with, a rearrange is triggered.
Comment 8 Carlos Soriano 2015-03-10 15:57:15 UTC
Created attachment 299017 [details] [review]
desktop-canvas-view: Reorder if icon size changes

We changed the icons zoom levels icon sizes, which works fine on
the common nautilus window since the icons are positioned every time
we create a new view, etc.

The desktop view save the icon positions, so when we changed to a
larger size of icons by default the icons overlapped each one, looking
really bad for the people who update from an older version of nautilus.
This doesn't happen in clean installs, since there is not saved
positions of the icons.

To fix this rearrange the icons every time we found that the icons were
stored with a icon size different than what we have now or if we don't
have this metadata available.
That will only happen the first time the user runs nautilus with this
patch, since that key of the metadata won't be available; or every time
we change the hardcoded icon sizes for the zoom levels.
Comment 9 Cosimo Cecchi 2015-03-10 23:49:22 UTC
Review of attachment 299017 [details] [review]:

Thanks Carlos, looks mostly good to me now.

::: libnautilus-private/nautilus-metadata.h
@@ +41,3 @@
 #define NAUTILUS_METADATA_KEY_ICON_VIEW_KEEP_ALIGNED            "nautilus-icon-view-keep-aligned"
 #define NAUTILUS_METADATA_KEY_ICON_VIEW_LAYOUT_TIMESTAMP	"nautilus-icon-view-layout-timestamp"
+#define NAUTILUS_METADATA_KEY_ICON_VIEW_ICON_SIZE           "nautilus-icon-view-icon-size"

I'd rather this was namespaced to explicitly mention the desktop.

::: src/nautilus-desktop-canvas-view.c
@@ +270,3 @@
+	NautilusFile *file;
+
+	gchar *stored_size_icon;

I think you could return early and avoid doing work if all_files_seen is FALSE

@@ +366,2 @@
 static void
+set_up_zoom_level (gpointer user_data)

This should take a NautilusDesktopCanvasView

@@ +395,1 @@
 	nautilus_canvas_container_set_zoom_level (get_canvas_container (desktop_canvas_view),

This should call set_up_zoom_level()
Comment 10 Carlos Soriano 2015-03-11 09:50:52 UTC
Created attachment 299081 [details] [review]
desktop-canvas-view: reorder if icon size changes

We changed the icons zoom levels icon sizes, which works fine on
the common nautilus window since the icons are positioned every time
we create a new view, etc.

The desktop view save the icon positions, so when we changed to a
larger size of icons by default the icons overlapped each one, looking
really bad for the people who update from an older version of nautilus.
This doesn't happen in clean installs, since there is not saved
positions of the icons.

To fix this rearrange the icons every time we found that the icons were
stored with a icon size different than what we have now or if we don't
have this metadata available.
That will only happen the first time the user runs nautilus with this
patch, since that key of the metadata won't be available; or every time
we change the hardcoded icon sizes for the zoom levels.
Comment 11 Carlos Soriano 2015-03-11 09:52:58 UTC
Comment on attachment 299081 [details] [review]
desktop-canvas-view: reorder if icon size changes

pushed with the (silly mistakes)changes fixed, thanks Cosimo!

Attachment 299081 [details] pushed as e0081be - desktop-canvas-view: reorder if icon size changes