Closed nekohayo closed 4 months ago
Current situation:
Simulation of what it would like with the proposed approach (simulated using the GTK Inspector):
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.
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
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.