https://bugs.kde.org/show_bug.cgi?id=422340
Bug ID: 422340 Summary: Portal FileChooser incorrectly handles mnemonics Product: xdg-desktop-portal-kde Version: unspecified Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: jgrul...@redhat.com Reporter: m.wegh...@posteo.de Target Milestone: --- Created attachment 128978 --> https://bugs.kde.org/attachment.cgi?id=128978&action=edit Screenshot of the portal-native KF5 file save dialog used with simple-scan SUMMARY The FileChooser portal API for 'accept_label' parameter says: > accept_label s > > The label for the accept button. Mnemonic underlines are allowed. However, it seems like xdg-desktop-portal-kde does not properly handle this, but shows literal underscores instead of applying the mnemonics. This can be seen e.g. when using simple-scan (a Gtk application). For the "Save" button, the text "_Save" is shown instead (s. attached screenshot). I'll also attach a small sample Gtk application to reproduce. STEPS TO REPRODUCE 1. compile the attached sample Gtk application that sets the accept label to "S_ave & Done & Finished": gcc -g -O0 -o main_set_save_label $(shell pkg-config --cflags gtk+-3.0) main_set_save_label.cpp $(shell pkg-config --libs gtk+-3.0) 2. run it, using native KF5 file chooser via portal: GTK_USE_PORTAL=1 ./main_set_save_label 3. check the text shown for the confirmation button 4. Press Alt to see what character is being used for the mnemonic for the confirmation button 5. Press Alt+A to confirm (since the mnemonic was supposed to be set for the "a" in the label). OBSERVED RESULT at step 3: The text is "S_ave Done Finished" (with an extra underscore after the 's' and the literal ampersands having gone missing.) at step 4: The "S" is being underlined to indicate that it is the mnemonic. at step 5: An "a" is inserted in the file name box. EXPECTED RESULT at step 3: The text should be is "Save & Done & Finished" (without any extra underscore and containing 2 literal '&'s) at step 4: The "a" should be underlined to indicate that it is the mnemonic. at step 5: The dialog should close. SOFTWARE/OS VERSIONS+ Operating System: Debian GNU/Linux KDE Plasma Version: 5.17.5 KDE Frameworks Version: 5.70.0 Qt Version: 5.12.5 Kernel Version: 5.6.0-2-amd64 OS Type: 64-bit Processors: 4 × Intel® Core™ i5-5300U CPU @ 2.30GHz Memory: 15.4 GiB of RAM ADDITIONAL INFORMATION xdg-desktop-portal-kde 5.17.5-2 is used. -- You are receiving this mail because: You are watching all bug changes.