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 647122 - GtkFileFilter has lost get_name and set_name methods
GtkFileFilter has lost get_name and set_name methods
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings: GTK+ GStreamer WebKitGTK+
0.12.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-08 00:59 UTC by Robert Ancell
Modified: 2011-05-23 17:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Robert Ancell 2011-04-08 00:59:06 UTC
Commit f9c512f1a984a012236ac0150e5f79997f61c75e has dropped the set_name and get_name methods from GtkFileFilter!
Comment 1 Robert Ancell 2011-04-08 01:02:51 UTC
Interestingly, if I add them back it still uses gtk_buildable_set_name instead.
Comment 2 Robert Ancell 2011-04-08 01:09:02 UTC
My workaround is adding the following extern declaration:

/* Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=647122 */
extern void gtk_file_filter_set_name (Gtk.FileFilter filter, string name);

And replacing:
filter.set_name (name);

with:
gtk_file_filter_set_name (filter, name);
Comment 3 Luca Bruno 2011-04-11 21:26:15 UTC
GIDL has no information about methods that are not an implementation of interface methods. Then the vapi writer just skips writing interface method implementations.
The solution would be to mark the method to be "new", then fix vapi writer, then gidl parser and finally the gtk3 metadata.
Comment 4 Luca Bruno 2011-04-12 18:25:10 UTC
This is really a more deeper bug, it's whether vala should allow "new" keyword for method implementations or not.
Comment 5 Luca Bruno 2011-05-23 17:37:50 UTC
commit 924b23bee3e67de575c20c70c7a89ddddb2b5c30
Author: Luca Bruno <lucabru@src.gnome.org>
Date:   Mon May 23 19:29:50 2011 +0200

    gtk+-3.0: Add FileFilter.set_filter_name and get_filter_name
    
    Vala does not allow specifying methods that do not override interface
    abstract methods (get_name and set_name in this case from Gtk.Buildable).
    Workaround the issue by renaming the methods as this feature isn't
    going to be implemented anytime soon.
    
    Fixes bug 647122.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.