Bug 471410

Summary: default focus on next/finish buttons
Product: [Applications] kid3 Reporter: 82d <akumail9>
Component: generalAssignee: Urs Fleisch <ufleisch>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: 3.9.x   
Target Milestone: ---   
Platform: Other   
OS: FreeBSD   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description 82d 2023-06-24 17:48:34 UTC
when you need to process a lot of music files. then you start to notice little things that could make the process much more convenient.
for example when you name each directory with imines from tags. then everything is already set up there and you just need to click the "next" / "finish" button. To do this, you constantly have to select with the mouse. it would be convenient to make the focus on these buttons by default, for which it would be enough to press "Enter".
in the menu for importing tags ("OK" button), there are also similar situations. and it would be convenient to close it with the "Esc" button, all additional windows could be closed with "Esc".
Comment 1 82d 2023-06-24 17:53:30 UTC
amendment. additional windows and so all are closed by "Esc". The problem is that in the tag import window, after closing the server window, the focus is transferred to the main window, and not to the window where the import is taking place.
Comment 2 82d 2023-06-24 18:05:28 UTC
I will add, even after choosing a cover. it would also be logical to focus on "OK". to quickly close the window.
Comment 3 Urs Fleisch 2023-06-27 17:43:37 UTC
Strange, I cannot reproduce the described behavior in the "Rename Folder" dialog. When I open it, Next has focus, I press <Enter>, in the next step, Finish has focus, I press <Enter> and the folder is renamed.

I am working a lot with the keyboard, I seldom use the mouse when working with Kid3. Most functions are accessible with Alt and a key, you can assign shortcuts to most of the actions. You can also easily navigate between the different sections, search for "F2" in the handbook to find the corresponding section.

But there are always things which can be improved, so I tried to make it better. Here is what I have changed:

- Leave the auto default on the OK button in the "Edit Frame" dialog. This should let you press <Enter> after adding a cover. And the behavior for editing other types of frames should still be OK, you have the focus on the edit control and can invoke OK using Alt-O.
- Leave the auto default on the OK button in the "Import" dialog. So you can just press <Enter> after closing the server window.
- When the Import Server dialog is opened, put the default on the Find button. So after pressing <Enter> twice, you trigger find and the album results are shown. The default is removed from the Find button, so that <Enter> will now activate the selected album which you can choose using the arrow keys. When you are happy with the selected album, press ESC to close the dialog. You are then in the Import dialog where OK has focus, so just press <Enter> to import the tags.

As you seem to build Kid3 yourself I have not provided any binaries for these changes, but they are on the master branch, so you could try them out.
Comment 4 82d 2023-06-28 18:19:39 UTC
Checked on win32 builds under Wine, renaming the folder really works as you said. But after selecting from the list from the server. after closing the third window, the focus falls on the main window, and not on the previous one. I must have messed up the window focus settings. I rechecked. it's on a different OS. Everything is fine. I then ran a clean Xfce4 as a different FreeBSD user to check the Windows settings. to my surprise there, the focus also goes to the main window after selection and this does not depend on the assembly, I also checked the win32 assembly under Wine. hence something with Xfce I guess. you can try to reproduce this on pure Xfce. I'll try to check other shells on FreeBSD to make sure it's really Xfce.
Comment 5 82d 2023-06-28 19:30:12 UTC
1. Installed the latest sources from here: https://invent.kde.org/multimedia/kid3 with an emphasis on "OK" when choosing a picture. focus appears only at the beginning. after import/export the focus is lost on the export/import button.
2. Installed LXDE and launched it as a different user. there is no focus issue when importing tags from the server. it means the reason is in Xfce. I will test Xfce on another distribution under VM .
3. the problem with renaming focus folders persists on both Xfce and LXDE, but only on builds under FreeBSD, everything is fine on win32 versions via Wine. later i will test it on linux. 

This is what the window looks like right after opening. Fokus is on two directions at once. 
https://i.imgur.com/egY99Kj.png
Comment 6 82d 2023-07-03 13:28:48 UTC
checked xfce under linux. everything also focuses on the main window and not the previous one. so these are the features of "xfwm4". I think it's not a kid3 problem, I'll write a report to xfce.

but on different builds under linux and fribsd the situation persists with the loss of focus when renaming a directory, regardless of the window manager. under wine on the assembly of wib32 this is not observed.
Comment 7 Urs Fleisch 2023-07-09 04:58:49 UTC
Improved in version 3.9.4.