files icon indicating copy to clipboard operation
files copied to clipboard

When opened with specific file to select, the view is not showing that file

Open davidak opened this issue 2 years ago • 4 comments

What Happened?

When i select "Open in File Browser..." in Rapid Photo Downloader, Files is opened and the file is selected, but it is not shown in the view. I have to scroll down to see it.

Demonstration Video: https://www.youtube.com/watch?v=QoJYM3_LbUE

Rapid Photo Downloader uses the Python Library show-in-file-manager to do it, which basically does:

io.elementary.files FILE

With that, the issue is easily reproducible.

Steps to Reproduce

  1. Open Terminal
  2. Open Files
  3. Copy this command in Terminal io.elementary.files, add a Whitespace
  4. Scroll down in a folder with many files in Files and drag-and-drop a file from far down into the terminal, to get it's full path
  5. Close Files
  6. Run the command in Terminal, e.g. io.elementary.files '/home/davidak/2023-06-10_14-28-09.mkv'
  7. Files is opened and you see the folder the selected file is in, you have to manually scroll down to see it

Expected Behavior

The view is scrolled automatically to show the selected file.

OS Version

Other Linux NixOS 22.11.4479.d4a9ff82fc1

Software Version

Older release (I have not run all updates) elementary-files-6.2.1

Log Output

No response

Hardware Info

No response

davidak avatar Jun 10 '23 13:06 davidak

The command line that the FileManager1 service uses is io.elementary.files -t [URL]. Using either command in a terminal works as expected for me provided Files is not already running. I find that if Files is already running and is already showing the required folder then it does not scroll to the requested item so there is an issue here. I am running the latest version but I do not think this part of the code was touched recently.

jeremypw avatar Jun 13 '23 09:06 jeremypw

Pushing to queue for fixes in the Gtk4 of Files.

jeremypw avatar Jul 07 '23 12:07 jeremypw

Decided to fix now as some Gtk3 work is still happening and it touches parts of the code that will not change in Gtk4.

jeremypw avatar Aug 09 '23 11:08 jeremypw

@davidak Are you able to test the linked PR? Unfortunately it has not attracted attention from reviewers yet.

jeremypw avatar Feb 04 '24 11:02 jeremypw