diff options
author | Craig Keogh <cskeogh@adam.com.au> | 2011-03-02 19:49:19 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2011-03-02 19:49:19 -0300 |
commit | 69f0d525632625d15756d7e814a4bafd3c23bb7a (patch) | |
tree | f774373a6cc85c1f7b71cfde82c7dea3a1d9a6ee /doc | |
parent | 2161845d6a62bfb19182accef23f4850054ce577 (diff) | |
download | glade-69f0d525632625d15756d7e814a4bafd3c23bb7a.tar.gz |
Migrate from PyGTK to PyGObject introspection-based bindings
Diffstat (limited to 'doc')
-rw-r--r-- | doc/gladepython.sgml | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/doc/gladepython.sgml b/doc/gladepython.sgml index c5dcb633..327d13d5 100644 --- a/doc/gladepython.sgml +++ b/doc/gladepython.sgml @@ -1,4 +1,4 @@ -<refentry id="pythonsupport" revision="7 Nov 2008"> +<refentry id="pythonsupport" revision="26 Feb 2011"> <refmeta> <refentrytitle>Python Gtk widgets support</refentrytitle> <refmiscinfo>Glade UI</refmiscinfo> @@ -12,10 +12,9 @@ How to write and install a catalog for a python widget library <refsect1> <title>Introduction</title> + <para> Glade supports loading widgets coded in python by linking and running the python interpreter from the gladepython catalog plugin. - <para> - </para> <para> @@ -55,9 +54,9 @@ domain="glade-3" depends="gtk+"> <para> Glade's python interpreter will look up for your widgets in the same places it looks -for regular catalogs plugins, that is $GLADE_ENV_CATALOG_PATH +for regular catalogs plugins, that is $GLADE_ENV_MODULE_PATH enviroment variable -and `pkg-config --variable=catalogdir gladeui-1.0` +and `pkg-config --variable=moduledir gladeui-2.0` So the easiest thing would be to make a symlink in one of those directory, just do not forget that the name should be the one specified in your catalog name. @@ -67,14 +66,13 @@ do not forget that the name should be the one specified in your catalog name. pythonplugin.py <programlisting> <![CDATA[ -import gobject -import gtk +from gi.repository import Gtk -class MyBox(gtk.HBox): +class MyBox(Gtk.HBox): __gtype_name__ = 'MyBox' def __init__(self): - gtk.HBox.__init__(self) + Gtk.HBox.__init__(self) ]]> </programlisting> </para> |