[anjuta/system-db-refactor] libanjuta: Added anjuta_plugin_get_shell()



commit d7c6b690cc1b0f4da3ee32d722d9b45b8bbee1e5
Author: Johannes Schmid <jhs gnome org>
Date:   Sun Feb 13 14:11:55 2011 +0100

    libanjuta: Added anjuta_plugin_get_shell()
    
    Should be used instead of plugin->shell in the future. plugin->shell will
    eventually become private

 libanjuta/anjuta-plugin.c |   18 ++++++++++++++++++
 libanjuta/anjuta-plugin.h |    2 ++
 2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/libanjuta/anjuta-plugin.c b/libanjuta/anjuta-plugin.c
index 27d0e50..44dd51a 100644
--- a/libanjuta/anjuta-plugin.c
+++ b/libanjuta/anjuta-plugin.c
@@ -319,6 +319,11 @@ anjuta_plugin_class_init (AnjutaPluginClass *class)
 	class->activate = NULL;
 	class->deactivate = NULL;
 
+	/**
+	 * AnjutaPlugin:shell:
+	 *
+	 * The #AnjutaShell object associated with this plugin
+	 */
 	g_object_class_install_property
 		(object_class,
 		 PROP_SHELL,
@@ -585,3 +590,16 @@ anjuta_plugin_is_active (AnjutaPlugin *plugin)
 {
 	return plugin->priv->activated;
 }
+
+/**
+ * anjuta_plugin_get_shell:
+ * @plugin: a #AnjutaPlugin
+ * 
+ * Returns: The #AnjutaShell object associated with this plugin
+ */
+AnjutaShell *
+anjuta_plugin_get_shell (AnjutaPlugin* plugin)
+{
+	return plugin->shell;
+}
+
diff --git a/libanjuta/anjuta-plugin.h b/libanjuta/anjuta-plugin.h
index 2d8e280..9ef3c46 100644
--- a/libanjuta/anjuta-plugin.h
+++ b/libanjuta/anjuta-plugin.h
@@ -116,6 +116,8 @@ guint anjuta_plugin_add_watch (AnjutaPlugin *plugin,
 void anjuta_plugin_remove_watch (AnjutaPlugin *plugin, guint id,
 								 gboolean send_remove);
 
+AnjutaShell *anjuta_plugin_get_shell (AnjutaPlugin* plugin);
+
 /**
  * ANJUTA_PLUGIN_BEGIN:
  * @class_name: Name of the class. e.g. EditorPlugin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]