GNOME Bugzilla – Bug 531985
Vala misses binding for Gtk.Notebook.page_num()
Last modified: 2008-06-29 03:33:24 UTC
Please add the function binding in the gtk+2.0.vapi file. This is the (very simple) patch against v0.3.1: *** 3645,3646 **** --- 3645,3647 ---- public void remove_page (int page_num); + public int page_num(Gtk.Widget child); public void reorder_child (Gtk.Widget child, int position); Thank you very much.
Confirming, however, we can't use this patch as the .vapi file is generated, we need to fix the generation.
I tried to undestand vapigen / vala-gen-introspect / gen-introspect workings, but I couldn't :/ However, I found a workaround, maybe it could be useful till someone finds a way to correct the bug. Suppose you have: var nb = new Gtk.Notebook; var page = new Gtk.Widget; // a notebook page widget Instead of using int pagenumber = nb.page_num(page); you can use the static function: int pagenumber = Gtk.NotebookPage.num(nb, page); I think the vapigen gets confused because the function is named gtk_notebook_page_num, so it transforms it into Gtk.NotebookPage.num
*** This bug has been marked as a duplicate of 512437 ***