pdfarranger / pdfarranger

Small python-gtk application, which helps the user to merge or split PDF documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface.
GNU General Public License v3.0
3.42k stars 208 forks source link

Full path+filename in headerbar's title makes it hard to read the filename #1085

Closed nekohayo closed 4 months ago

nekohayo commented 5 months ago

Currently, the app puts the entire combined path and filename into the headerbar's title property.

However, paths (especially nested) can be pretty long, and usually are not the main important thing, compared to the filename.

My suggestion would be to split the path from the filename, only show the filename in the headerbar's "title" property, and put the path (maybe stripping out the /home/theusername/ part of it, too) in HeaderBar's "subtitle" property.

nekohayo commented 5 months ago

Current situation:

Screenshot from 2024-04-16 14-39-03

Simulation of what it would like with the proposed approach (simulated using the GTK Inspector):

Screenshot from 2024-04-16 14-40-05

dreua commented 5 months ago

We aren't using the subtitle at all currently, are we? Sounds like a good idea to me, would you like to provide a PR? I wouldn't strip the /home/username/ part though. Feels arbitrary and unnecessary to me but that's just my opinion.

nekohayo commented 5 months ago

Personally, I feel like the exact homedir path (vs the ~ shorthand form) is just visual noise, and will be shown in 99% of situations unless someone is processing PDF files in /tmp/ or on a USB key. I don't see why they would need to see their own username and a system path, vs making it easier to recognize the actual folder path within the homedir...

I see @b-sharman already started a PR for it, nice :)

As for the matter about doing a if Handy check (from what I can see in the comments in that MR): I'm not very knowledgeable about how LibHandy plays into the picture, but I didn't think this would be dependent on LibHandy's presence, because the set_subtitle trick existed even in vanilla GTK3's HeaderBar: https://docs.gtk.org/gtk3/method.HeaderBar.set_subtitle.html