[pygtk] Builder correct to switch?
francesco at promotux.it
francesco at promotux.it
Tue Dec 14 08:02:15 WST 2010
Il 14/12/2010 00:01, Alessandro Dentella ha scritto:
> On Wed, Dec 08, 2010 at 02:55:40PM +0100, francesco a promotux.it wrote:
>> Il 08/12/2010 00:51, Alessandro Dentella ha scritto:
>>> I want to port an application from glade to Builder but I don't understand
>>> how to cope with custom widgets. Any ponters to this? I saw a mail from
>>> Geral Britton last year but no one answered publicly.
>>>
>>>
>>> thanks in advance
>>> sandro
>>> *:-)
>>>
>>>
>>>
>> hi , i wrote some time ago a small how to about.
>> this is the link
>>
>> http://forum.promotux.it/viewtopic.php?f=32&t=80
>> <http://forum.promotux.it/viewtopic.php?f=32&t=80>
>>
>> italian version:
>>
>> http://forum.promotux.it/viewtopic.php?f=32&t=79
>> <http://forum.promotux.it/viewtopic.php?f=32&t=79>
>
> Thanks a lot, this hint helped me migrate sqlkit to Builder along with
> studying you promoGest2 example. But there are quite a few thinks that I find
> less than clear:
>
> 1. You correctly use env variable GLADE_CATALOG_PATH while docs [1] speak
> about GLADE_ENV_CATALOG_PATH. Why that? Have you followed some other
> docs? Should I be able to put the pythonplugin* stuff in a place visible
> for the whole system?
>
I use
GLADE_CATALOG_PATH just beacuse i have my xml file in the working source three and not linked in the glade env so i think you are right
> 2. The name pythonplugin.py and pythonplugin.xml are hardcoded in glade (or
> better in it's python plugin)? I don't ned to change I just want to
> understand
>
> 3. [1] says:
>
> c) make sure your catalog name is the same as your python import
> library since glade_python_init() will use this name to import your
> widgets into the interpreter.
>
> I don't understand."Catalog name" is "pythonplugin.xml"?
>
i think that name is this: <glade-catalog name="pythonplugin" and
pythonplugin.py
in my source they are at the same level.
> 4. If you don't need glade (the application) as .xml files have been
> created already, do you need the plugin or you just need that at
> Builder.add_from_file() time the widgets are available to python? That's
> my impression...
>
yes. i use custom in glade to put building widget th custom i use in the app
> 5. I'm having problems under gtk 2.14: .add_from_string() needs one more
> arg (the length of the xml text), but even in that case Builder
> complains about wrong caracter in utf-8 in the last position of the
> buffer (corresponding to '>' of</interface>)...
>
i don't know about that
> I'm uncertain whether switching now is a good thing, I started becouse I
> wanted to get rid of a dependancy but I'm afraid it turns in more problems
> due to needed upgrade.
>
> Thanks for any possible explanation
>
>
> sandro
> *:-)
>
>
> [1] http://library.gnome.org/devel/gladeui/stable/pythonsupport.html
>
>
> PS: Builder is a much cleaner interface anyhow to add new widgets that it
> was glade + custom_handler
>
ciao
F.
--
http://promogest.promotux.it
http://www.promotux.it
http://www.e-linux.it
More information about the pygtk
mailing list