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 692152 - gtkdnd introspection warning : overzealous method annotation to functions
gtkdnd introspection warning : overzealous method annotation to functions
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Language Bindings
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-01-20 22:58 UTC by Alban Browaeys
Modified: 2018-02-12 00:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wrong method annotation to functions (3.34 KB, patch)
2013-01-20 22:58 UTC, Alban Browaeys
none Details | Review
Fix overzalous method annotations for drag and drop (3.54 KB, patch)
2018-02-12 00:14 UTC, Emmanuele Bassi (:ebassi)
none Details | Review

Description Alban Browaeys 2013-01-20 22:58:07 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.
Comment 1 Matthias Clasen 2018-02-10 05:01:36 UTC
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.
Comment 2 Alban Browaeys 2018-02-11 13:30:40 UTC
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.
Comment 3 Emmanuele Bassi (:ebassi) 2018-02-11 14:21:05 UTC
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.
Comment 4 Emmanuele Bassi (:ebassi) 2018-02-12 00:14:54 UTC
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>
Comment 5 Emmanuele Bassi (:ebassi) 2018-02-12 00:15:55 UTC
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!