anjuta r4418 - in trunk: . libanjuta manuals/reference/libanjuta plugins/project-manager src
- From: sgranjoux svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4418 - in trunk: . libanjuta manuals/reference/libanjuta plugins/project-manager src
- Date: Wed, 3 Dec 2008 21:49:20 +0000 (UTC)
Author: sgranjoux
Date: Wed Dec 3 21:49:20 2008
New Revision: 4418
URL: http://svn.gnome.org/viewvc/anjuta?rev=4418&view=rev
Log:
* src/anjuta.c:
Allow to pass project path in command line instead of only URI
* plugins/project-manager/anjuta-project-manager.plugin.in,
libanjuta/anjuta-plugin-description.c,
libanjuta/anjuta-plugin-description.h,
libanjuta/anjuta-plugin-handle.c,
libanjuta/anjuta-profile-manager.c:
Fix #548873: File->Close project menu remains active after closing
a project
* manuals/reference/libanjuta/plugin-description-file.sgml,
manuals/reference/libanjuta/libanjuta-sections.txt,
libanjuta/anjuta-profile.c,
libanjuta/anjuta-profile.h,
libanjuta/anjuta-profile-manager.h:
Document AnjutaProfile and AnjutaProfileManager
Modified:
trunk/ChangeLog
trunk/libanjuta/anjuta-plugin-description.c
trunk/libanjuta/anjuta-plugin-description.h
trunk/libanjuta/anjuta-plugin-handle.c
trunk/libanjuta/anjuta-profile-manager.c
trunk/libanjuta/anjuta-profile-manager.h
trunk/libanjuta/anjuta-profile.c
trunk/libanjuta/anjuta-profile.h
trunk/manuals/reference/libanjuta/libanjuta-sections.txt
trunk/manuals/reference/libanjuta/plugin-description-file.sgml
trunk/plugins/project-manager/anjuta-project-manager.plugin.in
trunk/src/anjuta.c
Modified: trunk/libanjuta/anjuta-plugin-description.c
==============================================================================
--- trunk/libanjuta/anjuta-plugin-description.c (original)
+++ trunk/libanjuta/anjuta-plugin-description.c Wed Dec 3 21:49:20 2008
@@ -925,7 +925,7 @@
* @keyname: Key name.
* @val: Pointer to value to store retured value.
*
- * Returns the value of key as integer in the given section in current locale.
+ * Returns the value of key as integer in the given section.
*
* Return value: TRUE if sucessful, otherwise FALSE.
*/
@@ -951,3 +951,50 @@
return TRUE;
}
+
+/**
+ * anjuta_plugin_description_get_boolean:
+ * @df: an #AnjutaPluginDescription object.
+ * @section: Section name.
+ * @keyname: Key name.
+ * @val: Pointer to value to store retured value.
+ *
+ * Returns the value of key as boolean in the given section.
+ *
+ * Return value: TRUE if sucessful, otherwise FALSE.
+ */
+gboolean
+anjuta_plugin_description_get_boolean (AnjutaPluginDescription *df,
+ const char *section,
+ const char *keyname,
+ gboolean *val)
+{
+ gboolean res;
+ char *str;
+
+ *val = 0;
+
+ res = anjuta_plugin_description_get_raw (df, section, keyname, NULL, &str);
+ if (!res)
+ return FALSE;
+
+ if ((g_ascii_strcasecmp (str, "yes") == 0) ||
+ (g_ascii_strcasecmp (str, "true") == 0))
+ {
+ *val = TRUE;
+ }
+ else if ((g_ascii_strcasecmp (str, "no") == 0) ||
+ (g_ascii_strcasecmp (str, "false") == 0))
+
+ {
+ *val = FALSE;
+ }
+ else
+ {
+ res = FALSE;
+ }
+
+ g_free (str);
+
+ return res;
+}
Modified: trunk/libanjuta/anjuta-plugin-description.h
==============================================================================
--- trunk/libanjuta/anjuta-plugin-description.h (original)
+++ trunk/libanjuta/anjuta-plugin-description.h Wed Dec 3 21:49:20 2008
@@ -84,6 +84,11 @@
const gchar *keyname,
gint *val);
+gboolean anjuta_plugin_description_get_boolean (AnjutaPluginDescription *df,
+ const gchar *section,
+ const gchar *keyname,
+ gboolean *val);
+
gboolean anjuta_plugin_description_get_string (AnjutaPluginDescription *df,
const gchar *section,
const gchar *keyname,
Modified: trunk/libanjuta/anjuta-plugin-handle.c
==============================================================================
--- trunk/libanjuta/anjuta-plugin-handle.c (original)
+++ trunk/libanjuta/anjuta-plugin-handle.c Wed Dec 3 21:49:20 2008
@@ -472,6 +472,7 @@
AnjutaPluginHandle *plugin_handle;
AnjutaPluginDescription *desc;
char *str;
+ gboolean *enable;
gchar *contents;
gboolean success = TRUE;
@@ -542,18 +543,14 @@
g_free (str);
}
- if (anjuta_plugin_description_get_string (desc, "Anjuta Plugin",
- "UserActivatable", &str)) {
- if (str && strcasecmp (str, "no") == 0)
- {
- plugin_handle->priv->user_activatable = FALSE;
- /*
- DEBUG_PRINT ("Plugin '%s' is not user activatable",
- plugin_handle->priv->name?
- plugin_handle->priv->name : "Unknown");
- */
- }
- g_free (str);
+ if (anjuta_plugin_description_get_boolean (desc, "Anjuta Plugin",
+ "UserActivatable", &enable) && !enable) {
+ plugin_handle->priv->user_activatable = FALSE;
+ /*
+ DEBUG_PRINT ("Plugin '%s' is not user activatable",
+ plugin_handle->priv->name?
+ plugin_handle->priv->name : "Unknown");
+ */
}
if (anjuta_plugin_description_get_string (desc, "Anjuta Plugin",
Modified: trunk/libanjuta/anjuta-profile-manager.c
==============================================================================
--- trunk/libanjuta/anjuta-profile-manager.c (original)
+++ trunk/libanjuta/anjuta-profile-manager.c Wed Dec 3 21:49:20 2008
@@ -25,6 +25,13 @@
* @stability: Unstable
* @include: libanjuta/anjuta-profile-manager.h
*
+ * Anjuta uses up to two profiles. A "no project" profile is used when no
+ * project is loaded a project profile when one is loaded.
+ * If a second project is loaded, it is loaded in another instance of Anjuta.
+ * When a project is closed, Anjuta goes back to the "no project" profile.
+ *
+ * The profile manager can be in a frozen state where you can push or
+ * pop a profile from the stack without triggering a change of the profile.
*/
#include <string.h>
@@ -74,12 +81,17 @@
{
AnjutaProfileManagerPriv *priv;
priv = profile_manager->priv;
-
+
if (priv->profiles)
{
/* Add it current profile */
- anjuta_profile_add_plugin (ANJUTA_PROFILE (priv->profiles->data),
- plugin_desc);
+ gboolean exclude;
+
+ if (!anjuta_plugin_description_get_boolean (plugin_desc, "Anjuta Plugin", "ExcludeFromSession", &exclude) || !exclude)
+ {
+ anjuta_profile_add_plugin (ANJUTA_PROFILE (priv->profiles->data),
+ plugin_desc);
+ }
}
}
@@ -192,6 +204,15 @@
G_PARAM_READABLE |
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT));
+ /**
+ * AnjutaProfileManager::profile-pushed:
+ * @profile_manager: a #AnjutaProfileManager object.
+ * @profile: the new #AnjutaProfile added.
+ *
+ * Emitted when a profile is added in the stack. If the profile manager is
+ * not frozen, the current profile will be unloaded and the new one
+ * will be loaded.
+ */
profile_manager_signals[PROFILE_PUSHED] =
g_signal_new ("profile-pushed",
G_OBJECT_CLASS_TYPE (klass),
@@ -202,6 +223,16 @@
anjuta_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
ANJUTA_TYPE_PROFILE);
+
+ /**
+ * AnjutaProfileManager::profile-popped:
+ * @profile_manager: a #AnjutaProfileManager object.
+ * @profile: the current removed #AnjutaProfile.
+ *
+ * Emitted when a profile is removed from the stack. If the profile manager
+ * is not frozen, the current profile will be unloaded and the previous one
+ * will be loaded.
+ */
profile_manager_signals[PROFILE_POPPED] =
g_signal_new ("profile-popped",
G_OBJECT_CLASS_TYPE (klass),
@@ -212,6 +243,14 @@
anjuta_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
ANJUTA_TYPE_PROFILE);
+
+ /**
+ * AnjutaProfileManager::profile-descoped:
+ * @profile_manager: a #AnjutaProfileManager object.
+ * @profile: the old unloaded #AnjutaProfile.
+ *
+ * Emitted when a profile will be unloaded.
+ */
profile_manager_signals[PROFILE_DESCOPED] =
g_signal_new ("profile-descoped",
G_OBJECT_CLASS_TYPE (klass),
@@ -222,6 +261,14 @@
anjuta_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
ANJUTA_TYPE_PROFILE);
+
+ /**
+ * AnjutaProfileManager::profile-scoped:
+ * @profile_manager: a #AnjutaProfileManager object.
+ * @profile: the current loaded #AnjutaProfile.
+ *
+ * Emitted when a new profile is loaded.
+ */
profile_manager_signals[PROFILE_SCOPED] =
g_signal_new ("profile-scoped",
G_OBJECT_CLASS_TYPE (klass),
@@ -262,6 +309,14 @@
return our_type;
}
+/**
+ * anjuta_profile_manager_new:
+ * @plugin_manager: the #AnjutaPluginManager used by all profiles.
+ *
+ * Create a new profile manager.
+ *
+ * Return value: the new #AnjutaProfileManager object.
+ */
AnjutaProfileManager*
anjuta_profile_manager_new (AnjutaPluginManager *plugin_manager)
{
@@ -442,6 +497,18 @@
}
}
+/**
+ * anjuta_profile_manager_push:
+ * @profile_manager: the #AnjutaProfileManager object.
+ * @profile: the new #AnjutaProfile.
+ * @error: error propagation and reporting.
+ *
+ * Add a new profile at the top of the profile manager stack. If the profile
+ * manager is not frozen, this new profile will be loaded immediatly and
+ * become the current profile.
+ *
+ * Return value: TRUE on success, FALSE otherwise.
+ */
gboolean
anjuta_profile_manager_push (AnjutaProfileManager *profile_manager,
AnjutaProfile *profile, GError **error)
@@ -459,7 +526,20 @@
error);
}
-/* Only the last profile can be popped */
+/**
+ * anjuta_profile_manager_pop:
+ * @profile_manager: the #AnjutaProfileManager object.
+ * @profile_name: the name of the profile to remove.
+ * @error: error propagation and reporting.
+ *
+ * Remove a profile from the profile manager stack. If the manager is not
+ * frozen, only the current profile can be removed. It will be unloaded and
+ * the previous profile will be loaded.
+ * If the manager is frozen, the current profile or the last pushed profile
+ * can be removed.
+ *
+ * Return value: TRUE on success, FALSE otherwise.
+ */
gboolean
anjuta_profile_manager_pop (AnjutaProfileManager *profile_manager,
const gchar *profile_name, GError **error)
@@ -518,6 +598,15 @@
return FALSE;
}
+/**
+ * anjuta_profile_manager_freeze:
+ * @profile_manager: the #AnjutaProfileManager object.
+ *
+ * Freeze the plugin manager. In this state, plugins can be added and removed
+ * from the stack without triggering any change in the current profile. It is
+ * possible to freeze the manager several times but it will be back in its normal
+ * state only after as much call of anjuta_profile_manager_thaw().
+ */
void
anjuta_profile_manager_freeze (AnjutaProfileManager *profile_manager)
{
@@ -527,6 +616,17 @@
priv->freeze_count++;
}
+/**
+ * anjuta_profile_manager_thaw:
+ * @profile_manager: the #AnjutaProfileManager object.
+ * @error: error propagation and reporting.
+ *
+ * Put back the plugin manager in its normal mode after calling
+ * anjuta_profile_manager_freeze(). It will load a new profile if one has been
+ * added while the manager was frozen.
+ *
+ * Return value: TRUE on success, FALSE otherwise.
+ */
gboolean
anjuta_profile_manager_thaw (AnjutaProfileManager *profile_manager,
GError **error)
@@ -561,6 +661,14 @@
}
}
+/**
+ * anjuta_profile_manager_get_current :
+ * @profile_manager: A #AnjutaProfileManager object.
+ *
+ * Return the current profile.
+ *
+ * Return value: a #AnjutaProfile object or NULL if the profile stack is empty.
+ */
AnjutaProfile*
anjuta_profile_manager_get_current (AnjutaProfileManager *profile_manager)
{
Modified: trunk/libanjuta/anjuta-profile-manager.h
==============================================================================
--- trunk/libanjuta/anjuta-profile-manager.h (original)
+++ trunk/libanjuta/anjuta-profile-manager.h Wed Dec 3 21:49:20 2008
@@ -51,6 +51,11 @@
AnjutaProfile* profile);
};
+/**
+ * AnjutaProfileManager:
+ *
+ * Stores stack of #AnjutaProfile.
+ */
struct _AnjutaProfileManager
{
GObject parent_instance;
@@ -67,7 +72,7 @@
const gchar *profile_name, GError **error);
void anjuta_profile_manager_freeze (AnjutaProfileManager *profile_manager);
-gboolean anjuta_profile_manager_thaw (AnjutaProfileManager *plugin_manager,
+gboolean anjuta_profile_manager_thaw (AnjutaProfileManager *profile_manager,
GError **error);
AnjutaProfile* anjuta_profile_manager_get_current (AnjutaProfileManager *profile_manager);
Modified: trunk/libanjuta/anjuta-profile.c
==============================================================================
--- trunk/libanjuta/anjuta-profile.c (original)
+++ trunk/libanjuta/anjuta-profile.c Wed Dec 3 21:49:20 2008
@@ -25,6 +25,48 @@
* @stability: Unstable
* @include: libanjuta/anjuta-profile.h
*
+ * 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:
+ * <variablelist>
+ * <varlistentry>
+ * <term>$prefix/share/anjuta/profiles/default.profile</term>
+ * <listitem>
+ * <para>
+ * This contains the system plugins. It is loaded in every profile and
+ * contains mandatory plugins for Anjuta. These plugins cannot be
+ * unloaded.
+ * </para>
+ * </listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>$project_dir/$project_name.anjuta</term>
+ * <listitem>
+ * <para>
+ * 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.
+ * </para>
+ * </listitem>
+ * </varlistentry>
+ * <varlistentry>
+ * <term>$project_dir/.anjuta/default.profile</term>
+ * <listitem>
+ * <para>
+ * 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.
+ * </para>
+ * </listitem>
+ * </varlistentry>
+ * </variablelist>
*/
#include <glib/gi18n.h>
@@ -242,6 +284,13 @@
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT));
+ /**
+ * AnjutaProfile::plugin-added:
+ * @profile: a #AnjutaProfile object.
+ * @plugin: the new plugin as a #AnjutaPluginDescription.
+ *
+ * Emitted when a plugin is added in the list.
+ */
profile_signals[PLUGIN_ADDED] =
g_signal_new ("plugin-added",
G_OBJECT_CLASS_TYPE (klass),
@@ -252,6 +301,13 @@
G_TYPE_NONE, 1,
G_TYPE_POINTER);
+ /**
+ * AnjutaProfile::plugin-removed:
+ * @profile: a #AnjutaProfile object.
+ * @plugin: the removed plugin as a #AnjutaPluginDescription.
+ *
+ * Emitted when a plugin is removed from the list.
+ */
profile_signals[PLUGIN_REMOVED] =
g_signal_new ("plugin-removed",
G_OBJECT_CLASS_TYPE (klass),
@@ -261,6 +317,14 @@
anjuta_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1,
G_TYPE_POINTER);
+
+ /**
+ * AnjutaProfile::changed:
+ * @profile: a #AnjutaProfile object.
+ * @plugin_list: the new plugins list.
+ *
+ * Emitted when a plugin is added or removed from the list.
+ */
profile_signals[CHANGED] =
g_signal_new ("changed",
G_OBJECT_CLASS_TYPE (klass),
@@ -300,6 +364,15 @@
return our_type;
}
+/**
+ * anjuta_profile_new:
+ * @name: the new profile name.
+ * @plugin_manager: the #AnjutaPluginManager used by this profile.
+ *
+ * Create a new profile.
+ *
+ * Return value: the new #AnjutaProfile object.
+ */
AnjutaProfile*
anjuta_profile_new (const gchar* name, AnjutaPluginManager *plugin_manager)
{
@@ -309,6 +382,14 @@
return ANJUTA_PROFILE (profile);
}
+/**
+ * anjuta_profile_get_name:
+ * @profile: a #AnjutaProfile object.
+ *
+ * Get the profile name.
+ *
+ * Return value: the profile name.
+ */
const gchar*
anjuta_profile_get_name (AnjutaProfile *profile)
{
@@ -318,6 +399,13 @@
return priv->name;
}
+/**
+ * anjuta_profile_add_plugin:
+ * @profile: a #AnjutaProfile object.
+ * @plugin: a #AnjutaPluginDescription.
+ *
+ * Add one plugin into the profile plugin list.
+ */
void
anjuta_profile_add_plugin (AnjutaProfile *profile,
AnjutaPluginDescription *plugin)
@@ -334,6 +422,13 @@
}
}
+/**
+ * anjuta_profile_remove_plugin:
+ * @profile: a #AnjutaProfile object.
+ * @plugin: a #AnjutaPluginDescription.
+ *
+ * Remove one plugin from the profile plugin list.
+ */
void
anjuta_profile_remove_plugin (AnjutaProfile *profile,
AnjutaPluginDescription *plugin)
@@ -350,6 +445,15 @@
}
}
+/**
+ * anjuta_profile_has_plugin:
+ * @profile: a #AnjutaProfile object
+ * @plugin: a #AnjutaPluginDescription
+ *
+ * Check if a plugin is included in the profile plugin list.
+ *
+ * Return value: TRUE if the plugin is included in the list.
+ */
gboolean
anjuta_profile_has_plugin (AnjutaProfile *profile,
AnjutaPluginDescription *plugin)
@@ -362,6 +466,14 @@
g_list_find (priv->plugins, plugin) != NULL);
}
+/**
+ * anjuta_profile_get_plugins:
+ * @profile: a #AnjutaProfile object.
+ *
+ * Get the profile current plugins list.
+ *
+ * Return value: the plugins list.
+ */
GList*
anjuta_profile_get_plugins (AnjutaProfile *profile)
{
@@ -609,6 +721,17 @@
return descs_list;
}
+/**
+ * anjuta_profile_add_plugins_from_xml:
+ * @profile: a #AnjutaProfile object.
+ * @profile_xml_file: xml file containing plugin list.
+ * @exclude_from_sync: TRUE if these plugins shouldn't be saved in user session.
+ * @error: error propagation and reporting.
+ *
+ * Add all plugins inscribed in the xml file into the profile plugin list.
+ *
+ * Return value: TRUE on success, FALSE otherwise.
+ */
gboolean
anjuta_profile_add_plugins_from_xml (AnjutaProfile *profile,
GFile* profile_xml_file,
@@ -661,13 +784,13 @@
/**
* anjuta_profile_to_xml :
- * @profile: A #AnjutaProfile object
+ * @profile: a #AnjutaProfile object.
*
* Return a string in xml format containing the list of saved plugins.
*
* Return value: a newly-allocated string that must be freed with g_free().
*/
-gchar*
+static gchar*
anjuta_profile_to_xml (AnjutaProfile *profile)
{
GList *node;
@@ -686,21 +809,18 @@
if (!g_hash_table_lookup (priv->plugins_to_exclude_from_sync,
node->data))
{
- gchar *user_activatable = NULL;
+ gboolean user_activatable;
gchar *name = NULL, *plugin_id = NULL;
- anjuta_plugin_description_get_string (desc, "Anjuta Plugin",
- "UserActivatable",
- &user_activatable);
- /* Do not save plugins that are auto activated */
- if (user_activatable && strcmp (user_activatable, "no") == 0)
+ if (anjuta_plugin_description_get_boolean (desc, "Anjuta Plugin",
+ "UserActivatable", &user_activatable)
+ && !user_activatable)
{
- g_free (user_activatable);
+ /* Do not save plugins that are auto activated */
node = g_list_next (node);
- continue;
}
- g_free (user_activatable);
+
/* Do not use the _locale_ version because it's not in UI */
anjuta_plugin_description_get_string (desc, "Anjuta Plugin",
"Name", &name);
@@ -742,8 +862,8 @@
/**
* anjuta_profile_set_sync_file:
- * @profile: A #AnjutaProfile object
- * @sync_file: File used to save profile
+ * @profile: a #AnjutaProfile object.
+ * @sync_file: file used to save profile.
*
* Define the file used to save plugins list.
*/
@@ -766,12 +886,12 @@
/**
* anjuta_profile_sync:
- * @profile: A #AnjutaProfile object
- * @error: Error propagation and reporting
+ * @profile: a #AnjutaProfile object.
+ * @error: error propagation and reporting.
*
* Save the current plugins list in the xml file set with anjuta_profile_set_sync_file().
*
- * Return value: TRUE on success, FALSE otherwise
+ * Return value: TRUE on success, FALSE otherwise.
*/
gboolean
anjuta_profile_sync (AnjutaProfile *profile, GError **error)
Modified: trunk/libanjuta/anjuta-profile.h
==============================================================================
--- trunk/libanjuta/anjuta-profile.h (original)
+++ trunk/libanjuta/anjuta-profile.h Wed Dec 3 21:49:20 2008
@@ -34,8 +34,24 @@
#define ANJUTA_IS_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TYPE_PROFILE))
#define ANJUTA_IS_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_PROFILE))
#define ANJUTA_PROFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANJUTA_TYPE_PROFILE, AnjutaProfileClass))
+
+/**
+ * ANJUTA_PROFILE_ERROR:
+ *
+ * Error domain for Anjuta profile. Errors in this domain will be from the
+ * #AnjutaProfileError enumeration. See #GError for more information
+ * on error domains.
+ */
#define ANJUTA_PROFILE_ERROR (anjuta_profile_error_quark())
+/**
+ * AnjutaProfileError:
+ * @ANJUTA_PROFILE_ERROR_URI_READ_FAILED: Fail to read xml plugins list file.
+ * @ANJUTA_PROFILE_ERROR_URI_WRITE_FAILED: Fail to write xml plugins list file.
+ *
+ * Error codes returned by anjuta profile functions.
+ *
+ */
typedef enum
{
ANJUTA_PROFILE_ERROR_URI_READ_FAILED,
@@ -58,6 +74,11 @@
void(* changed) (AnjutaProfile *self, GList *plugins);
};
+/**
+ * AnjutaProfile:
+ *
+ * Stores a plugin list.
+ */
struct _AnjutaProfile
{
GObject parent_instance;
@@ -67,7 +88,7 @@
GQuark anjuta_profile_error_quark (void);
GType anjuta_profile_get_type (void) G_GNUC_CONST;
-AnjutaProfile* anjuta_profile_new (const gchar *profile_name,
+AnjutaProfile* anjuta_profile_new (const gchar *name,
AnjutaPluginManager *plugin_manager);
const gchar *anjuta_profile_get_name (AnjutaProfile *profile);
void anjuta_profile_add_plugin (AnjutaProfile *profile,
@@ -82,7 +103,6 @@
AnjutaPluginDescription *plugin);
GList* anjuta_profile_get_plugins (AnjutaProfile *profile);
-gchar* anjuta_profile_to_xml (AnjutaProfile *profile);
void anjuta_profile_set_sync_file (AnjutaProfile *profile,
GFile *sync_file);
gboolean anjuta_profile_sync (AnjutaProfile *profile, GError **error);
Modified: trunk/manuals/reference/libanjuta/libanjuta-sections.txt
==============================================================================
--- trunk/manuals/reference/libanjuta/libanjuta-sections.txt (original)
+++ trunk/manuals/reference/libanjuta/libanjuta-sections.txt Wed Dec 3 21:49:20 2008
@@ -452,10 +452,8 @@
<FILE>anjuta-profile</FILE>
ANJUTA_PROFILE_ERROR
AnjutaProfileError
-AnjutaProfilePriv
<TITLE>AnjutaProfile</TITLE>
AnjutaProfile
-anjuta_profile_error_quark
anjuta_profile_new
anjuta_profile_get_name
anjuta_profile_add_plugin
@@ -478,7 +476,6 @@
<SECTION>
<FILE>anjuta-profile-manager</FILE>
-AnjutaProfileManagerPriv
<TITLE>AnjutaProfileManager</TITLE>
AnjutaProfileManager
anjuta_profile_manager_new
@@ -1790,6 +1787,7 @@
anjuta_plugin_description_foreach_key
anjuta_plugin_description_get_raw
anjuta_plugin_description_get_integer
+anjuta_plugin_description_get_boolean
anjuta_plugin_description_get_string
anjuta_plugin_description_get_locale_string
</SECTION>
Modified: trunk/manuals/reference/libanjuta/plugin-description-file.sgml
==============================================================================
--- trunk/manuals/reference/libanjuta/plugin-description-file.sgml (original)
+++ trunk/manuals/reference/libanjuta/plugin-description-file.sgml Wed Dec 3 21:49:20 2008
@@ -89,6 +89,42 @@
</para>
</listitem>
</varlistentry>
+ <varlistentry><term>Dependencies</term>
+ <listitem>
+ <para>
+ Name of other plugins needed by this one.
+ These other plugins will be loaded before.
+ It can be useful to be sure that
+ a menu item has been created.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry><term>UserActivatable</term>
+ <listitem>
+ <para>
+ Set to "no", if the plugin cannot be loaded
+ by the user. Such plugins are loaded
+ automatically by Anjuta when needed. It is
+ the case for plugin providing support for
+ some file types by example. By default a plugin can
+ be loaded by the user.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry><term>ExcludeFromSession</term>
+ <listitem>
+ <para>
+ Set to "yes", if the plugin is not saved in
+ the user session. Such plugin must be
+ non user activatable too. This is the case
+ for project manager plugin. When activated it
+ loads a new session, so it does
+ not belong to the first session and should not
+ be saved inside. By default all plugins are saved
+ in the current user session.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
Here is a typical plugin meta-data file
Modified: trunk/plugins/project-manager/anjuta-project-manager.plugin.in
==============================================================================
--- trunk/plugins/project-manager/anjuta-project-manager.plugin.in (original)
+++ trunk/plugins/project-manager/anjuta-project-manager.plugin.in Wed Dec 3 21:49:20 2008
@@ -5,6 +5,7 @@
Icon=anjuta-project-manager-plugin-48.png
Interfaces=IAnjutaFile,IAnjutaProjectManager
UserActivatable=no
+ExcludeFromSession=yes
[File Loader]
SupportedMimeTypes=application/x-anjuta
Modified: trunk/src/anjuta.c
==============================================================================
--- trunk/src/anjuta.c (original)
+++ trunk/src/anjuta.c Wed Dec 3 21:49:20 2008
@@ -475,7 +475,7 @@
/* Load project file */
if (project_file)
{
- GFile* file = g_file_new_for_uri (project_file);
+ GFile* file = g_file_new_for_commandline_arg (project_file);
IAnjutaFileLoader *loader;
loader = anjuta_shell_get_interface (ANJUTA_SHELL (app),
IAnjutaFileLoader, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]