![]() |
![]() |
![]() |
Peas Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites |
#define PEAS_UI_CONFIGURABLE_IFACE (obj) PeasUIConfigurable; PeasUIConfigurableInterface; gboolean peas_ui_configurable_is_configurable (PeasUIConfigurable *configurable
); gboolean peas_ui_configurable_create_configure_dialog (PeasUIConfigurable *configurable
,GtkWidget **conf_dlg
);
The PeasUIConfigurable interface will allow a PeasPlugin to provide a
graphical interface for the user to configure the plugin through the
PeasUIPluginManager: the PeasUIPluginManager will make the “Configure
Plugin” button active when the selected plugin implements the
PeasUIConfigurable interface and peas_ui_configurable_is_configurable()
returns TRUE
. See peas_ui_configurable_is_configurable()
.
To do so, the plugin writer will just need to implement the
create_configure_dialog()
method. You should not implement the
is_configurable()
method, unless create_configure_dialog()
is overwritten
but does not always return a valid GtkWindow.
#define PEAS_UI_CONFIGURABLE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), PEAS_UI_TYPE_CONFIGURABLE, PeasUIConfigurableInterface))
typedef struct { GTypeInterface g_iface; gboolean (*create_configure_dialog) (PeasUIConfigurable *configurable, GtkWidget **conf_dlg); /* Plugins should usually not override this, it's handled automatically * by the PeasPluginClass */ gboolean (*is_configurable) (PeasUIConfigurable *configurable); } PeasUIConfigurableInterface;
gboolean peas_ui_configurable_is_configurable
(PeasUIConfigurable *configurable
);
Returns whether the plugin is configurable.
The default implementation of the is_configurable()
method will return TRUE
if the create_configure_dialog()
method was overriden, hence you won't
usually need to override this method.
|
A PeasUIConfigurable |
Returns : |
TRUE if the plugin is configurable.
|
gboolean peas_ui_configurable_create_configure_dialog (PeasUIConfigurable *configurable
,GtkWidget **conf_dlg
);
Creates the configure dialog widget for the plugin.
The default implementation returns NULL
.
|
A PeasUIConfigurable |
|
(out) A GtkWindow used for configuration |
Returns : |
TRUE on success.
|