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 542953 - [gtk+] gtk_menu_shell_append.child wrongly set to MenuItem
[gtk+] gtk_menu_shell_append.child wrongly set to MenuItem
Status: RESOLVED DUPLICATE of bug 543073
Product: vala
Classification: Core
Component: Bindings
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-14 17:20 UTC by Thijs Vermeir
Modified: 2008-07-17 09:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
set the gtk_menu_shell_append.child to Widget (623 bytes, patch)
2008-07-14 17:20 UTC, Thijs Vermeir
none Details | Review

Description Thijs Vermeir 2008-07-14 17:20:20 UTC
In the vapi of gtk+-2.0 the gtk_menu_shell_append.child is set to MenuItem. But in the real C headers this is a Gtk.Widget. If you now compile you get some gcc warnings about the argument from incompatible pointer type.

Program to demonstrate this:
using Gtk;
using GLib;

public class menu_ex : Gtk.Menu {
  construct {
    append (new MenuItem.with_label ("hello"));
  }
}

public static int main (string[] args) {
  return 1;
}
Comment 1 Thijs Vermeir 2008-07-14 17:20:58 UTC
Created attachment 114534 [details] [review]
set the gtk_menu_shell_append.child to Widget
Comment 2 Jared Moore 2008-07-15 05:06:39 UTC
I don't think that is the best fix for this bug. The parameter does have to be a MenuItem, so it really should be a MenuItem in the Vala bindings. It is just a GtkWidget* for the CCode generation. So it would be better to have metadata/attribute/codegen support so that the code generator adds the GTK_WIDGET cast.
Comment 3 Jürg Billeter 2008-07-17 09:10:22 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 543073 ***