Problems building 2.0 API; gtkmmproc error after update



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)'


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






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