After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 664866 - PeasExtensionSet seems to be broken in gobject-introspection
PeasExtensionSet seems to be broken in gobject-introspection
Status: RESOLVED DUPLICATE of bug 664865
Product: libpeas
Classification: Platform
Component: general
1.2.x
Other Linux
: Normal normal
: ---
Assigned To: libpeas-maint
libpeas-maint
Depends on:
Blocks:
 
 
Reported: 2011-11-26 12:44 UTC by Marcus Habermehl (BMH1980)
Modified: 2011-11-26 12:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Python version of peas-demo (3.46 KB, text/x-python)
2011-11-26 12:44 UTC, Marcus Habermehl (BMH1980)
Details

Description Marcus Habermehl (BMH1980) 2011-11-26 12:44:31 UTC
Created attachment 202179 [details]
Python version of peas-demo

I have tried to port the peas-demo from C to Python to learn how to use Peas in Python.

But now I can't convert this C code to Python code:


dw->exten_set = peas_extension_set_new (peas_engine_get_default (),
                                        PEAS_TYPE_ACTIVATABLE,
                                        "object", dw,
                                        NULL);

There seems no PEAS_TYPE_ACTIVATABLE in gir. So I have used Peas.Activatable.__gtype__ in Python.

self.exten_set = Peas.ExtensionSet(engine = engine.get_default(),
                                   extension_type = Peas.Activatable.__gtype__,
                                   construct_properties = ["object", self])

But this results in this TypeError.

TypeError: could not convert value for property `extension_type' from gobject.GType to GType

I'm attaching the Python script, what isn't complete at this time. The signal handlers for extension-add and extension-removed are missing.
Comment 1 Marcus Habermehl (BMH1980) 2011-11-26 12:50:07 UTC
Duplicated sending by accident.

*** This bug has been marked as a duplicate of bug 664865 ***