GNOME Bugzilla – Bug 692152
gtkdnd introspection warning : overzealous method annotation to functions
Last modified: 2018-02-12 00:15:55 UTC
Created attachment 233969 [details] [review] wrong method annotation to functions Fixes: /home/prahal/checkout/gnome/gtk+/gtk/gtkdnd.h:96: Warning: Gtk: gtk_drag_finish: Methods must belong to the same namespace as the class they belong to /home/prahal/checkout/gnome/gtk+/gtk/gtkdnd.h:101: Warning: Gtk: gtk_drag_get_source_widget: Methods must belong to the same namespace as the class they belong to /home/prahal/checkout/gnome/gtk+/gtk/gtkdnd.h:172: Warning: Gtk: gtk_drag_set_icon_widget: Methods must belong to the same namespace as the class they belong to /home/prahal/checkout/gnome/gtk+/gtk/gtkdnd.h:176: Warning: Gtk: gtk_drag_set_icon_pixbuf: Methods must belong to the same namespace as the class they belong to /home/prahal/checkout/gnome/gtk+/gtk/gtkdnd.h:180: Warning: Gtk: gtk_drag_set_icon_stock: Methods must belong to the same namespace as the class they belong to /home/prahal/checkout/gnome/gtk+/gtk/gtkdnd.h:184: Warning: Gtk: gtk_drag_set_icon_surface: Methods must belong to the same namespace as the class they belong to /home/prahal/checkout/gnome/gtk+/gtk/gtkdnd.h:186: Warning: Gtk: gtk_drag_set_icon_name: Methods must belong to the same namespace as the class they belong to /home/prahal/checkout/gnome/gtk+/gtk/gtkdnd.h:191: Warning: Gtk: gtk_drag_set_icon_gicon: Methods must belong to the same namespace as the class they belong to /home/prahal/checkout/gnome/gtk+/gtk/gtkdnd.h:196: Warning: Gtk: gtk_drag_set_icon_default: Methods must belong to the same namespace as the class they belong to It turns out that those functions takes as first parameter a GdkDragContext which is not in the Gtk namespace and those are not methods either.
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Issue still present in GTK+ 3.22 build log. Easy target at that. Seems nobody has use for gir DnD bindings ... as those are broken. Eggs and chicken. How could I reopen it (only option is to set it to resolved) ? This as to get this issue migrated to gitlab.
Technically, those are "methods" of the GdkDragContext object, but the drag and drop API is kind of broken in many more ways than this one. The annotations were added in commit 9c4892f2915, but there's no rationale in the commit message; of course, it worked in 2011, but in the meantime the introspection scanner has become slightly more strict in the kind of behaviour it accepts from an API. For GTK 4.0, the API is going to change pretty comprehensively, and it's moving to GDK, so the annotation would not be necessary. For GTK 3.22, the introspection scanner is ignoring the annotation, so we're just getting a warning, but the introspected ABI is the same as it would be without the annotation. I guess we should just merge the patch, and close the bug.
Created attachment 368239 [details] [review] Fix overzalous method annotations for drag and drop Functional revert of commit 9c4892f2915. Fixes introspection scanner warnings like: Warning: Gtk: gtk_drag_finish: Methods must belong to the same namespace as the class they belong to That is, the gtk_drag_* functions cannot be methods as they have a "GdkDragContext" as the instance parameter, and that is not a valid type for the Gtk namespace. This is not an introspected ABI change, as the generated introspection data ignores the annotation. Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
I've rebased attachment 233969 [details] [review] against current gtk-3-22's tip, and reworded the commit message a little bit, and pushed it to the stable branch. Thanks!