Conversation
lah7
left a comment
There was a problem hiding this comment.
Thanks! Seems like a good one to reinstate. Can confirm "Recents" now appears in save dialogs.
I observed one crash under ghex 3.41.1 by selecting "Recents" in the Save As dialog if another item on the sidebar isn't selected first. Because that risks data loss, I won't merge it just yet.
(ghex:5661): Gtk-CRITICAL **: 18:24:58.952: gtk_tree_model_get: assertion 'GTK_IS_TREE_MODEL (tree_model)' failed
Segmentation fault (core dumped) ghex
This video shows opening a file in ghex, doing a "Save As" and clicking "Recents" (window disappear = crash). Then repeated, but by selecting an item in the sidebar first, which doesn't crash.
Peek.2025-09-13.18-33.mp4
Other GTK apps I tried (Firefox, Meld, Disks) don't crash, but can't risk instability if someone accidentally clicks on it for any other random GTK 3 program.
|
I can have a look at this, but so far, I haven't been able to reproduce this error. I tried installing ghex 3.41.1 from the Ubuntu repos, but everything worked as expected. What distro are you using, and how did you install GHex? |
|
I'm using Arch Linux. Despite being a rolling release, I downgraded (and ignore updates) to an old package version of I'm not sure if the error is specific to me in that case because it's an old build (Dec 2021) despite working fine. I would try rebuilding the package (via its PKGBUILD) to see if compiling a fresh package under new stuff helps, but GNOME's GitLab is throwing 502 errors right now! I'll try again later. |
|
Despite GNOME GitLab down, I was able to take ghex_3.41.1.orig.tar.xz from the Ubuntu 22.04 |
|
It might be because you are running a newer version of GTK than I am. I can try to do some testing with different versions. |
|
I've updated my patch to remove all the code that was causing errors. According to the inline comments, this code was supposed to 'take the folder stored in a row in the recent_model, and put it in the pathbar', but the pathbar is in any case hidden when you are in 'recent' mode, and saving files seems to work fine without it. I did notice that saving files from 'recent' mode works different than when you are in regular mode: In 'recent' mode, if you mark a directory and press save, the file is saved immediately to that directory, while in regular mode you enter the directory instead of saving the file. This can be a bit confusing, so it should maybe be looked at, but I'm not sure what the intended behaviour is here. |
|
I see what you mean by the behaviour when a directory is selected in Recents while in save mode. It seems a minor inconsistency, but I think it's OK. Users like myself would naturally double click the folder. From looking at a GTK 2 application (GIMP), it's actually the same behaviour as you've described - clicking on a directory via Recents then "Save" doesn't enter the folder, but it would if browsing then selecting a folder → "Save". You're welcome to (or anyone can) improve upon the patch later if it feels unusual. We can also wait and see if anybody raises an issue about it. I'm happy for the behaviour to lean either way. |
lah7
left a comment
There was a problem hiding this comment.
Thank you for fixing! Can confirm: no more crashes.
|
I'm thinking that the 'save directly' behaviour is the most intuitive: When you click on a button saying 'Save', it's natural to assume that this will actually save the file, and not open a directory, and this also saves you an extra click. On the other hand, I guess people are used to the old behaviour, and may be confused by a change, so I'm not sure what is best. I checked the behaviour in GTK 2, and I can see that the pathbar is shown here after you select a directory in 'Recent' mode, which I think is nice as it makes it clearer where the files are saved to. Another thing that work better for me in GTK 2 is that the recent folders are sorted by Modified date instead of Accessed date as is the case in GTK 3. I use noatime in my file system, so access time for my directories never change, and sorting them by Accessed date therefore doesn't make any sense. There should maybe be an option for this, so you can switch between Modified and Accessed time based on your preferences and file system settings. I can try to make some updated patches for these issues, but I don't know when I'll find time for it. |
This PR bring back the 'Recent' option in save dialogs in the File Chooser by reverting commit fe128b5 from 2015.