← Back to team overview

elementary-dev-community team mailing list archive

Switchboard ported to libPeas


Hi all !

It is done, Switchboard is ported libPeas
(see https://code.launchpad.net/~tintou/switchboard/libpeas )

With theese changes, the libpantheon is deprecated and is replaced by libswitchboard (it is a better naming for a library that handles plugs).

If you're a plug developer or interested by developping a new plug, you can see the new implementation I've made on the About Plug
(see https://code.launchpad.net/~tintou/switchboard-plug-about/libpeas )

I hope the transition will be finished as soon as possible.

Here are the changes:

* API side (still considered as UNSTABLE but a port for each plug is required, there is no backward compatibility):

 NEW CLASS Switchboard.Plug :
- Category category; // PERSONAL, HARDWARE, NETWORK, SYSTEM or OTHER, but OTHER is ignored for now…
  - string code_name; // The name recognised with the open-plug command
  - string display_name; // The localised plug name
  - string description; // A short description
  - string icon;

 Functions (to override):
  - Gtk.Widget get_widget ();
  - void close ();
// 'search' returns results like ("Keyboard → Behavior → Duration", "keyboard<sep>behavior") TODO: Will be used in the future…
  - async Gee.TreeMap<string, string> search (string search);

The plug needs to register itself to the Switchboard.plugs_manager object.

* Files installation side:
   no more /usr/lib/plugs but:
  - /usr/lib/switchboard/personal
  - /usr/lib/switchboard/hardware
  - /usr/lib/switchboard/network
  - /usr/lib/switchboard/system
the plug location is now restricted to ONE subdirectory, so no more /usr/lib/plugs/pantheon/about/* but /usr/lib/switchboard/personal/pantheon-about/* no more my_plug.plug but my_plug.plugin (see the libPeas documentation for more information)

I think all is said :)
Have fun !

Corentin "tintou" Noël

Follow ups