From: Olivier Andrieu Message-ID: <16258.52628.282659.115836 at akasha.ijm.jussieu.fr> Date: Tue, 7 Oct 2003 16:28:36 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="CLcnnokScc" Content-Transfer-Encoding: 7bit To: Claudio Sacerdoti Coen Cc: lablgtk at kaba.or.jp, Luca Padovani , Stefano Zacchiroli Subject: Re: Serious problem with switch_page In-Reply-To: <20031007134643.GA4505 at cs.unibo.it> References: <20031007134643.GA4505 at cs.unibo.it> --CLcnnokScc Content-Type: text/plain; charset=us-ascii Content-Description: message body and .signature Content-Transfer-Encoding: 7bit Hi, Claudio Sacerdoti Coen [Tuesday 7 October 2003] : > I have spotted a serious error in gtkPack.props. The first > argument of the switch_page signal is declared to have type > GObject. But this is not true: a notebook page in gtk2 is > implemented as a simple structure and not as a gobject ;-( You're right and this was fixed in CVS some time ago. Sorry, the bugfix wasn't mentionned on the list. > I think that the patch would be: > > 1. either bind the notebook_page struct in the traditional way > (best choice) > 2. or put a dummy argument data conversion (Pointer? int? gint?) in place > of GObject. This should work since (bad feature) you suppress the > first argument of the switch_page callback in gPack.ml I suppress the first argument because it doesn't seem very useful : "GtkNotebookPage is an opaque implementation detail" and there are no functions operating on it. -- Olivier --CLcnnokScc Content-Type: text/plain Content-Disposition: attachment; filename="lablgtk2-notebook.patch" Content-Transfer-Encoding: 7bit Index: src/gtkPack.props =================================================================== RCS file: /staff2/garrigue/repos/lablgtk/src/gtkPack.props,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/gtkPack.props 18 Aug 2003 21:41:25 -0000 1.2 +++ src/gtkPack.props 10 Sep 2003 17:48:59 -0000 1.3 @@ -1,4 +1,4 @@ -(* $Id: gtkPack.props,v 1.2 2003/08/18 21:41:25 oandrieu Exp $ *) +(* $Id: gtkPack.props,v 1.3 2003/09/10 17:48:59 oandrieu Exp $ *) prefix "Gtk" @@ -62,6 +62,10 @@ method thaw } +conversions { + Pointer +} + class Notebook set wrap : Container { "enable-popup" gboolean : Read / Write "homogeneous"(homogeneous_tabs) gboolean : Read / Write @@ -88,7 +92,7 @@ method get_menu_label : "[>`widget] obj -> widget obj" method set_menu_label : "[>`widget] obj -> [>`widget] obj -> unit" method reorder_child : "[>`widget] obj -> int -> unit" - signal switch_page : GObject gint + signal switch_page : Pointer gint (* omit others *) } --CLcnnokScc--