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 531985 - Vala misses binding for Gtk.Notebook.page_num()
Vala misses binding for Gtk.Notebook.page_num()
Status: RESOLVED DUPLICATE of bug 512437
Product: vala
Classification: Core
Component: Bindings
0.3.x
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-07 16:48 UTC by Alessandro Pellizzari
Modified: 2008-06-29 03:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alessandro Pellizzari 2008-05-07 16:48:03 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.
Comment 1 Jürg Billeter 2008-05-25 16:06:07 UTC
Confirming, however, we can't use this patch as the .vapi file is generated, we need to fix the generation.
Comment 2 Alessandro Pellizzari 2008-06-05 15:45:36 UTC
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


Comment 3 Jared Moore 2008-06-29 03:33:24 UTC

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