gtranslator r3687 - in trunk/src: . plugin-system



Author: icq
Date: Mon Sep 22 09:43:00 2008
New Revision: 3687
URL: http://svn.gnome.org/viewvc/gtranslator?rev=3687&view=rev

Log:
Squashed commit of the following:

commit ddd246f1acc379a0369342cf7df42ad4224dbf5b
Author: Ignacio Casal Quinteiro <nacho resa gmail com>
Date:   Mon Aug 11 21:43:22 2008 +0200

    2008-08-11  Ignacio Casal Quinteiro  <nacho resa gmail com>

    	* plugin-system/module.c (gtranslator_module_load),
    	(gtranslator_module_class_real_garbage_collect),
    	(gtranslator_module_finalize),
    (gtranslator_module_get_property),
    	(gtranslator_module_set_property),
    (gtranslator_module_class_init),
    	(gtranslator_module_class_garbage_collect),
    	(gtranslator_module_new_object), (gtranslator_module_get_path),
    	(gtranslator_module_get_module_name):
    	* plugin-system/module.h:
    	* plugin-system/plugin-info-priv.h:
    	* plugin-system/plugin-info.c (_gtranslator_plugin_info_new):
    	* plugin-system/plugin-info.h:
    	* plugin-system/plugin-manager.c:
    	* plugin-system/plugins-engine.c
    	(gtranslator_plugins_engine_load_dir),
    	(gtranslator_plugins_engine_garbage_collect),
    	(compare_plugin_info_and_name),
    	(gtranslator_plugins_engine_get_plugin_info),
    (load_plugin_module):
    	* plugin-system/plugins-engine.h:
    	* plugin-system/update-from-gedit.sh:
    	Synchronized with gedit.

Modified:
   trunk/src/ChangeLog
   trunk/src/plugin-system/module.c
   trunk/src/plugin-system/module.h
   trunk/src/plugin-system/plugin-info-priv.h
   trunk/src/plugin-system/plugin-info.c
   trunk/src/plugin-system/plugin-info.h
   trunk/src/plugin-system/plugin-manager.c
   trunk/src/plugin-system/plugins-engine.c
   trunk/src/plugin-system/plugins-engine.h
   trunk/src/plugin-system/update-from-gedit.sh

Modified: trunk/src/plugin-system/module.c
==============================================================================
--- trunk/src/plugin-system/module.c	(original)
+++ trunk/src/plugin-system/module.c	Mon Sep 22 09:43:00 2008
@@ -33,7 +33,7 @@
  * list of people on the gtranslator Team.  
  * See the ChangeLog files for a list of changes. 
  *
- * $Id: module.c 5367 2006-12-17 14:29:49Z pborelli $
+ * $Id: module.c 6314 2008-06-05 12:57:53Z pborelli $
  */
 
 #include "config.h"
@@ -41,69 +41,32 @@
 #include "module.h"
 //#include "gtranslator-debug.h"
 
-#include <gmodule.h>
-
-typedef struct _GtranslatorModuleClass GtranslatorModuleClass;
-
-struct _GtranslatorModuleClass
-{
-	GTypeModuleClass parent_class;
-};
-
-struct _GtranslatorModule
-{
-	GTypeModule parent_instance;
-
-	GModule *library;
-
-	gchar *path;
-	GType type;
-};
-
 typedef GType (*GtranslatorModuleRegisterFunc) (GTypeModule *);
 
-static void gtranslator_module_init		(GtranslatorModule *action);
-static void gtranslator_module_class_init	(GtranslatorModuleClass *class);
-
-static GObjectClass *parent_class = NULL;
-
-GType
-gtranslator_module_get_type (void)
-{
-	static GType type = 0;
-
-	if (G_UNLIKELY (type == 0))
-	{
-		static const GTypeInfo type_info =
-		{
-			sizeof (GtranslatorModuleClass),
-			(GBaseInitFunc) NULL,
-			(GBaseFinalizeFunc) NULL,
-			(GClassInitFunc) gtranslator_module_class_init,
-			(GClassFinalizeFunc) NULL,
-			NULL,
-			sizeof (GtranslatorModule),
-			0, /* n_preallocs */
-			(GInstanceInitFunc) gtranslator_module_init,
-		};
-
-		type = g_type_register_static (G_TYPE_TYPE_MODULE,
-					       "GtranslatorModule",
-					       &type_info, 0);
-	}
+enum {
+	PROP_0,
+	PROP_MODULE_NAME,
+	PROP_PATH
+};
 
-	return type;
-}
+G_DEFINE_TYPE (GtranslatorModule, gtranslator_module, G_TYPE_TYPE_MODULE);
 
 static gboolean
 gtranslator_module_load (GTypeModule *gmodule)
 {
 	GtranslatorModule *module = GTR_MODULE (gmodule);
 	GtranslatorModuleRegisterFunc register_func;
+	gchar *path;
+
+	g_message( "Loading %s module from %s",
+			     module->module_name, module->path);
 
-	g_message( "Loading %s", module->path);
+	path = g_module_build_path (module->path, module->module_name);
+	g_return_val_if_fail (path != NULL, FALSE);
+	g_message( "Module filename: %s", path);
 
-	module->library = g_module_open (module->path, 0);
+	module->library = g_module_open (path, 0);
+	g_free (path);
 
 	if (module->library == NULL)
 	{
@@ -136,7 +99,7 @@
 
 	if (module->type == 0)
 	{
-		g_warning ("Invalid gtranslator plugin contained by module %s", module->path);
+		g_warning ("Invalid gtranslator plugin contained by module %s", module->module_name);
 		return FALSE;
 	}
 
@@ -156,25 +119,10 @@
 	module->type = 0;
 }
 
-const gchar *
-gtranslator_module_get_path (GtranslatorModule *module)
-{
-	g_return_val_if_fail (GTR_IS_MODULE (module), NULL);
-
-	return module->path;
-}
-
-GObject *
-gtranslator_module_new_object (GtranslatorModule *module)
+static void
+gtranslator_module_class_real_garbage_collect (void)
 {
-	g_message( "Creating object of type %s", g_type_name (module->type));
-
-	if (module->type == 0)
-	{
-		return NULL;
-	}
-
-	return g_object_new (module->type, NULL);
+	/* Do nothing */
 }
 
 static void
@@ -191,38 +139,120 @@
 	g_message( "GtranslatorModule %p finalising", module);
 
 	g_free (module->path);
+	g_free (module->module_name);
 
-	G_OBJECT_CLASS (parent_class)->finalize (object);
+	G_OBJECT_CLASS (gtranslator_module_parent_class)->finalize (object);
 }
 
 static void
-gtranslator_module_class_init (GtranslatorModuleClass *class)
+gtranslator_module_get_property (GObject    *object,
+			   guint       prop_id,
+			   GValue     *value,
+			   GParamSpec *pspec)
 {
-	GObjectClass *object_class = G_OBJECT_CLASS (class);
-	GTypeModuleClass *module_class = G_TYPE_MODULE_CLASS (class);
+	GtranslatorModule *module = GTR_MODULE (object);
+
+	switch (prop_id)
+	{
+		case PROP_MODULE_NAME:
+			g_value_set_string (value, module->module_name);
+			break;
+		case PROP_PATH:
+			g_value_set_string (value, module->path);
+			break;
+		default:
+			g_return_if_reached ();
+	}
+}
 
-	parent_class = (GObjectClass *) g_type_class_peek_parent (class);
+static void
+gtranslator_module_set_property (GObject      *object,
+			   guint         prop_id,
+			   const GValue *value,
+			   GParamSpec   *pspec)
+{
+	GtranslatorModule *module = GTR_MODULE (object);
 
+	switch (prop_id)
+	{
+		case PROP_MODULE_NAME:
+			module->module_name = g_value_dup_string (value);
+			g_type_module_set_name (G_TYPE_MODULE (object),
+						module->module_name);
+			break;
+		case PROP_PATH:
+			module->path = g_value_dup_string (value);
+			break;
+		default:
+			g_return_if_reached ();
+	}
+}
+
+static void
+gtranslator_module_class_init (GtranslatorModuleClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GTypeModuleClass *module_class = G_TYPE_MODULE_CLASS (klass);
+
+	object_class->set_property = gtranslator_module_set_property;
+	object_class->get_property = gtranslator_module_get_property;
 	object_class->finalize = gtranslator_module_finalize;
 
 	module_class->load = gtranslator_module_load;
 	module_class->unload = gtranslator_module_unload;
+
+	klass->garbage_collect = gtranslator_module_class_real_garbage_collect;
+
+	g_object_class_install_property (object_class,
+					 PROP_MODULE_NAME,
+					 g_param_spec_string ("module-name",
+							      "Module Name",
+							      "The module to load for this plugin",
+							      NULL,
+							      G_PARAM_READWRITE |
+							      G_PARAM_CONSTRUCT_ONLY));
+
+	g_object_class_install_property (object_class,
+					 PROP_PATH,
+					 g_param_spec_string ("path",
+							      "Path",
+							      "The path to use when loading this module",
+							      NULL,
+							      G_PARAM_READWRITE |
+							      G_PARAM_CONSTRUCT_ONLY));
 }
 
-GtranslatorModule *
-gtranslator_module_new (const gchar *path)
+void
+gtranslator_module_class_garbage_collect (GtranslatorModuleClass *klass)
 {
-	GtranslatorModule *result;
+	g_return_if_fail (GTR_IS_MODULE_CLASS (klass));
 
-	if (path == NULL || path[0] == '\0')
-	{
-		return NULL;
-	}
+	GTR_MODULE_CLASS (klass)->garbage_collect ();
+}
+
+GObject *
+gtranslator_module_new_object (GtranslatorModule *module)
+{
+	g_return_val_if_fail (module->type != 0, NULL);
 
-	result = g_object_new (GTR_TYPE_MODULE, NULL);
+	g_message( "Creating object of type %s",
+			     g_type_name (module->type));
 
-	g_type_module_set_name (G_TYPE_MODULE (result), path);
-	result->path = g_strdup (path);
+	return g_object_new (module->type, NULL);
+}
+
+const gchar *
+gtranslator_module_get_path (GtranslatorModule *module)
+{
+	g_return_val_if_fail (GTR_IS_MODULE (module), NULL);
+
+	return module->path;
+}
+
+const gchar *
+gtranslator_module_get_module_name (GtranslatorModule *module)
+{
+	g_return_val_if_fail (GTR_IS_MODULE (module), NULL);
 
-	return result;
+	return module->module_name;
 }

Modified: trunk/src/plugin-system/module.h
==============================================================================
--- trunk/src/plugin-system/module.h	(original)
+++ trunk/src/plugin-system/module.h	Mon Sep 22 09:43:00 2008
@@ -33,13 +33,14 @@
  * list of people on the gtranslator Team.  
  * See the ChangeLog files for a list of changes. 
  *
- * $Id: module.h 5263 2006-10-08 14:26:02Z pborelli $
+ * $Id: module.h 6263 2008-05-05 10:52:10Z sfre $
  */
  
-#ifndef GTR_MODULE_H
-#define GTR_MODULE_H
+#ifndef __GTR_MODULE_H__
+#define __GTR_MODULE_H__
 
 #include <glib-object.h>
+#include <gmodule.h>
 
 G_BEGIN_DECLS
 
@@ -47,19 +48,43 @@
 #define GTR_MODULE(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTR_TYPE_MODULE, GtranslatorModule))
 #define GTR_MODULE_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GTR_TYPE_MODULE, GtranslatorModuleClass))
 #define GTR_IS_MODULE(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTR_TYPE_MODULE))
-#define GTR_IS_MODULE_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((obj), GTR_TYPE_MODULE))
+#define GTR_IS_MODULE_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GTR_TYPE_MODULE))
 #define GTR_MODULE_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS((obj), GTR_TYPE_MODULE, GtranslatorModuleClass))
 
-typedef struct _GtranslatorModule	GtranslatorModule;
+typedef struct _GtranslatorModule GtranslatorModule;
 
-GType		 gtranslator_module_get_type		(void) G_GNUC_CONST;
+struct _GtranslatorModule
+{
+	GTypeModule parent;
+
+	GModule *library;
+
+	gchar *path;
+	gchar *module_name;
+	GType type;
+};
+
+typedef struct _GtranslatorModuleClass GtranslatorModuleClass;
+
+struct _GtranslatorModuleClass
+{
+	GTypeModuleClass parent_class;
 
-GtranslatorModule	*gtranslator_module_new		(const gchar *path);
+	/* Virtual class methods */
+	void		 (* garbage_collect)	();
+};
+
+GType		 gtranslator_module_get_type		(void) G_GNUC_CONST;
 
 const gchar	*gtranslator_module_get_path		(GtranslatorModule *module);
 
+const gchar	*gtranslator_module_get_module_name	(GtranslatorModule *module);
+
 GObject		*gtranslator_module_new_object	(GtranslatorModule *module);
 
+void		 gtranslator_module_class_garbage_collect
+						(GtranslatorModuleClass *klass);
+
 G_END_DECLS
 
 #endif

Modified: trunk/src/plugin-system/plugin-info-priv.h
==============================================================================
--- trunk/src/plugin-system/plugin-info-priv.h	(original)
+++ trunk/src/plugin-system/plugin-info-priv.h	Mon Sep 22 09:43:00 2008
@@ -35,12 +35,6 @@
 #include "plugin-info.h"
 #include "plugin.h"
 
-typedef enum
-{
-	GTR_PLUGIN_LOADER_C,
-	GTR_PLUGIN_LOADER_PY,
-} GtranslatorPluginLoader;
-
 struct _GtranslatorPluginInfo
 {
 	gint               refcount;
@@ -48,8 +42,8 @@
 	gchar             *file;
 
 	gchar             *module_name;
-	GtranslatorPluginLoader  loader;
-	GTypeModule       *module;
+	GType              module_type;
+	GtranslatorModule       *module;
 	gchar            **dependencies;
 
 	gchar             *name;

Modified: trunk/src/plugin-system/plugin-info.c
==============================================================================
--- trunk/src/plugin-system/plugin-info.c	(original)
+++ trunk/src/plugin-system/plugin-info.c	Mon Sep 22 09:43:00 2008
@@ -42,6 +42,10 @@
 //#include "gtranslator-debug.h"
 #include "plugin.h"
 
+#ifdef ENABLE_PYTHON
+#include "gtranslator-python-module.h"
+#endif
+
 void
 _gtranslator_plugin_info_ref (GtranslatorPluginInfo *info)
 {
@@ -192,16 +196,17 @@
 				     NULL);
 	if (str && strcmp(str, "python") == 0)
 	{
-		info->loader = GTR_PLUGIN_LOADER_PY;
 #ifndef ENABLE_PYTHON
 		g_warning ("Cannot load Python plugin '%s' since gtranslator was not "
 			   "compiled with Python support.", file);
 		goto error;
+#else
+		info->module_type = GTR_TYPE_PYTHON_MODULE;
 #endif
 	}
 	else
 	{
-		info->loader = GTR_PLUGIN_LOADER_C;
+		info->module_type = GTR_TYPE_MODULE;
 	}
 	g_free (str);
 

Modified: trunk/src/plugin-system/plugin-info.h
==============================================================================
--- trunk/src/plugin-system/plugin-info.h	(original)
+++ trunk/src/plugin-system/plugin-info.h	Mon Sep 22 09:43:00 2008
@@ -33,6 +33,7 @@
 #define __GTR_PLUGIN_INFO_H__
 
 #include <glib-object.h>
+#include "module.h"
 
 G_BEGIN_DECLS
 

Modified: trunk/src/plugin-system/plugin-manager.c
==============================================================================
--- trunk/src/plugin-system/plugin-manager.c	(original)
+++ trunk/src/plugin-system/plugin-manager.c	Mon Sep 22 09:43:00 2008
@@ -26,7 +26,7 @@
  * list of people on the gtranslator Team.  
  * See the ChangeLog files for a list of changes. 
  *
- * $Id: plugin-manager.c 6079 2008-01-12 20:18:55Z sdeburca $
+ * $Id: plugin-manager.c 6371 2008-08-09 13:43:02Z jessevdk $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -36,7 +36,6 @@
 #include <string.h>
 
 #include <glib/gi18n.h>
-#include <glade/glade-xml.h>
 
 #include "plugin-manager.h"
 #include "utils.h"

Modified: trunk/src/plugin-system/plugins-engine.c
==============================================================================
--- trunk/src/plugin-system/plugins-engine.c	(original)
+++ trunk/src/plugin-system/plugins-engine.c	Mon Sep 22 09:43:00 2008
@@ -25,7 +25,7 @@
  * list of people on the gtranslator Team.  
  * See the ChangeLog files for a list of changes. 
  *
- * $Id: plugins-engine.c 6052 2008-01-04 17:32:52Z sfre $
+ * $Id: plugins-engine.c 6376 2008-08-10 14:01:38Z pborelli $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -84,13 +84,6 @@
 static void	gtranslator_plugins_engine_deactivate_plugin_real (GtranslatorPluginsEngine *engine,
 							     GtranslatorPluginInfo    *info);
 
-static gint
-compare_plugin_info (GtranslatorPluginInfo *info1,
-		     GtranslatorPluginInfo *info2)
-{
-	return strcmp (info1->module_name, info2->module_name);
-}
-
 static void
 gtranslator_plugins_engine_load_dir (GtranslatorPluginsEngine *engine,
 			       const gchar        *dir,
@@ -129,9 +122,7 @@
 
 			/* If a plugin with this name has already been loaded
 			 * drop this one (user plugins override system plugins) */
-			if (g_list_find_custom (engine->priv->plugin_list,
-						info,
-						(GCompareFunc)compare_plugin_info) != NULL)
+			if (gtranslator_plugins_engine_get_plugin_info (engine, info->module_name) != NULL)
 			{
 				g_warning ("Two or more plugins named '%s'. "
 					   "Only the first will be considered.\n",
@@ -239,9 +230,15 @@
 void
 gtranslator_plugins_engine_garbage_collect (GtranslatorPluginsEngine *engine)
 {
-#ifdef ENABLE_PYTHON
-	gtranslator_python_garbage_collect ();
-#endif
+	GType *module_types = g_type_children (GTR_TYPE_MODULE, NULL);
+	unsigned i;
+	for (i = 0; module_types[i] != 0; i++)
+	{
+		gpointer klass = g_type_class_peek (module_types[i]);
+		if (klass != NULL)
+			gtranslator_module_class_garbage_collect (klass);
+	}
+	g_free (module_types);
 }
 
 static void
@@ -325,10 +322,26 @@
 	return engine->priv->plugin_list;
 }
 
+static gint
+compare_plugin_info_and_name (GtranslatorPluginInfo *info,
+			      const gchar *module_name)
+{
+	return strcmp (info->module_name, module_name);
+}
+
+GtranslatorPluginInfo *
+gtranslator_plugins_engine_get_plugin_info (GtranslatorPluginsEngine *engine,
+				      const gchar        *name)
+{
+	GList *l = g_list_find_custom (engine->priv->plugin_list,
+				       name,
+				       (GCompareFunc) compare_plugin_info_and_name);
+	return l == NULL ? NULL : (GtranslatorPluginInfo *) l->data;
+}
+
 static gboolean
 load_plugin_module (GtranslatorPluginInfo *info)
 {
-	gchar *path;
 	gchar *dirname;
 
 	//gtranslator_debug (DEBUG_PLUGINS);
@@ -338,107 +351,52 @@
 	g_return_val_if_fail (info->module_name != NULL, FALSE);
 	g_return_val_if_fail (info->plugin == NULL, FALSE);
 	g_return_val_if_fail (info->available, FALSE);
-	
-	switch (info->loader)
-	{
-		case GTR_PLUGIN_LOADER_C:
-			dirname = g_path_get_dirname (info->file);	
-			g_return_val_if_fail (dirname != NULL, FALSE);
-
-			path = g_module_build_path (dirname, info->module_name);
-			g_free (dirname);
-			g_return_val_if_fail (path != NULL, FALSE);
-	
-			info->module = G_TYPE_MODULE (gtranslator_module_new (path));
-			g_free (path);
-			
-			break;
+
+	dirname = g_path_get_dirname (info->file);
+	g_return_val_if_fail (dirname != NULL, FALSE);
 
 #ifdef ENABLE_PYTHON
-		case GTR_PLUGIN_LOADER_PY:
+	if (info->module_type == GTR_TYPE_PYTHON_MODULE)
+	{
+		if (!gtranslator_python_init ())
 		{
-			gchar *dir;
-			
-			if (!gtranslator_python_init ())
-			{
-				/* Mark plugin as unavailable and fails */
-				info->available = FALSE;
-				
-				g_warning ("Cannot load Python plugin '%s' since gtranslator "
-				           "was not able to initialize the Python interpreter.",
-				           info->name);
-
-				return FALSE;
-			}
-
-			dir = g_path_get_dirname (info->file);
-			
-			g_return_val_if_fail ((info->module_name != NULL) &&
-			                      (info->module_name[0] != '\0'),
-			                      FALSE);
-
-			info->module = G_TYPE_MODULE (
-					gtranslator_python_module_new (dir, info->module_name));
-					
-			g_free (dir);
-			break;
+			/* Mark plugin as unavailable and fail */
+			info->available = FALSE;
+			g_warning ("Cannot load Python plugin '%s' since gtranslator "
+			           "was not able to initialize the Python interpreter.",
+			           info->name);
 		}
-#endif
-		default:
-			g_return_val_if_reached (FALSE);
 	}
+#endif
 
-	if (!g_type_module_use (info->module))
-	{
-		switch (info->loader)
-		{
-			case GTR_PLUGIN_LOADER_C:
-				g_warning ("Cannot load plugin '%s' since file '%s' cannot be read.",
-					   info->name,			           
-					   gtranslator_module_get_path (GTR_MODULE (info->module)));
-				break;
-
-			case GTR_PLUGIN_LOADER_PY:
-				g_warning ("Cannot load Python plugin '%s' since file '%s' cannot be read.",
-					   info->name,			           
-					   info->module_name);
-				break;
+	info->module = GTR_MODULE (g_object_new (info->module_type,
+						   "path", dirname,
+						   "module-name", info->module_name,
+						   NULL));
+
+	g_free (dirname);
+
+	if (!g_type_module_use (G_TYPE_MODULE (info->module)))
+	{
+		g_warning ("Cannot load plugin '%s' since file '%s' cannot be read.",
+			   gtranslator_module_get_module_name (info->module),
+			   gtranslator_module_get_path (info->module));
 
-			default:
-				g_return_val_if_reached (FALSE);				
-		}
-			   
 		g_object_unref (G_OBJECT (info->module));
 		info->module = NULL;
 
-		/* Mark plugin as unavailable and fails */
+		/* Mark plugin as unavailable and fail. */
 		info->available = FALSE;
 		
 		return FALSE;
 	}
-	
-	switch (info->loader)
-	{
-		case GTR_PLUGIN_LOADER_C:
-			info->plugin = 
-				GTR_PLUGIN (gtranslator_module_new_object (GTR_MODULE (info->module)));
-			break;
 
-#ifdef ENABLE_PYTHON
-		case GTR_PLUGIN_LOADER_PY:
-			info->plugin = 
-				GTR_PLUGIN (gtranslator_python_module_new_object (GTR_PYTHON_MODULE (info->module)));
-			break;
-#endif
+	info->plugin = GTR_PLUGIN (gtranslator_module_new_object (info->module));
 
-		default:
-			g_return_val_if_reached (FALSE);
-	}
-	
-	g_type_module_unuse (info->module);
+	g_type_module_unuse (G_TYPE_MODULE (info->module));
 
 	g_message( "End");
-	
+
 	return TRUE;
 }
 

Modified: trunk/src/plugin-system/plugins-engine.h
==============================================================================
--- trunk/src/plugin-system/plugins-engine.h	(original)
+++ trunk/src/plugin-system/plugins-engine.h	Mon Sep 22 09:43:00 2008
@@ -25,7 +25,7 @@
  * list of people on the gtranslator Team.  
  * See the ChangeLog files for a list of changes. 
  *
- * $Id: plugins-engine.h 6045 2007-12-28 20:45:22Z sfre $
+ * $Id: plugins-engine.h 6264 2008-05-05 11:00:38Z sfre $
  */
 
 #ifndef __GTR_PLUGINS_ENGINE_H__
@@ -75,6 +75,9 @@
 
 const GList	*gtranslator_plugins_engine_get_plugin_list 	(GtranslatorPluginsEngine *engine);
 
+GtranslatorPluginInfo	*gtranslator_plugins_engine_get_plugin_info	(GtranslatorPluginsEngine *engine,
+							 const gchar        *name);
+
 gboolean 	 gtranslator_plugins_engine_activate_plugin 	(GtranslatorPluginsEngine *engine,
 							 GtranslatorPluginInfo    *info);
 gboolean 	 gtranslator_plugins_engine_deactivate_plugin	(GtranslatorPluginsEngine *engine,

Modified: trunk/src/plugin-system/update-from-gedit.sh
==============================================================================
--- trunk/src/plugin-system/update-from-gedit.sh	(original)
+++ trunk/src/plugin-system/update-from-gedit.sh	Mon Sep 22 09:43:00 2008
@@ -30,7 +30,7 @@
 	-e 's/#include <gedit\/gedit-debug.h>/\/\/#include <gedit\/gedit-debug.h>/g' \
 	-e 's/#include "gedit-debug.h"/\/\/#include "gedit-debug.h"/g' \
 	-e 's/#include "gedit-app.h"/#include "application.h"/g' \
-	-e 's/gedit_debug_message (DEBUG_PLUGINS,/g_warning(/g' \
+	-e 's/gedit_debug_message (DEBUG_PLUGINS,/g_message(/g' \
 	-e 's/gedit_debug/\/\/gedit_debug/g' \
 	-e 's/gedit_app/gtranslator_application/g' \
 	-e 's/.gnome2\/gedit\/plugins\//.gtranslator\/plugins\//g' \



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