GNOME Bugzilla – Bug 762251
Scroll to the file that is going to be renamed
Last modified: 2018-06-17 00:10:45 UTC
When the rename popover opens. Seems we are not making sure to scroll to that point, which is inconvenient.Nautilus
(In reply to Carlos Soriano from comment #0) > When the rename popover opens. > > Seems we are not making sure to scroll to that point, which is > inconvenient.Nautilus I'm guessing 'nautilus_files_view_scroll_to_file' should be used to fix this. I tried using it and sometimes it works, sometimes it doesn't. For example, using it before 'nautilus_files_view_rename_file_popover_new' in list-view makes the UI freeze. Any idea what might cause this?
(In reply to Razvan Chitu from comment #1) > (In reply to Carlos Soriano from comment #0) > > When the rename popover opens. > > > > Seems we are not making sure to scroll to that point, which is > > inconvenient.Nautilus > > I'm guessing 'nautilus_files_view_scroll_to_file' should be used to fix > this. I tried using it and sometimes it works, sometimes it doesn't. For > example, using it before 'nautilus_files_view_rename_file_popover_new' in > list-view makes the UI freeze. Any idea what might cause this? indeed :) I was pondering for some time if this bug was really for newcomers. It is if you are willing to spend time debugging... basically this bug is good to learn how the management of "views/slot/loading of directories in the views" works, which is the most important and complex in the UI side. Track the load_directory and done_loading functions. Track also the invalidation of the selection and the display_new_files functions, that also clear the selection iirc. Then find at what time it should be called, or if it is a bug because some of that functions shouldn't clear the selection at some specific time.
Does the whole view need to move up/down to the highlighted file? I feel it shouldn't because the user would lose track of his current position. (Plus he doesn't see any new information by moving up/down to the highlighted file. We can just show the rename box which will have the file name pre-filled - this is the same information even if we move up/down.)
*** Bug 761721 has been marked as a duplicate of this bug. ***
> Plus he doesn't see any new information by moving up/down to the highlighted file. He does see new information: The file's icon and details (depending on the view) and also the files / folders around it.
Fixed by https://gitlab.gnome.org/GNOME/nautilus/commit/f48fe9702a1b60d79f88104d76c6fc2dad435ac8