Re: Porting launcher-gtk.py to gobject introspection
- From: Nicolas Évrard <nicoe altern org>
- To: Jiří Techet <techet gmail com>
- Subject: Re: Porting launcher-gtk.py to gobject introspection
- Date: Fri, 23 Dec 2011 11:47:47 +0100
* Jiří Techet [2011-12-22 15:52 +0100]:
Hello,
I am trying to port the demos launcher-gtk.py to use gobject
introspection. But I seem to be unable to grok the introspection
concept.
First, the method called by the demo is
champlain_label_new_with_text() and not
champlain_marker_new_with_text() which appears you try to call (and
which doesn't exist).
Well I took as an example the last version of launcher-gtk.py that I
could find:
http://gitorious.org/libchamplain/mainline/commit/c02e827d01762d39d709b2e4d7a58828dc800818/diffs
Ah, OK, that was using the old API - there will be more changes like
this if you want to convert it to the introspection-based bindings.
It was an exercise for me to start from the old API as we have to
develop something using it and sooner or later we will have to switch
to the new API … So I wanted to have a feeling of the difficulty of
the task.
BTW once I have finished rewritting those (I'll have some time on the
25 I guess) are you interested in the result ? It would probably help
people looking for example I think.
Sure! Having more demos is always good both for new users and also for
testing all the features. At the moment libchamplain doesn't have many
demos testing introspection bindings and having a demo testing more
libchamplain features is certainly welcome.
Since it gave me the opportunity to test mercurial-git I did the port
yesterday.
I uploaded the diff to codereview:
http://codereview.appspot.com/5498079/
I have some remarks on the code in order to make it more pythonic. But
I don't know if it's possible (I'll try to take a look some time).
--
(°> Nicolas Évrard
( ) Liège
`¯
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]