Improve New Folder dialog
Setup:
- Geeqie version: Geeqie 2.5+git20250218-9f73b6cb GTK3
Description:
As long as I use Geeqie (and probably GQview), the New Folder dialog has two things to fix:
- the default folder name is not selected so the user cannot type the new name immediately
- window is unnecessarily narrow - it would be good to adjust its size
Why not use standard GTK create folder dialog?
gtk_file_chooser_dialog_new() with GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER.
Why not use standard GTK create folder dialog?
The shortcuts pane contents are those set by the user and are specific to Geeqie There is a "dot" shortcut, which was requested by a user The entry box has tab completion The entry box has a drop-down for recent folders
If the standard dialog was user here, all the others should change also. The advantage is a standardized look for dialogs. However, I feel that the Geeqie version has advantages.
window is unnecessarily narrow - it would be good to adjust its size
Go to Edit/Preferences/Windows and select Remember Dialog Window Positions. If you resize the dialog window size, it will be set to that on next call.
window is unnecessarily narrow - it would be good to adjust its size
Go to
Edit/Preferences/Windowsand selectRemember Dialog Window Positions. If you resize the dialog window size, it will be set to that on next call.
Thank you, it's enough for me - I hadn't noticed this before. Anyway I still wonder why the default size is like this.
The advantage is a standardized look for dialogs.
Would be great if dialogs were standard not only inside one application but across whole desktop environment or at least GTK applications.
There is a "dot" shortcut, which was requested by a user
There is gtk_file_chooser_add_shortcut_folder() function.
The entry box has tab completion
Probably could be implemented via gtk_file_chooser_set_extra_widget().
The entry box has a drop-down for recent folders
Probably could be implemented via gtk_file_chooser_add_choice().
I'm not insist on rewriting though.
* the default folder name is not selected so the user cannot type the new name immediately
Let me note that this issue is relatively new (i.e. one or two years old). I concur that it is quite irritating...
The latest sources use gtk_file_chooser_dialog_new .
The user interface is different.
Yeah, sorry. I forgot how it looked before. My comment was misleading. It was part of GTK4 migration (precisely commit 19c110d5de9787ca7a67f1af85d19bbdf5a5d513 I think) which replaced the old simple dialog. I also didn't compile Geeqie since yesterday and missed the last change. However new version is in my opinion even worse: to create a directory I need to do now several mouse clicks. The dialog essentially duplicates part of Geeqie interface for no reason. Moreover pressing enter to accept file name is not enough. I need to press it several times while Geeqie goes through different parts of this dialog. I liked the old solution: simple window asking for the name.
Since users have different tastes, maybe there should be two approaches: File->New folder should pop-up this new fancy dialog. On the other hand RMB on the directory view -> New folder should just pop-up a dialog to enter the name, since it is natural that that's where user wants to create the directory.
Apart from necessary changes for GTK4, I thought it useful to try to make the dialogs compatible with the system dialogs - to reduce user confusion. However there are any number of projects running on any version of whatever, so there will always be confusion.
I need to do now several mouse clicks
It is necessary to click on the Create Folder button in the new dialog. There used to be GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER, but that was deprecated in GTK4. The reasoning from the GTK developers is that GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER should be used and that "the user just clicks the Create button".
This button has no signal to connect to, so cannot be closed on carriage-return. The advantage is that several folders can be created in one go.
On the other hand RMB on the directory view -> New folder should just pop-up a dialog to enter the name, since it is natural that that's where user wants to create the directory.
The dialog does open in the directory the mouse is over in the folders pane, and not on the folder displayed in the images pane.
[Also, there is a "preview widget" for this dialog. This is really useful for showing GtkImage previews in a dialog. This feature is deprecated in GTK4. The developers' suggestion is "the programmer can create their own dialog"]
Things like dialog window positioning is gone in Wayland, anyway.
This button has no signal to connect to, so cannot be closed on carriage-return. The advantage is that several folders can be created in one go.
Actually, it seems it is somewhat closed after enter. It just doesn't refresh the interface till some other even happens. For example, I click on the button, type something, press enter. The button stays, but if I move the mouse, it disappears.
Moreover I can't create several folders in one go. When I try to type something after pressing enter, the dialog goes into "search" mode.
The dialog does open in the directory the mouse is over in the folders pane, and not on the folder displayed in the images pane.
I don't understand or it doesn't happen like this on my system. If I have folder A with subfolder B. A is an active folder and I right-click on B on the folder list, the dialog still opens in A.
Is this the dialog that you see?
Yes, it's the same. I just tried it on another machine and behaviour is slightly different. I still don't see the dialog opening in the clicked folder:
I mean, I right-clicked on b, but the dialog opens at a. It's not a problem for me, I'm just trying to understand what you described.
The difference in behaviour on this machine is the following: enter works as I would expect. It closes "pop-up" dialog asking for "folder name" immediately. I suspect it is related to another problem I'm having at the original machine - images are not fully refreshed if I don't move the mouse. I don't see any difference in setup between my machines, both use Sway on Wayland with almost the same config. One uses amdgpu, the other nouveau, so that might be related.
OK, I see the difference.
It depends whether the folder pane is in view as tree or view as list.
I will look into this further.
@tomaszg7
The problem code is vd_pop_menu_new_cb in view-dir.cc.
I do not see why the two cases are handled differently.