[gcompris-devel] [PATCH/help-wanted] goocanvasmodule.c use newer PyCairo API

Sérgio Durigan Júnior sergiosdj at gmail.com
Tue Oct 20 01:41:55 UTC 2009


Hello guys,

First, I'm sorry for the absence.  My work is sucking all the time I have 
available, so I didn't have enough time to dedicate to Gcompris...  Anyway, 
here I am trying to build Gcompris from scratch using the "gcomprixogoo" 
branch.  I found a failure related to the new PyCairo API in 
src/boards/goocanvasmodule.c.  Here's the patch to fix it.  Please take a look 
to see if it makes sense.  I didn't write a ChangeLog for it, but I can do if 
needed.

I was able to successfuly compile and start Gcompris after this fix, but I'm 
receiving this error at the start:  "Couldn't find the board menu /, or plugin 
execution error".  I didn't dig deeper into this, but my paths look OK and 
everything is where it should be.  Here's the output of Gcompris when I start 
it:

=================================
** Message: Binary relocation enabled

** (process:5272): WARNING **: exec_prefix /home/sergio/scratchpad/install/bin

package_data_dir         = 
/home/sergio/scratchpad/install/share/gcompris/boards
package_skin_dir         = 
/home/sergio/scratchpad/install/share/gcompris/boards/skins
package_menu_dir         = 
/home/sergio/scratchpad/install/share/gcompris/boards
package_locale_dir       = /home/sergio/scratchpad/install/share/locale
package_plugin_dir       = /home/sergio/scratchpad/install/lib/gcompris
package_python_plugin_dir= 
/home/sergio/scratchpad/install/share/gcompris/python
Infos:
   Config dir '/home/sergio/.config/gcompris'
   Users dir '/home/sergio/My GCompris'
   Database '/home/sergio/.config/gcompris/gcompris_sqlite.db'
=================================

Anything strange?  Oh, for the record, I'm using the gcomprixogoo branch 
(updated, of course :-)).  Nothing went wrong when I compiled it, but it's 
worth mentioning that I installed it in a directory inside my home dir (as you 
can notice above).  I will debug this issue later when I have time to see if I 
can come up with a solution for it.

well, that's it.  Thanks for the patience, and I'd be glad to receive comments 
about this issue.

--
Sérgio.


diff --git a/src/boards/goocanvasmodule.c b/src/boards/goocanvasmodule.c
index ff2f491..a9b0c2b 100644
--- a/src/boards/goocanvasmodule.c
+++ b/src/boards/goocanvasmodule.c
@@ -35,7 +35,8 @@ _cairo_matrix_to_gvalue(GValue *value, PyObject *obj)
 static PyObject *
 _cairo_pattern_from_gvalue(const GValue *value)
 {
-    return 
PycairoPattern_FromPattern(cairo_pattern_reference((cairo_pattern_t *) 
g_value_get_boxed(value)));
+    return 
PycairoPattern_FromPattern(cairo_pattern_reference((cairo_pattern_t *) 
g_value_get_boxed(value)),
+                                      NULL);
 }
 
 static int




More information about the Gcompris-devel mailing list