Search code examples
gtkdeprecatedfilechoosergtk4

What is the replacement for GtkFileChooserWidget given that direct use of it is deprecated?


I'm developing a GTK 4 application where I want to let users pick a directory to do some operation on. As such, I looked into GTK's widgets for doing just that, and came upon GtkFileChooserWidget. However, the documentation for GTK 4 notes that direct use of it was deprecated in version 4.10, and so I would think that means I should find a replacement. I read the section in the NEWS file for GTK 4.10 but I couldn't find any mention of a replacement. What should I use in a GTK 4 app to choose a directory if I don't want to rely on deprecated API?


Solution

  • It is Gtk.FileDialog, which is used to carry out all kinds of operations with files on Gtk4.