Updates:
Status: Accepted
Comment #2 on issue 1397 by takao.fujiwara1: [GObjectIntrospection] Failed
to get GType of IBus.Engine in javascript
http://code.google.com/p/ibus/issues/detail?id=1397
Hmm.., interested.
seed assigns the GType in "type" property in SeedObject.
I use gjs instead of seed and this way is not supported by gjs so I used
C-language codes for the IBusEngine.
Reading the seed code, it uses
GIRepository.registered_type_info_get_g_type() to get the GType.
So probably I think both gjs and seed could use
GObject.type_from_name('IBusEngine') simply to get GType of IBusEngine
instead of IBus.Engine.type.
const IBus = imports.gi.IBus;
const GObject = imports.gi.GObject;
IBus.init();
type = GObject.type_from_name('IBusEngine')
I investigated the seed code. It seems if the function name is
ibus_engine_new_type, the name pointer is added four so the "type" property
is overrided in
seed/libseed/seed-importer.c:seed_gi_importer_handle_object().
So probably it would be good to rename ibus_engine_new_type with
ibus_engine_new_with_type to fix this problem.
I will work on this issue.
--
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en