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 620057 - Support for construction-time extension properties
Support for construction-time extension properties
Status: RESOLVED FIXED
Product: libpeas
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: libpeas-maint
libpeas-maint
Depends on:
Blocks:
 
 
Reported: 2010-05-30 00:23 UTC by Steve Frécinaux
Modified: 2010-07-27 18:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add support for construct-properties for extensions. (28.69 KB, patch)
2010-07-16 19:06 UTC, Steve Frécinaux
committed Details | Review
Change PeasActivatable to take the object as a construct property. (13.91 KB, patch)
2010-07-16 19:06 UTC, Steve Frécinaux
committed Details | Review
[PeasEngine] Rename get_extension() to create_extension() (15.86 KB, patch)
2010-07-19 18:19 UTC, Steve Frécinaux
committed Details | Review

Description Steve Frécinaux 2010-05-30 00:23:01 UTC
Currently, extensions are created with zero dynamic arguments. It would be nice if we were able to give some arguments during the creation, through GObject properties.

For exemple, PeasActivatable (which are usually per-object) now has such an interface:

iface PeasActivatable {
  PeasActivatable();
  void activate(object);
  void deactivate(object);
}



Support for construction-time properties would allow something like this:

iface PeasActivatable {
  PeasActivatable(object);
  void activate();
  void deactivate();
}
Comment 1 Steve Frécinaux 2010-07-16 19:06:29 UTC
Created attachment 166035 [details] [review]
Add support for construct-properties for extensions.
Comment 2 Steve Frécinaux 2010-07-16 19:06:33 UTC
Created attachment 166036 [details] [review]
Change PeasActivatable to take the object as a construct property.

This makes it more explicit that a PeasActivatable instance is bound to
a single object. It makes the C plugin code a bit more tedious, but the
changes in the python and seed code are very tight.

The Seed plugin part depends on Seed bugfixes attached to bug 624560
and 624562.
Comment 3 Steve Frécinaux 2010-07-19 18:19:26 UTC
Created attachment 166172 [details] [review]
[PeasEngine] Rename get_extension() to create_extension()

This is closer to the actual behaviour of that function.
Comment 4 Steve Frécinaux 2010-07-27 18:54:13 UTC
Attachment 166035 [details] pushed as 5c6d89f - Add support for construct-properties for extensions.
Attachment 166036 [details] pushed as 1c6a2e3 - Change PeasActivatable to take the object as a construct property.
Attachment 166172 [details] pushed as 754bc3a - [PeasEngine] Rename get_extension() to create_extension()