Re: Problems building 2.0 API; gtkmmproc error after update



On Tue, 2008-02-26 at 23:43 +0100, Toralf Lund wrote:
> Hi.
> 
> I thought I might have a quick look at a compile problem with the old 
> API (gtkmm version 2.2.12) on my Mac. Details are on 
> http://trac.macosforge.org/projects/macports/ticket/13516, but simply 
> put, I get the error
> 
> notebook.cc: In static member function 'static void Gtk::Notebook_Class::class_init_function(void*, void*)':
> notebook.cc:684: error: invalid conversion from 'void (*)(GtkNotebook*, gint)' to 'gboolean (*)(GtkNotebook*, gint)'

This was maybe a (annoying) change in GTK+ (which version are you
using?) But that's quite an old version so I can't remember the details.

Can't you just use a newer version of gtkmm?

> because the "change-current-page" signal handler is supposed to have 
> return type gboolean, and the gtkmm sources assume void.
> 
> So, I've done
> 
> -- ./gtk/gtkmm/private/notebook_p.h.notebook   2008-02-26 
> 23:01:58.000000000 +0100
> +++ ./gtk/gtkmm/private/notebook_p.h    2008-02-26 23:03:03.000000000 +0100
> @@ -36,7 +36,7 @@
>    static void switch_page_callback(GtkNotebook* self, GtkNotebookPage* 
> p0, guint p1);
>    static gboolean select_page_callback(GtkNotebook* self, gboolean p0);
>    static gboolean focus_tab_callback(GtkNotebook* self, GtkNotebookTab p0);
> -  static void change_current_page_callback(GtkNotebook* self, gint p0);
> +  static gboolean change_current_page_callback(GtkNotebook* self, gint p0);
>    static void move_focus_out_callback(GtkNotebook* self, 
> GtkDirectionType p0);
>  
>    //Callbacks (virtual functions):
> --- ./gtk/src/notebook.hg.notebook      2008-02-26 22:47:48.000000000 +0100
> +++ ./gtk/src/notebook.hg       2008-02-26 22:48:20.000000000 +0100
> @@ -379,7 +379,7 @@
>  
>    _WRAP_SIGNAL(bool select_page(bool move_focus), "select_page")
>    _WRAP_SIGNAL(bool focus_tab(NotebookTab type), "focus_tab")
> -  _WRAP_SIGNAL(void change_current_page(int offset), "change_current_page")
> +  _WRAP_SIGNAL(bool change_current_page(int offset), "change_current_page")
>    _WRAP_SIGNAL(void move_focus_out(DirectionType   direction), 
> "move_focus_out")
> 
> but when I try to regenerate the sources after this, I get
> 
> [my:gtkmm-2.2.12/gtk/src] dd% make .stamps/stamp-notebook
> /opt/local/bin/perl -I../../tools/pm ../../tools/gtkmmproc -I 
> ../../tools/m4 --defs .  notebook . ./../gtkmm
>  trNo conversion from void to bool defined (line: , parameter name: 
> (*base->change_current_page)`'(gobj`'()`'_COMMA_PREFIX(_CONVERT(int,gint,offset,0))))
> m4 failed with exit code 1.  Aborting...
> 
> At which point I'm pretty much stuck.
> 
> Help, anyone?
> 
> - Toralf

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]