Changes to the plugin API.
- From: Dave Camp <dave ximian com>
- To: gnome-devtools gnome org
- Subject: Changes to the plugin API.
- Date: Sun, 1 Jul 2001 18:13:59 -0400 (EDT)
I just checked in some changes to the plugin api.
Tools no longer implement GNOME/Development/Environment/Tool (that
interface no longer exists). They implement the Bonobo/PropertyBag
interface. The shell now sets the gide-shell property on the tool.
The gide-shell property is a string. The shell sets this property to the
shell id of the containing shell. When it is done with the component, it
will set the gide-shell property to the empty string. Plugins can use the
gide moniker (see below) to get a GNOME/Development/Environment/Shell
reference from this id.
The gide moniker is another new addition. It is an easier way to access
the gide object model. For example, to get the shell's object reference,
you would use the following call:
moniker_string = g_strdup_printf ("gide:%s", shell_id);
obj = bonobo_get_object (moniker_string,
"IDL:GNOME/Development/Environment/Shell:1.0");
g_free (moniker_string);
To get a reference to the current document:
moniker_string = g_strdup_printf ("gide:%s!CurrentDocument",
shell_id);
obj = bonobo_object_get (moniker_string,
"IDL:GNOME/Development/Environment/Document:1.0");
g_free (moniker_string);
etc.
So how does this affect how plugins are implemented? Not much. You can
still use the GideTool object to implement the plugins. The only
difference is that you should return BONOBO_OBJREF (tool->props) instead
of BONOBO_OBJREF (tool). In your oaf file, list
IDL:Bonobo/PropertyBag:1.0 in the repo_ids instead of
IDL:GNOME/Development/Environment/Tool:1.0. And add
<oaf_attributename="gide:shell_component" type="boolean" value="true"/>.
Also, the gide:shell-component-icon oaf_attribute is now
gide:shell_component_icon.
I've converted all the plugins in the gide tree.
Later,
-dave
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]