GNOME Bugzilla – Bug 382528
Unable to implement custom filechoosers
Last modified: 2015-07-07 04:45:26 UTC
Currently the GtkFileChooserIface struct is private, the header declaring it is never installed, which makes it impossible (or at least impractical) to write custom GtkFileChooser implementations. I think it would be perfectly acceptable to label the implementation API unstable (similar to GtkFileSystem) as long as the necessary headers are installed and functions exported to enable implementing a GtkFileChooser out of gtk code tree. On related note, it would probably be a good idea to *not* include GtkFileSystem in the GtkFileChooserIface API as it ties all implementations to the GtkFileSystem abstractions and complicates things like using gnome-vfs directly (for better control) and allowing access to in-memory "file system". Rather the interface should map to the public filechooser functions.
Responding only to: > On related note, it would probably be a good idea to *not* include > GtkFileSystem in the GtkFileChooserIface API as it ties all implementations to > the GtkFileSystem abstractions and complicates things like using gnome-vfs > directly (for better control) and allowing access to in-memory "file system". > Rather the interface should map to the public filechooser functions. The point of doing so is to avoid having to have every function in URL / filename pairs, and instead use GtkFilePath. This design keeps the GtkFileChooser interface much more compact (and easier to implement) than it would be otherwise. Since the GtkFileChooser interface functions in GTK+ are chained through: GtkFileChooserDialog GtkFileChooserWidget GtkFileChooserDefault (Not to mention GtkFileChooserButton), the savings add up. If you were so inspired you could implement a dummy GtkFileSystem that only implemented the GtkFilePath mapping functions and nothing else.
(In reply to comment #1) That is a good point. It does make GtkFileChooser and GtkFileSystem(+ related items) pretty tightly coupled, though I'm not sure if that is a real problem.
*** Bug 312532 has been marked as a duplicate of this bug. ***
I think it is time to retire this requets.