Major refactoring in seahorse



I've just committed a big refactoring and cleanup of the seahorse
internals.

The change is really big, but as you can see we get net code savings :)

 99 files changed, 3499 insertions(+), 4659 deletions(-)

 * SeahorseKey no longer exists. It was in the process of getting
   phased out. SeahorseObject is the base class for all key,
   credentials, and cerificate type objects.

   See: libseahorse/seahorse-object.[ch]

 * A new API seahorse_bind_property() and friends, which allows us
   to tie a property on one object to always be the same as the
   value of a property on another object. This allows us to make
   a label always reflect the 'name' property on a key for example.

   Transform functions can be hooked into this binding so that
   the source property can be changed somewhat before being
   set on the destination object.

   This binding also automatically goes away when either of the
   objects go away, easing cleanup and destroy code.

   See: common/seahorse-bind.[ch]

 * Standardize the common set of properties for objects. These are
   now handled by SeahorseObject, and include:

   context: SeahorseContext an object belongs to
   source: SeahorseSource an object came from.
   preferred: SeahorseObject preferred to this one.
   parent: Parent object in tree (PGP uid has key as parent)
   id: Raw Quark unique object identifier
   tag: Quark specifying seahorse module (ie: openpgp)
   label: The displayable name of the object.
   markup: Displayable markup for the object.
   nickname: Short name for the object.
   description: Type of object described.
   icon: Stock icon for object.
   identifier: Displayable ID for object.
   location: Location object is stored at.
   usage: What object can be used for (ie: public/private)
   flags: Various object flags.

   Some of the above are calculated automatically if not set
   explicitly.

   There's a bit of mapping to the old names for some of these
   which allows us to use the old names for them over DBus.

   See: libseahorse/seahorse-object.[ch]

 * No more concept of mulitple names on a key, which was how we
   represented Uids before. These have been separate objects
   for a while now, but this was finalized and old code removed.

   See: pgp/seahorse-pgp-uid.[ch] and various UID usages in pgp/


I think that's the main jist of it. I've run over almost all the code
and tested it, but I'm sure I missed something. I'd love to hear from
anyone that sees anything wrong either with the design or just plain bugs.

Cheers,

Stef Walter



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]