Skip to content

Rework SeahorseObject as a SeahorseItem interface

Niels De Graef requested to merge nielsdg/rework-seahorse-object into main

In several of the libraries that we use (such as gcr, but also in the current way we use libsecret), objects are created for us, as we just have to pass on the type.

With SeahorseObject trying to be a base class, we get into an awkward situation where there's already a parent class (such as GckObject or SecretItem), so we can't really extend the former. Instead, we do an awkward dance where we replicate the properties instead and use the generic g_object_get/set() calls to fetch their values, which isn't nice for type safety, as this is only checked at runtime.

This commit changes this setup instead, by transforming SeahorseObject into an interface, SeahorseItem, which only has abstract methods and properties. It is then up to each object to implement that instead of the base class, or replicating properties.

Merge request reports

Loading