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 41671 - Desktop lacks auto-arrange/'snap to grid'
Desktop lacks auto-arrange/'snap to grid'
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Desktop
2.0.x
Other Linux
: High enhancement
: future
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 41020 41663 42093 47791 62512 72889 79060 93883 105967 109802 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2000-07-14 23:09 UTC by arlo
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
README file about my algorithm and the tarball of octave code (4.00 KB, text/plain)
2003-01-21 21:57 UTC, Elijah Newren
  Details
gzipped tarball of octave code with a snap-to-grid implementation (11.45 KB, application/octet-stream)
2003-01-21 21:58 UTC, Elijah Newren
  Details
Patch for Nautilus 2.2.3.1 that implements Snap to Grid *and* Automatic Layout for desktop (26.24 KB, patch)
2003-04-16 13:47 UTC, Hongli Lai
none Details | Review

Description arlo 2001-09-10 00:33:59 UTC
This should be added as an option into the desktop specific context 
menu.



------- Additional Comments From arlo@workthatmouse.com 2000-07-14 20:24:28 ----

*** Bug 41663 has been marked as a duplicate of this bug. ***



------- Additional Comments From darin@bentspoon.com 2000-07-18 17:10:34 ----

The trick here is deciding exactly what we want in the context menu. Once you've
decided on the items, assign back to me and I can do it quickly.



------- Additional Comments From arlo@workthatmouse.com 2000-07-23 19:01:17 ----

I'm not sure what this has to do with the desktop Context menu... but I'll 
lump it in with that task.

My original bug was mainly the lack of the feature, not where it needed to 
go (though my description isn't very clear about that).



------- Additional Comments From sullivan@eazel.com 2000-07-24 12:16:42 ----

It seems there is some confusion with the Desktop and arranging icons.

The simplest approach is to only have manual layout on the desktop for version
1.0. I personally think this is fine for our first release, and can be improved
in a subsequent release. So I would vote for deferring all the related work.

If (for this or a future release) we want more than manual layout, then we need
to solve the UI problems of how to specify arranging one-time-only or arranging
automatically on the desktop, where the normal menus aren't available.
Presumably this can only be done with the context menu, so the context menu
would have to include all the arranging choices and options. That's a lot of
stuff to squeeze into one menu, and we'd need to think carefully about what
exactly to include and not to include in this menu to avoid making it huge and
unwieldy.

But I vote for postponing that thought until post-1.0.



------- Additional Comments From arlo@workthatmouse.com 2000-07-25 16:57:38 ----

I'm setting the hours on this one to zero since it's basically part of bug 
41063 in terms of my doing the work.



------- Additional Comments From sullivan@eazel.com 2000-07-26 12:33:18 ----

Bug 41063 describes the menu items Arlo would like in the Desktop context menu.
This bug represents not just getting the auto-position menu items into the menu,
but solving the problems with auto-arrangement on the fixed-size desktop. Since
the size is fixed, we can't rely on scrolling to reveal the remaining icons when
there are too many to fit in the fixed space, so the icon-arranging algorithm
will have to be different than the one used elsewhere. Also, the desktop's
icon-arranging algorithm would have to respect the special positions desired for
some icons (bug 41670). I personally would still vote not to do this feature for
our first release at this stage in development.



------- Additional Comments From gzr@eazel.com 2000-08-10 10:46:55 ----

*** Bug 42093 has been marked as a duplicate of this bug. ***



------- Additional Comments From eli@eazel.com 2000-10-16 20:12:56 ----

Batch-assigning QA ownership of remaining bugs to eli@eazel.com



------- Additional Comments From eli@eazel.com 2001-02-09 11:28:29 ----

Duane is now the proud owner for Desktop QA.



------- Additional Comments From eli@eazel.com 2001-03-26 11:19:46 ----

SPAAAAAAAAAM! 

(Jon Allen has taken these components; QA Assigning bugs to him.)



------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-09-09 20:33 -------
Bug depends on bug(s) 41670.

The original reporter (arlo@workthatmouse.com) of this bug does not have an account here.
Reassigning to the exporter, unknown@bugzilla.gnome.org.

Comment 1 Benedikt Roth 2001-10-28 15:57:55 UTC
*** Bug 62512 has been marked as a duplicate of this bug. ***
Comment 2 Benedikt Roth 2001-10-28 16:09:09 UTC
*** Bug 47791 has been marked as a duplicate of this bug. ***
Comment 3 Luis Villa 2002-02-14 03:19:21 UTC
*** Bug 41020 has been marked as a duplicate of this bug. ***
Comment 4 Luis Villa 2002-02-14 03:22:47 UTC
This is the most frequently requested feature for nautilus of which
I'm aware. The lack of a 'snap to grid' feature makes the desktop
extremely hard to organize and/or clean up, and that makes one of the
biggest chunks of functionality much less useful. Or to put it another
way, from the discussion in
http://news.gnome.org/gnome-news/1013375702/index_html :
---
ETA for nautilus to ...
by h on Tuesday February 12, @01:26PM
incorporate a 'snap to grid' feature in desktop view:

300 years

incorporate a 'mail file to' feature by right clicking :

1000 years

hey who cares about such shit, if we can browse gopher and listen to
mp3's with our filemanager...
finally i can browse gopher and listen to mp3's !!!!

THANKS NAUTILUS
blowing off steam
---
Taking of my 'mr-nice-guy' bugmaster hat, I couldn't agree more. 
Comment 5 Luis Villa 2002-02-14 03:23:39 UTC
*** Bug 41020 has been marked as a duplicate of this bug. ***
Comment 6 Konstantin Riabitsev 2002-02-14 04:04:29 UTC
I would have to agree with Luis. Some people like their desktop items
meticulously aligned "just right". I'm one of those people and
snap-to-gird would have been reeel nice...
Comment 7 seth vidal 2002-02-14 05:20:33 UTC
I have to say ditto to konstantin and luis - this one needs to be
promoted in importance imo.
Comment 8 Luis Villa 2002-03-02 03:34:13 UTC
*** Bug 72889 has been marked as a duplicate of this bug. ***
Comment 9 Luis Villa 2002-03-02 03:34:57 UTC
From the last bug, a discussion of usability issues:
----

For users who have alot of icons on their desktop, the "clean up by name"
arrangement feature in the desktop right click menu is suboptimal,
since it
only provides one way to arrange the icons on your desktop. The "layout
items" in the icon view right click menu should be used in the desktop
right click menu instead.




------- Additional Comments From bordoley@msu.edu 2002-02-27 20:43 -------

I know we're in a ui freeze right now, but the gnome2 usability team
lists this as a gnome2 must-fix.

http://developer.gnome.org/projects/gup/proposals/nautilus.html

> *  There need to be more options to arrange icons on the desktop
>rather than just "Clean Up By Name." REASON: GNOME 1.2 had a "tidy
>icons" feature which would allow you to simply align the icons
>(keeping their general location) to make them appear more cleanly
>placed. Currently, in nautilus, the only way to "tidy icons" is to
>arrange them all on the left side of the screen, by name.

So i would like to suggest that the priority of this raised be to
high. Perhaps we need to add some other options to the "layout items"
option for the desktop as well.
Comment 10 John Fleck 2002-09-22 15:37:32 UTC
*** Bug 93883 has been marked as a duplicate of this bug. ***
Comment 11 Dave Bordoley [Not Reading Bug Mail] 2002-11-01 15:45:37 UTC
*** Bug 79060 has been marked as a duplicate of this bug. ***
Comment 12 Mike Hearn 2002-11-13 11:02:37 UTC
Are there any plans for this at all? Alex? Dave? Anybody??
Comment 13 Dave Bordoley [Not Reading Bug Mail] 2002-11-13 11:11:33 UTC
Show us the code. I think one reginald is working on some sort of
automatic snap to grid feature.
Comment 14 Elijah Newren 2003-01-13 16:57:37 UTC
I've become interested in this feature and am adding myself to the cc
list.  I have some ideas on how this might be implemented, and believe
I may be able to come up with a solution (but then again, I'm a linux
and gnome newbie with plenty of work on my (math) degree to do, so I
may be pretty slow).  I'm going to test out my ideas some more to see
whether they're actually feasible--if they are, I'll share what I've
thought of and been working on.

Also, I'm going to change the version from unspecified to 2.0.x while
I'm at it.
Comment 15 Aschwin van der Woude 2003-01-13 18:30:40 UTC
I have a related idea. I am not sure if it has any value or
usefulness, but I just want to share the thought.

Perhaps we could introduce the idea of regions on the desktop. Most
people would like to have their desktop tidy. And these regions might
help keeping it that way.

The idea is to be able to define regions on the desktop either through
an gui-interface or part of the background theme or otherwise by just
editing some XML-file or whatever.
These regions could be assigned to for instance Devices or newly
created folders or files. So when new folders/files/devices appear
they won't get scattered where there is room. Instead they would be
placed in their own region.

I can think of a reason to have more than one region at the moment,
except for tidying up icons. When you tidy all icons they could be
refilling the regions starting at the top left corner of the regions
for instance.
These regions should perhaps be defined to be relative to the
resolution of the screen, so when the resolution changes. The icons
are still relatively in the same place.

Perhaps there would even be operation on regions, like move to folder.
This way I could have some files I work on on the desktop until I am
done with them.
If that would be handy the opposite 'move to desktop' would be handy
to start working on some project.

I have no idea how this would visually look like nor how such system
would be configured. But I can imagine these regions can be nicely
combined with a fitting background image.

Ok this wasn't really close to snap-to-grid, but is about the desktop
functionality. And I have got my thoughts out here.
Comment 16 Elijah Newren 2003-01-13 18:57:08 UTC
That sounds interesting, Aschwin, but I'm worried that it may be
overly complex (there's plenty of options already to confuse the
newbie).  However, some of the ideas (having icons in the upper right
or lower right corner, for example) definitely have merit--they're
similar to the  suggestions/requests by others in bugs 41670, 76337,
and 45953 (mostly the last two comments of 45953--especially tigert's).

Note that my ideas for snap-to-grid would allow icons to remain in the
upper right or bottom right corners, making all those requests
feasible.  (Bottom-left corner may not be possible, at least not with
the algorithm I have so far).  I'm working on this right now, and I'm
thinking that it looks like it will work; though it  may have some
minor drawbacks (which I'll post as well, if I can get this to work).
Comment 17 Aschwin van der Woude 2003-01-13 19:40:12 UTC
In my opinion it is import to be able to react sanely to changes in
resolution. 
Perhaps the higher resolution position should always be saved, and
when the use changes to a lower resolution the icons obscured could
snap to a border and arrange themselves relatively to eachother.
When a higher resolution is used, are shown in there original locations.

This also sounds overly complex. An other solution is to keep track of
icon-location per resolution. But that might cause confusion too.
Comment 18 Elijah Newren 2003-01-13 20:02:26 UTC
Ouch.  You just had to make things difficult didn't you?  My algorithm
won't handle off the screen icons, and changing resolutions could
possibly cause problems (whether done by modifying the XFree86Config
file or the Ctrl-Alt(+/-) method) if icons don't remain on the screen.
 I could probably work around this, but it'd be easier to make sure
all icons were on the screen before my algorithm is run.  This being
the case, I think we may be getting a little off-topic for this
bug--there's already a bug for changing resolutions moving icons off
the screen: bug 47943.  Of course, having icons in corners by default
could make the icon off the screen problem occur more often for people
who change resolutions--I'll make a note of this in bug 47943.

Anyway, most comments about changing resolutions and icons being on
the screen should probably go in that bug, so this bug can be kept
just for the 'snap-to-grid'/'Arrange Icons To Grid'/'Whatever funny
name you want' feature.
Comment 19 Elijah Newren 2003-01-21 21:56:54 UTC
Well, it looks like my ideas have at least some merit.  As I thought
about it more, though, my original idea for handling icons in the
corners and such won't work all that well.  I'm not sure I could do it
correctly as a human in every case, so I can't write a program to do
it.  However, the idea mentioned later, namely having negative
locations for icons, may work for this.  Anyway, this is
unimplemented, as are some other things.  But I do have the basic idea
implemented in octave (makes for easy graphing which provides nice
feedback for debugging and understanding the algorithm).  It's sort of
ugly (as can be expected when your only data structure is a matrix),
but it works.

I'll try to get around to implementing this in C before too long and
incorporating this into nautilus.  Of course, I'll have to learn how
to build nautilus and get a bunch of values I need too (which are
currently hard-coded).  I've got a lot of schoolwork (which I've been
postponing), so it may be a while before I get back to this.  But I'll
post what I have as an attachment so that other really curious people
can play around with it.
Comment 20 Elijah Newren 2003-01-21 21:57:45 UTC
Created attachment 13729 [details]
README file about my algorithm and the tarball of octave code
Comment 21 Elijah Newren 2003-01-21 21:58:40 UTC
Created attachment 13730 [details]
gzipped tarball of octave code with a snap-to-grid implementation
Comment 22 John Fleck 2003-02-13 17:16:20 UTC
*** Bug 105967 has been marked as a duplicate of this bug. ***
Comment 23 Diego González 2003-03-07 08:43:58 UTC
This message has a patch attach that implements the snap to grid
feature,  I have not tested them.

http://mail.gnome.org/archives/nautilus-list/2002-October/msg00166.html

I think there was another patch sent to the list, but i can't find it
Comment 24 Mike Hearn 2003-03-12 11:00:15 UTC
Am I right in assuming this bug hasn't been looked at lately because
Nautilus is in feature freeze? If so, I think it could be argued this
falls into UI cleanup/bugfixes :)
Comment 25 Alex Duggan 2003-04-02 19:55:16 UTC
*** Bug 109802 has been marked as a duplicate of this bug. ***
Comment 26 Elijah Newren 2003-04-02 21:26:11 UTC
I haven't bothered looking at this ever since Diego's post--I figured
someone else was doing it.  Besides, I'm too busy...
Comment 27 Hongli Lai 2003-04-16 13:47:17 UTC
Created attachment 15768 [details] [review]
Patch for Nautilus 2.2.3.1 that implements Snap to Grid *and* Automatic Layout for desktop
Comment 28 Dave Camp 2003-04-30 18:33:22 UTC
First, thanks for the patch, and sorry it took so long to review.
I've been working on a snap to grid patch myself, and am taking some
of the ideas from your patch into consideration.

Some comments on the behavior of this patch:

My first concern is that "clean up by name" doesn't leave icons in
positions that snap well.  A "clean up by name" followed by a "snap to
grid" leaves overlapping icons.  This worries me a bit, nautilus
should try to avoid making icons overlap itself. Ideally a "clean up
by name" would leave things pre-snapped.

My gut reaction is that having a variable-sized grid will be confusing
to users.  Comments on gnomedesktop.org seem to confirm this.

Centering icons on the grid works well vertically, but can cause skew
horizontally.  Since icons are of different height, and text can have
a variable number of lines, you can get icons that look like they're
not lined up.  In the normal icon view we align the baseline (the
bottom of the icon) to make this look good.

The "Cleanup by Position" menuitem seems out of place.  If people want
that, they can probably just use Automatic Layout.

Automatic layout is an interesting idea.  I don't have that in my
patch, but it might be worth considering.

And a few comments about the code itself:

It didn't build cleanly with -Werror, please make sure patches build
without warnings when submitting.

icon_set_position2() looks identical to icon_set_position() but
without the width and height calculation.  Since it looks like those
values aren't used anyway, we should probably just take them out of
icon_set_position().  I'll commit that, thanks for the catch.

It looks like you added the /* Get container dimensions */ block to
lay_down_icons_tblr on accident.

My patch is almost there, I'll send it to you when I'm done so you can
comment on it.  Thanks again for the patch.


Comment 29 Dave Camp 2003-05-03 23:46:30 UTC
"Keep Aligned" mode committed to HEAD.