[gedit/libgpe: 10/18] Tell GPEEngine where to find the python bindings.



commit f9da504118b2f0f4b43a209ebe1ff0ddf31e1725
Author: Steve Frécinaux <code istique net>
Date:   Sun Nov 1 20:35:14 2009 +0100

    Tell GPEEngine where to find the python bindings.
    
    This way all the gedit plugins are able to load gedit's python bindings.

 gedit/gedit-dirs.c           |    6 ++++++
 gedit/gedit-dirs.h           |    2 ++
 gedit/gedit-plugins-engine.c |    4 ++++
 3 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-dirs.c b/gedit/gedit-dirs.c
index 4314851..58a413f 100644
--- a/gedit/gedit-dirs.c
+++ b/gedit/gedit-dirs.c
@@ -222,6 +222,12 @@ gedit_dirs_get_gedit_plugins_data_dir (void)
 }
 
 gchar *
+gedit_dirs_get_binding_modules_dir (void)
+{
+	return gedit_dirs_get_gedit_lib_dir ();
+}
+
+gchar *
 gedit_dirs_get_gedit_plugin_loaders_dir (void)
 {
 	gchar *lib_dir;
diff --git a/gedit/gedit-dirs.h b/gedit/gedit-dirs.h
index 22f16ac..0ff0835 100644
--- a/gedit/gedit-dirs.h
+++ b/gedit/gedit-dirs.h
@@ -46,6 +46,8 @@ gchar		*gedit_dirs_get_gedit_plugins_dir	(void);
 
 gchar		*gedit_dirs_get_gedit_plugins_data_dir	(void);
 
+gchar		*gedit_dirs_get_binding_modules_dir	(void);
+
 gchar		*gedit_dirs_get_gedit_plugin_loaders_dir
 							(void);
 
diff --git a/gedit/gedit-plugins-engine.c b/gedit/gedit-plugins-engine.c
index b13be42..d7eeef2 100644
--- a/gedit/gedit-plugins-engine.c
+++ b/gedit/gedit-plugins-engine.c
@@ -96,9 +96,13 @@ gedit_plugins_engine_get_default (void)
 	if (default_engine != NULL)
 		return default_engine;
 
+	module_dir = gedit_dirs_get_binding_modules_dir ();
+
 	default_engine = GPE_ENGINE (g_object_new (GEDIT_TYPE_PLUGINS_ENGINE,
 						   "app-name", "Gedit",
+						   "base-module-dir", module_dir,
 						   NULL));
+	g_free (module_dir);
 
 	/* Add the user plugins dir in ~ */
 	module_dir = gedit_dirs_get_user_plugins_dir ();



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