After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683760 - Formatter.can_load_uri cannot be used as a gtk filter function
Formatter.can_load_uri cannot be used as a gtk filter function
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-editing-services
0.11.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-11 02:38 UTC by Jean-François Fortin Tam
Modified: 2013-11-16 22:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jean-François Fortin Tam 2012-09-11 02:38:14 UTC
Using can_load_uri as a GtkFileFilterFunc, like so:

default = Gtk.FileFilter()
default.set_name(_("All formats"))
default.add_custom(Gtk.FileFilterFlags.URI, GES.Formatter.can_load_uri, None)
chooser.add_filter(default)


...Gives a TypeError: can_load_uri() takes exactly 1 argument (2 given)
Comment 1 Jean-François Fortin Tam 2012-09-11 02:46:10 UTC
Ah, and the GTK documentation says that the GtkFileFilterFunc should have this signature:


- filter_info: a GtkFileFilterInfo that is filled according to the needed flags passed to gtk_file_filter_add_custom()
- data: user data passed to gtk_file_filter_add_custom(). [closure]

And then the function would return TRUE if the file is considered supported by GES.
Comment 2 Thibault Saunier 2013-11-16 22:59:52 UTC
This is not a bug to me, you have to create a function that is usable for that use case, no one ever said that this method was a GtkFileFilterFunc, most probably because it is not :)