Accelerators/mnemonics in gtk_file_chooser_add_choice () ? (GTK3)

Hi! I’m currently working on porting GIMP’s file chooser dialogs to GtkFileChooserNative (see Draft: plug-ins: Switch to GtkNativeFileChooser (!2647) · Merge requests · GNOME / GIMP · GitLab )

A few of our dialogues with custom checkbox widgets can be recreated with gtk_file_chooser_add_choice (). However, they seem to lose their mnemonics/accelerators (the usual underline is treated as just an underline).

Is it possible to include accelerators with gtk_file_chooser_add_choice ()?

I see that it works with the OK/Cancel buttons, so I assume it’s possible with GtkFileChooserNative.

1 Like

No, it’s not possible: mnemonics are a GTK concept that native file selection dialogs on different platforms may not have, or may not handle in the same way as GTK.

Also, reminder that “choices” are not set in GTK3 when using the portal implementation—i.e. when running sandboxed.

2 Likes

@ebassi Thanks for the information regarding portals! That’ll complicate things further, but at least we’re forewarned.