GNOME Bugzilla – Bug 147994
add a file open animation
Last modified: 2021-06-18 15:48:45 UTC
Description of Problem: When you open a file in nautilus by double-clicking on it, there is no notification that an application has just been launched. If the app takes a long time to initialize, we don't know if something is happening or not. I think nautilus should display a notification when the user double-click on a file to open it, just to let the user know something is happening. MacOS X does this with a little animation of the icon, like it's exploding and vanishing. Nautilus could re-use the animation from the panel, when a user clicks on a launcher (expanding boxes).
seems like this is because nautilus doesn't forward startup-notification which is probably related to bug 162424
Well I don't know... AFAIK startup-notification is to display a busy cursor while the application is launching. This bug is about nautilus displaying an animation when launching a file...
*** Bug 164181 has been marked as a duplicate of this bug. ***
"launching a file" ? what do you mean ? when you click on a file you launch an app to open it ...
Yes, indeed. And when that happens, I'd like to see some animation to show that my click did something. For example, if you click on a Word file, OpenOffice might launch, but there's no way to be sure your click was registered. On MacOSX, when you click on a file you get a nice animation of the file. I'd like to see at least the same animation that happens when you launch an application from the panel (expanding boxes).
Just to clear up my comment in #2 : startup notification is about letting the desktop know when an app is launched, to let it show something in the taskbar (ie "epiphany starting" or something like that) and set up the "busy" mouse cursor while launching. This bug is conceptually much simpler : it's just about getting some kind of visual feedback, an animation. In my mind, it should just require copy-and-pasting the animation code from the panel... but I might be wrong :)
You say that you want a notification, but you have just described 2 of them (taskbar and cursor). BTW here the panel doesn't move an icon when I click on them, it just changes the cursor ... is that an option somewhere ?
You're right, but unfortunately some applications do not follow the startup-notification thing... (IIRC, OpenOffice does not) So a little animation would help (and visually it's more interesting too ;)) You can see an example of startup notification in the taskbar in bug #166956 (attachment #37322 [details]). If this does not happen when you open a file in nautilus, it's another bug I was not aware of ;)
right
I'm trying to write a patch for this, but I'm having trouble finding the screen coordinates of the icon for a NautilusFile... What is the official way to do this ?
Created attachment 47148 [details] [review] starting point Here is a starting point for that feature. It only works on the desktop for now, but it works well and gives a good idea of what this feature could bring to nautilus. When you double-click a file on your desktop, you'll get a zooming box animation.
Created attachment 47150 [details] [review] much better patch Here is a much better patch that works in any window in Icon View. It doesn't work in list view yet.
Whoho! You know how much you rock, don't you? :)
Created attachment 47164 [details] [review] An experiment Just for kicks, here is a different version of the patch : with it nautilus shows the zooming boxes when you open files but also when you open nautilus folders (with the boxes zooming from/to the correct screen locations). Current problems with the patch : * It doesn't work for folders that have never been opened in nautilus before (e.g. a newly-created folder). I guess it's just a matter of calling xstuff_queued_zoom_animate in the correct place (in the present state, this can cause funny effects with zooms coming/going to incorrect places) * It doesn't work for "special" desktop folders (computer/mounted drives/trash). I guess it's just a matter of calling xstuff_queue_zoom at the right place. * It slows down the opening of folders a little as the folder has to wait before the animation is over to draw the folder. Other than that, it works pretty well.
Created attachment 47200 [details] [review] much better experiment This patch adds zooming boxes when opening a file or folder in all icon views (desktop, computer:///, trash, spatial or browsing mode...), with the animation coming and going to the right place. All the previous problems have been solved.
You've added code to fm-directory-view that only works for icon views. This breaks for other types of views, like the list view. the xstuff.c files seems to contains a lot of stuff that we aren't using. Also, that code is completely not in the nautilus coding style or namespace. Only the required functions should be non-static, and they should be in the nautilus namespace. Also, I slightly worry about the zoom animation and delays. Right now, on a fast machine the whole zoom takes 60 microseconds, this is really hard to see. However, we can't really extend it because the way the animation is done requires an X grab, and we don't want to have long X grabs. Furthermore, any increase of time makes actually opening a folder slower. For slow machines it slows down opening of a folder, and of fast machines its really hard to even see the zoom...
Vincent, do you think you can make an updated patch taking into account the feedback from Alexander above?
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.