17 feb. 2010 : PHP-GTK Application descriptions can now be submitted in Brazilian Portuguese too. Thanks Bruno Bandeira !.

German and Italian still missing: who will contribute the translated categories for these languages ? Contact the team to offer your translations !

Documentation on GtkBuilder

Hey folks!

I read that Glade is deprecated and replaced by GtkBuilder in another topic, but I couldn't find any documentation related to it, even on the official site.
Can you help me out?

Lars

Gtkbuilder

Gtkbuilder works almost exactly like libglade - with a few differences.

First of all, the xml syntax is slightly different. The best documentation for GtkBuilder can be found at gtk.org - http://library.gnome.org/devel/gtk/stable/GtkBuilder.html - if you scroll down you'll find an example xml widget and links to widget specific xml formats.

There is some support for gtkbuilder in the PHP-GTK 2.0.0 release, however for full support you'll need a cvs version of php-gtk2. You also must be using GTK 2.12 or higher.

http://cvs.php.net/viewvc.cgi/php-gtk/demos/examples/gtkbuilder_api.php?... - here is an example page of how to use gtkbuilder - as you can see it basically works just like glade. The one difference being it expects multiple small xml files instead of using one large file and only constructing a portion of the tree by using a root value.

But, the real question is...

But, the real question is... How to compile gtk-php to get full GTKBuilder support?

Full support is in PHP-GTK

Full support is in PHP-GTK 2.0.1

To get gtkbuilder support you need to have gtk 2.12 or higher libraries - it's part of core gtk starting with 2.12,
php-gtk should detect your gtk version when you compile and include support

Windows php-gtk builds already have it enabled

I have gtk 2.12.9

Well, i have gtk 2.12.9 (dev files too)...

this is part of my config.log file

$ ./configure --with-extra --with-html --with-sourceview --with-spell
.......
configure:4623: checking for GTK+ - version >= 2.6.0
configure:4745: gcc -o conftest -g -O2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1     conftest.c -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0    >&5
configure:4748: $? = 0
configure:4754: ./conftest
configure:4757: $? = 0
configure:4777: result: yes (version 2.12.9)
.......

Anyways, i can't get the GTKBuilder support...

Some users have reported

Some users have reported issues using the tarball to build php-gtk2 - I'm not an autotools guru - however it DOES build correctly from cvs

check out php-gtk from cvs.php.net/php-gtk - grab the 2.0.1 tag if you want the release version

cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -r  php_gtk_2_0_1 -P php-gtk

phpfi is the password - cd to the directory, do buildconf, configure, make

I got it!!!!!!!!

Thanks!! I did it... I did use cvs to download the release version and it worked out!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.