[pygtk] Wrapping an interface
Hi, I'm trying to wrap a gtk interface. Here is it's def (define-interface SourceStyleScheme (in-module "Gtk") (c-name "GtkSourceStyleScheme") (gtype-id "GTK_TYPE_SOURCE_STYLE_SCHEME") ) The problem I'm having is when calling methods that return objects that implement that interface. For example, gtk_source_language_get_style_scheme is defined to return a pointer to a GtkSourceStyleScheme object, but its implementation returns a pointer to a GtkSourceDefaultStyleScheme, which implements the GtkSourceStyleScheme interface. When I make the call, I get the object back, but its type is gobject! Next I tried adding this to my defs file (define-object SourceDefaultStyleScheme (in-module "Gtk") (c-name "GtkSourceDefaultStyleScheme") (gtype-id "GTK_TYPE_SOURCE_DEFAULT_STYLE_SCHEME") (implements "GtkSourceStyleScheme") ) For the sole purpose of creating a correct type to be returned. Didn't work either. What am I missing? - - -- - --- -- - - Ahmad Baitalmal web: http://www.baitalmal.com -- --- -- - ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Wrapping an interface
Hi, I'm trying to wrap a gtk interface. Here is it's def (define-interface SourceStyleScheme (in-module "Gtk") (c-name "GtkSourceStyleScheme") (gtype-id "GTK_TYPE_SOURCE_STYLE_SCHEME") ) The problem I'm having is when calling methods that return objects that implement that interface. For example, gtk_source_language_get_style_scheme is defined to return a pointer to a GtkSourceStyleScheme object, but its implementation returns a pointer to a GtkSourceDefaultStyleScheme, which implements the GtkSourceStyleScheme interface. When I make the call, I get the object back, but its type is gobject! Next I tried adding this to my defs file (define-object SourceDefaultStyleScheme (in-module "Gtk") (c-name "GtkSourceDefaultStyleScheme") (gtype-id "GTK_TYPE_SOURCE_DEFAULT_STYLE_SCHEME") (implements "GtkSourceStyleScheme") ) For the sole purpose of creating a correct type to be returned. Didn't work either. What am I missing? - - -- - --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com -- --- -- - ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Pixbuf from xpm data
Trying to get a pixbuf from xpm data I can't find gtk.gdk.pixbuf_new_from_data Maybe I can use the inline version? Thx - - -- - --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - - ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] GtkSourceView wrapped
Yaay, I got it to work, with syntax highlighting too :) check it out: http://www.bitbuilder.com/bl2_sv.png The problem with importing was that, the module.c has initgtksourceview() when it should have been initsourceview(). K, time to send you a patch, please excuse my cvs diffing ignorance, I've tried doing the following inside my cvs gnome-python/pygtk directory cvs diff -urN ? gtk/gtksourceview.c ? gtk/gtksourceview.defs ? gtk/gtksourceview.override ? gtk/gtksourceviewmodule.c cvs [server aborted]: no such tag N So I guess that's not the right way to do it?.. Should I checkout another gnome-python/pygtk-cvs and do a diff between the two pygtk folders? And,,, do I need to send the files listen above, or do they get added as part of the diff output? BTW I'm working off of yesterdays (Feb, 7th, 2003 PST) CVS, so I should be pretty current. Thanks On Sat, 2003-02-08 at 05:41, James Henstridge wrote: > Try running python with the "-v" switch if you still have troubles. It > will print debug messages when importing modules, which might also help. That really helped BTW - - -- ----- --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - - ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] GtkSourceView wrapped
Christian, first of all, I appreciate your friendly attitude. Sometimes I just give up on working on a project just because I don't want to deal with the rude comments I get back. On Wed, 2003-01-22 at 02:46, Christian Reis wrote: > Hey Ahmad, nice work. I'll let Johan have a look at the code, but just > as a tip, next time try to work with CVS and patches (generated with cvs > diff -urN from the pygtk module root). It makes it a *LOT* easier to > integrate code (I won't be surprised if Johan can't do it and has to ask > you for the CVS patch) and it's standard in OSS work too. K, so I got a fresh CVS gtksourceview (builds/installs perfectly), and a fresh CVS gnome-python/pygtk (also builds/installs perfectly). Then I added my wrapper files to gnome-python/pygtk/gtk/ and builds perfectly also. With the 1.99.14 tarball, I "make install" and my gtksourceviewmodule.* are installed to /usr/lib/python2.2/site-packages/gtk-2.0/gtk/ and I just import gtksourceview and I'm in business. The problem I'm having with the CVS version, it builds and make install works, and I see the gtksourceviewmodule.* files in /usr/lib/python2.2/site-packages/gtk-2.0/gtk/ but python can't import the gtksourceview module? It just says 'no module named gtksourceview' I noticed a setup.py file in the CVS version, I added stuff for gtksourceview ( just like the libglade stuff ), make install, still cant import. So I guess,, what do I need to do to make sure gtksourceview is an importable module? it's building just fine, other than the module files and the def file in /usr/share/pygtk/2.0/defs/ ... What I'm I missing? > The main issue is clobbering changes already applied to CVS, not picking > up refactoring and fixes in the generation code, and generally making > like for integrator easier. Yeah, I'm ready to make a CVS patch and move on to debugging the highlighting, I just need the final tweak to be able to import it :) > > Yeah, what would rock would be getting a CVS patch with it all working > :-) BTW: Johan has a vested interest in this change so he'll be a happy > turnip, I suspect. > > Take care, Thanks - - -- - --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - - ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] GtkSourceView wrapped
I finally got around to making this work. At the moment syntax highlighting does not work for some reason, but I haven't played with it that much. Line numbering works though. Attached is a patch to the 1.99.14 tarball, basically modifies the build files (gtk/Makefile.am, configure.in) to build the sourceviewmodule. Also attached are three source files that go into gtk/ (.override, .defs, .c ) and one test file. to use: import gtksourceview gsv = gtksourceview.SourceView() Next I will try to get the highlighting to work, otherwise, what's the point eh? BTW, I'm on RH8, I had to configure with --prefix=/usr and modify Makefile.am, and gtk/Makefile.am to have: pkgpythondir = $(pythondir) pkgpyexecdir = $(pyexecdir) instead of pkgpythondir = $(pythondir)/gtk-2.0 pkgpyexecdir = $(pyexecdir)/gtk-2.0 It gets very confused otherwise. I did not modify the .spec file, maybe next time. Enjoy - - -- - --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - - diff -u pygtk-1.99.14/aclocal.m4 pygtk-1.99.14.orig/aclocal.m4 --- pygtk-1.99.14/aclocal.m4 2003-01-18 14:30:59.0 -0800 +++ pygtk-1.99.14.orig/aclocal.m4 2002-12-27 03:55:44.0 -0800 @@ -1084,6 +1084,8 @@ AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl +AC_REQUIRE([LT_AC_PROG_SED])dnl + AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl AC_REQUIRE([AC_OBJEXT])dnl @@ -1251,9 +1253,12 @@ lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; -irix*) +irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; solaris* | sysv5*) symcode='[[BDT]]' ;; @@ -1350,7 +1355,7 @@ save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" - if AC_TRY_EVAL(ac_link) && test -s conftest; then + if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS="$save_LIBS" @@ -1894,7 +1899,7 @@ # like `-m68040'. lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; -beos* | irix5* | irix6* | osf3* | osf4* | osf5*) +beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; darwin* | rhapsody*) @@ -1937,7 +1942,7 @@ lt_cv_prog_cc_pic='+Z' ;; -irix5* | irix6*) +irix5* | irix6* | nonstopux*) lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' # PIC (with -KPIC) is the default. @@ -1981,11 +1986,7 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' - if test "x$host_vendor" = xsni; then - lt_cv_prog_cc_wl='-LD' - else - lt_cv_prog_cc_wl='-Wl,' - fi + lt_cv_prog_cc_wl='-Wl,' ;; uts4*) @@ -2350,7 +2351,7 @@ # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! -archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then +archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def; @@ -2359,6 +2360,7 @@ set dummy \$symbol; case \[$]# in 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; + 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; esac; _lt_hint=`expr 1 + \$_lt_hint`; @@ -2410,6 +2412,30 @@ hardcode_shlibpath_var=no ;; + linux*) +if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in +*\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 +*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... +*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2
[pygtk] Can't find gtk.FileSelection.get_selections
For multiple file selection, gtk.FileSelection.get_selections does not seem to be available in 1.99.14 What am I missing? - - -- - --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - -
[pygtk] pango.TabArray, can't create a new one
Hi, I'm trying to change the default tab width in a TextView widget from 8 spaces to something less dramatic. >From the GTK Docs, I'm supposed to create a new pango.TabArray object and set tab width there, but everytime I try to create one I get: NotImplementedError: pango.TabArray is an abstract widget So I tried creating my own class based on TabArray, didn't work, same error. So I'm stuck,, Is there another way ? Thx BTW I'm using 1.99.12 - - -- ----- --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - - ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Is anybody working on PyGtkScintilla2 ?
Scintilla 1.48 has been GTK2 enabled for a while now, and 1.49 now supports Unicode. Only the port of the wrapper GtkScintilla to GTK2 is needed and we are in business. Anybody already working on that ? - - -- - --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - -
Re: [pygtk] Wrapping gtksourceview [WORKS]
It's Alive!! The problem was that the header files in gtksourceview (gtksourcebuffer.h) had function declarations with no implementation. The compiler didn't complain when compiling gtksrouceview or the wrapper in gnome-python, but when importing it was looking for those functions. The missing functions: "gtk_source_buffer_get_tag_start" "gtk_source_buffer_get_tag_end" I commented then out in gtksourcebuffer.h since they were not use anywhere anyway. "gtk_source_view_remove_all_markers" This was mis-named with "view" instead of "buffer". Fixed that. I didn't do any testing yet, but it works as far as just creating a SourceView and adding it to a window. So here are my next questions: * How/Who do I send the fixes for gtksourceview to? * How/Who do I send my work to? * How do I correctly handle GList* functions because I don't think they were created by codegen? * How do I correctly handle GError**? If there is a paper already out there on my questions please point me to it, otherwise, I might just write down my own experience as I go and make it available. On Wed, 2002-10-30 at 06:12, Johan Dahlin wrote: Verify with ld, so it's actually linked against libgtksourceview.o and verify so the symbol, gtk_source_buffer_get_tag_end exists in the library by using nm. Johan: I think you meant "ldd"? - - -- - --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - - ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Wrapping gtksourceview
Forgive me, The problem below is caused by the call to the original functions from the _wrap* funcitons. The original functions have a third argument or type GError** (in/out). Is there an example of a correct way to handle this? Thx On Tue, 2002-10-29 at 13:09, Ahmad Baitalmal wrote: On Tue, 2002-10-29 at 06:34, Johan Dahlin wrote: Nice, i hope this can enter gnome-python in cvs soon. I'm close, or so it seems. I got how the type thing works, I'm not sure how to deal with this "too few arguments" deal. I thought it might be like the two overridden _wrap_..._stream functions in gtkhtml2's wrapping (am I way off here?). Is that why those two functions were overridden in gtkhtml2.override? Thx, Compile errors: gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2 -I/usr/include/pygtk-2.0 -I/usr/local/include/gtksourceview -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/atk-1.0 -g -O2 -Wall -std=c9x -c gtksourceview.c -MT gtksourceviewmodule_la-gtksourceview.lo -MD -MP -MF .deps/gtksourceviewmodule_la-gtksourceview.TPlo -fPIC -DPIC -o gtksourceviewmodule_la-gtksourceview.lo gtksourceview.c: In function `_wrap_gtk_source_buffer_load': gtksourceview.c:415: too few arguments to function `gtk_source_buffer_load' gtksourceview.c: In function `_wrap_gtk_source_buffer_save': gtksourceview.c:428: too few arguments to function `gtk_source_buffer_save' gtksourceview.c: In function `_wrap_gtk_source_buffer_load_with_character_encoding': gtksourceview.c:441: too few arguments to function `gtk_source_buffer_load_with_character_encoding' gtksourceview.c: At top level: gtksourceview.c:840: redefinition of `_wrap_gtk_source_buffer_iter_has_syntax_tag' gtksourceview.c:819: `_wrap_gtk_source_buffer_iter_has_syntax_tag' previously defined here gtksourceview.c:819: warning: `_wrap_gtk_source_buffer_iter_has_syntax_tag' defined but not used make[2]: *** [gtksourceviewmodule_la-gtksourceview.lo] Error 1 make[2]: Leaving directory `/home/ahmad/Projects/gnome-python/gnome-python/gtksourceview' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ahmad/Projects/gnome-python/gnome-python' make: *** [all] Error 2 -- - - -- - --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - - ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ - - -- - --- -- - - Ahmad Baitalmal IT Dude Etelos Systems, Inc. phone: 425.765.4274 email: [EMAIL PROTECTED] web: http://www.etelos.com - - -- -- --- -- - -
Re: [pygtk] Wrapping gtksourceview
Ok, So it compiled just fine with no errors. I installed it using "make install" in the gnome-python dir. It tells me that it's installed and I do see the library files in the site-packages. Here is where I'm stuck I import gtk, works fine, I import gtkhtml2, works fine, I import gtksourceview, kablam, here is what I get /usr/lib/python2.2/site-packages/gtksourceviewmodule.so: undefined symbol: gtk_source_buffer_get_tag_end The library is linking at compile time correctly (-lgtksourceview), and I checked gtksourceview.c and confirmed a wrapper for that function are there. What am I missing ? Thx Ahmad On Tue, 2002-10-29 at 13:09, Ahmad Baitalmal wrote: On Tue, 2002-10-29 at 06:34, Johan Dahlin wrote: Nice, i hope this can enter gnome-python in cvs soon. I'm close, or so it seems. I got how the type thing works, I'm not sure how to deal with this "too few arguments" deal. I thought it might be like the two overridden _wrap_..._stream functions in gtkhtml2's wrapping (am I way off here?). Is that why those two functions were overridden in gtkhtml2.override? Thx, Compile errors: gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2 -I/usr/include/pygtk-2.0 -I/usr/local/include/gtksourceview -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/atk-1.0 -g -O2 -Wall -std=c9x -c gtksourceview.c -MT gtksourceviewmodule_la-gtksourceview.lo -MD -MP -MF .deps/gtksourceviewmodule_la-gtksourceview.TPlo -fPIC -DPIC -o gtksourceviewmodule_la-gtksourceview.lo gtksourceview.c: In function `_wrap_gtk_source_buffer_load': gtksourceview.c:415: too few arguments to function `gtk_source_buffer_load' gtksourceview.c: In function `_wrap_gtk_source_buffer_save': gtksourceview.c:428: too few arguments to function `gtk_source_buffer_save' gtksourceview.c: In function `_wrap_gtk_source_buffer_load_with_character_encoding': gtksourceview.c:441: too few arguments to function `gtk_source_buffer_load_with_character_encoding' gtksourceview.c: At top level: gtksourceview.c:840: redefinition of `_wrap_gtk_source_buffer_iter_has_syntax_tag' gtksourceview.c:819: `_wrap_gtk_source_buffer_iter_has_syntax_tag' previously defined here gtksourceview.c:819: warning: `_wrap_gtk_source_buffer_iter_has_syntax_tag' defined but not used make[2]: *** [gtksourceviewmodule_la-gtksourceview.lo] Error 1 make[2]: Leaving directory `/home/ahmad/Projects/gnome-python/gnome-python/gtksourceview' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ahmad/Projects/gnome-python/gnome-python' make: *** [all] Error 2 -- - - -- - --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - - ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- - - -- - --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - - ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Wrapping gtksourceview
On Tue, 2002-10-29 at 06:34, Johan Dahlin wrote: Nice, i hope this can enter gnome-python in cvs soon. I'm close, or so it seems. I got how the type thing works, I'm not sure how to deal with this "too few arguments" deal. I thought it might be like the two overridden _wrap_..._stream functions in gtkhtml2's wrapping (am I way off here?). Is that why those two functions were overridden in gtkhtml2.override? Thx, Compile errors: gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2 -I/usr/include/pygtk-2.0 -I/usr/local/include/gtksourceview -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/atk-1.0 -g -O2 -Wall -std=c9x -c gtksourceview.c -MT gtksourceviewmodule_la-gtksourceview.lo -MD -MP -MF .deps/gtksourceviewmodule_la-gtksourceview.TPlo -fPIC -DPIC -o gtksourceviewmodule_la-gtksourceview.lo gtksourceview.c: In function `_wrap_gtk_source_buffer_load': gtksourceview.c:415: too few arguments to function `gtk_source_buffer_load' gtksourceview.c: In function `_wrap_gtk_source_buffer_save': gtksourceview.c:428: too few arguments to function `gtk_source_buffer_save' gtksourceview.c: In function `_wrap_gtk_source_buffer_load_with_character_encoding': gtksourceview.c:441: too few arguments to function `gtk_source_buffer_load_with_character_encoding' gtksourceview.c: At top level: gtksourceview.c:840: redefinition of `_wrap_gtk_source_buffer_iter_has_syntax_tag' gtksourceview.c:819: `_wrap_gtk_source_buffer_iter_has_syntax_tag' previously defined here gtksourceview.c:819: warning: `_wrap_gtk_source_buffer_iter_has_syntax_tag' defined but not used make[2]: *** [gtksourceviewmodule_la-gtksourceview.lo] Error 1 make[2]: Leaving directory `/home/ahmad/Projects/gnome-python/gnome-python/gtksourceview' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ahmad/Projects/gnome-python/gnome-python' make: *** [all] Error 2 -- - - -- - --- -- - - Ahmad Baitalmal BitBuilder web: http://www.bitbuilder.com - - -- -- --- -- - - ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Wrapping gtksourceview
Hi, I'm trying to wrap the gtksourceview widget to use it in PyGtk. * I built and installed gtksourceview and it works perfectly in normal c apps. * I got gnome-python branch, builds just fine. * I followed the instructions on "the art of wrapping" on the PyGtk site. * I created a folder in gnome-python next to gtkhtml2 that has my defs, override, and gtksourceviewmodule.c file. * I also copied Makefile.am from gtkhtml2 and modified it for gtksourceview. * I added the CFLAGS and LIBS in configure.in along with the entry in AC_CONFIG_FILES * I added the gtksourceview dir in the SUBDIRS in Makefile.am When I try to compile, here is what I get (eveything else compiles fine): . . Making all in gtksourceview make[2]: Entering directory `/home/ahmad/Projects/gnome-python/gnome-python/gtksourceview' source='gtksourceviewmodule.c' object='gtksourceviewmodule_la-gtksourceviewmodule.lo' libtool=yes \ depfile='.deps/gtksourceviewmodule_la-gtksourceviewmodule.Plo' tmpdepfile='.deps/gtksourceviewmodule_la-gtksourceviewmodule.TPlo' \ depmode=gcc3 /bin/sh ../depcomp \ /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2 -I/usr/include/pygtk-2.0 -I/usr/local/include/gtksourceview -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/atk-1.0 -g -O2 -Wall -std=c9x -c -o gtksourceviewmodule_la-gtksourceviewmodule.lo `test -f 'gtksourceviewmodule.c' || echo './'`gtksourceviewmodule.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2 -I/usr/include/pygtk-2.0 -I/usr/local/include/gtksourceview -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/atk-1.0 -g -O2 -Wall -std=c9x -c gtksourceviewmodule.c -MT gtksourceviewmodule_la-gtksourceviewmodule.lo -MD -MP -MF .deps/gtksourceviewmodule_la-gtksourceviewmodule.TPlo -fPIC -DPIC -o gtksourceviewmodule_la-gtksourceviewmodule.lo (cd . \ && /usr/bin/pygtk-codegen-2.0 \ --override gtksourceview.override \ --register /usr/share/pygtk/2.0/defs/gtk-types.defs \ --register /usr/share/pygtk/2.0/defs/gdk-types.defs \ --prefix pygtksourceview gtksourceview.defs) > gen-gtksourceview.c \ && cp gen-gtksourceview.c gtksourceview.c \ && rm -f gen-gtksourceview.c Could not write function gtk_source_view_new_with_buffer: No ArgType for GtkSourceBuffer* source='gtksourceview.c' object='gtksourceviewmodule_la-gtksourceview.lo' libtool=yes \ depfile='.deps/gtksourceviewmodule_la-gtksourceview.Plo' tmpdepfile='.deps/gtksourceviewmodule_la-gtksourceview.TPlo' \ depmode=gcc3 /bin/sh ../depcomp \ /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2 -I/usr/include/pygtk-2.0 -I/usr/local/include/gtksourceview -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/atk-1.0 -g -O2 -Wall -std=c9x -c -o gtksourceviewmodule_la-gtksourceview.lo `test -f 'gtksourceview.c' || echo './'`gtksourceview.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2 -I/usr/include/pygtk-2.0 -I/usr/local/include/gtksourceview -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/atk-1.0 -g -O2 -Wall -std=c9x -c gtksourceview.c -MT gtksourceviewmodule_la-gtksourceview.lo -MD -MP -MF .deps/gtksourceviewmodule_la-gtksourceview.TPlo -fPIC -DPIC -o gtksourceviewmodule_la-gtksourceview.lo gtksourceview.c: In function `_wrap_gtk_source_view_add_pixbuf': gtksourceview.c:128: `PyGdkPixbuf_Type' undeclared (first use in this function) gtksourceview.c:128: (Each undeclared identifier is reported only once gtksourceview.c:128: for each function it appears in.) gtksourceview.c: In function `pygtksourceview_register_classes': gtksourceview.c:227: `PyGtkTextView_Type' undeclared (first use in this function) make[2]: *** [gtksourceviewmodule_la-gtksourceview.lo] Error 1 make[2]: Leaving directory `/home/ahmad/Projects/gnome-python/gnome-python/gtksourceview' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/ahmad/Projects/gnome-python/gnome-python' make: *** [all] Error 2 Woul