Top |
Functions
#define | ANJUTA_PROFILE_ERROR |
GQuark | anjuta_profile_error_quark () |
AnjutaProfile * | anjuta_profile_new () |
const gchar * | anjuta_profile_get_name () |
void | anjuta_profile_add_plugin () |
void | anjuta_profile_remove_plugin () |
gboolean | anjuta_profile_add_plugins_from_xml () |
gboolean | anjuta_profile_has_plugin () |
GList * | anjuta_profile_get_plugins () |
void | anjuta_profile_set_sync_file () |
gboolean | anjuta_profile_sync () |
gboolean | anjuta_profile_load () |
gboolean | anjuta_profile_unload () |
Properties
AnjutaPluginManager * | plugin-manager | Read / Write / Construct |
gchar * | profile-name | Read / Write / Construct |
GFile * | sync-file | Read / Write / Construct |
Signals
void | changed | Run First |
void | descoped | Run First |
void | plugin-added | Run First |
void | plugin-removed | Run First |
void | scoped | Run First |
Types and Values
#define | ANJUTA_SYSTEM_PROFILE_NAME |
enum | AnjutaProfileError |
struct | AnjutaProfile |
AnjutaProfilePriv |
Description
A anjuta profile contains the list of all plugins used in one Anjuta session. It is possible to add and remove plugins, check if one is included or get the whole list. The plugins list can be saved into a xml file and loaded from it.
A profile in an Anjuta session includes plugins from up to 3 different xml sources:
$prefix/share/anjuta/profiles/default.profile |
This contains the system plugins. It is loaded in special system profile and contains mandatory plugins for Anjuta. These plugins cannot be unloaded. Anjuta can load a different profile using the -P command line option. |
$project_dir/$project_name.anjuta |
This contains the project plugins. It lists mandatory plugins for the project. This file is version controlled and distributed with the source code. Every user working on the project uses the same one. If there is no project loaded, no project plugins are loaded. |
$project_dir/.anjuta/default.profile |
This contains the user plugins. This is the only list of plugins which is updated when the user add or remove one plugin. If there is no project loaded, the user home directory is used instead of the project directory but this list is used only in this case. There is no global user plugins list. |
Functions
ANJUTA_PROFILE_ERROR
#define ANJUTA_PROFILE_ERROR (anjuta_profile_error_quark())
Error domain for Anjuta profile. Errors in this domain will be from the AnjutaProfileError enumeration. See GError for more information on error domains.
anjuta_profile_new ()
AnjutaProfile * anjuta_profile_new (const gchar *name
,AnjutaPluginManager *plugin_manager
);
Create a new profile.
anjuta_profile_get_name ()
const gchar *
anjuta_profile_get_name (AnjutaProfile *profile
);
Get the profile name.
anjuta_profile_add_plugin ()
void anjuta_profile_add_plugin (AnjutaProfile *profile
,AnjutaPluginHandle *plugin
);
Add one plugin into the profile plugin list.
anjuta_profile_remove_plugin ()
void anjuta_profile_remove_plugin (AnjutaProfile *profile
,AnjutaPluginHandle *plugin
);
Remove one plugin from the profile plugin list.
anjuta_profile_add_plugins_from_xml ()
gboolean anjuta_profile_add_plugins_from_xml (AnjutaProfile *profile
,GFile *profile_xml_file
,gboolean exclude_from_sync
,GError **error
);
Add all plugins inscribed in the xml file into the profile plugin list.
Parameters
profile |
a AnjutaProfile object. |
|
profile_xml_file |
xml file containing plugin list. |
|
exclude_from_sync |
|
|
error |
error propagation and reporting. |
anjuta_profile_has_plugin ()
gboolean anjuta_profile_has_plugin (AnjutaProfile *profile
,AnjutaPluginHandle *plugin
);
Check if a plugin is included in the profile plugin list.
anjuta_profile_set_sync_file ()
void anjuta_profile_set_sync_file (AnjutaProfile *profile
,GFile *sync_file
);
Define the file used to save plugins list.
anjuta_profile_sync ()
gboolean anjuta_profile_sync (AnjutaProfile *profile
,GError **error
);
Save the current plugins list in the xml file set with anjuta_profile_set_sync_file()
.
anjuta_profile_load ()
gboolean anjuta_profile_load (AnjutaProfile *profile
,GError **error
);
Unload the profile
Property Details
The “plugin-manager”
property
“plugin-manager” AnjutaPluginManager *
The plugin manager to use for resolving plugins.
Flags: Read / Write / Construct
The “profile-name”
property
“profile-name” gchar *
Name of the plugin profile.
Flags: Read / Write / Construct
Default value: NULL
Signal Details
The “changed”
signal
void user_function (AnjutaProfile *profile, gpointer user_data)
Emitted when a plugin is added or removed from the list.
Parameters
profile |
a AnjutaProfile object. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
The “descoped”
signal
void user_function (AnjutaProfile *anjutaprofile, gpointer user_data)
Parameters
anjutaprofile |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
The “plugin-added”
signal
void user_function (AnjutaProfile *profile, gpointer plugin, gpointer user_data)
Emitted when a plugin is added in the list.
Parameters
profile |
a AnjutaProfile object. |
|
plugin |
the new plugin as a AnjutaPluginHandle. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
The “plugin-removed”
signal
void user_function (AnjutaProfile *profile, gpointer plugin, gpointer user_data)
Emitted when a plugin is removed from the list.
Parameters
profile |
a AnjutaProfile object. |
|
plugin |
the removed plugin as a AnjutaPluginHandle. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
The “scoped”
signal
void user_function (AnjutaProfile *anjutaprofile, gpointer user_data)
Parameters
anjutaprofile |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First