[eog] Load the Eog namespace from a private directory
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Load the Eog namespace from a private directory
- Date: Mon, 3 Jan 2011 12:52:10 +0000 (UTC)
commit f984f253e50e842b7c58b41593954553798f3f95
Author: Claudio Saavedra <csaavedra igalia com>
Date: Mon Aug 9 01:15:17 2010 +0300
Load the Eog namespace from a private directory
For now, this is done by adding the private directory to the search
path. For whatever reason, g_irepository_require_private() doesn't
work for me.
This is enough to have python plugins working already
https://bugzilla.gnome.org/show_bug.cgi?id=626224
src/Makefile.am | 3 ++-
src/eog-plugin-engine.c | 15 +++++++++++++++
2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index e995e8b..a515d81 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -152,7 +152,8 @@ libeog_la_CPPFLAGS = \
-DEOG_DATA_DIR=\""$(pkgdatadir)"\" \
-DEOG_LOCALE_DIR=\""$(datadir)/locale"\" \
-DEOG_PIXMAPS_DIR=\""$(datadir)/pixmaps/eog"\" \
- -DEOG_PLUGIN_DIR=\""$(libdir)/eog/plugins"\"
+ -DEOG_PLUGIN_DIR=\""$(libdir)/eog/plugins"\" \
+ -DLIBDIR=\""$(libdir)"\"
libeog_la_CFLAGS = \
$(EOG_CFLAGS) \
diff --git a/src/eog-plugin-engine.c b/src/eog-plugin-engine.c
index 1f2a923..6049dec 100644
--- a/src/eog-plugin-engine.c
+++ b/src/eog-plugin-engine.c
@@ -94,6 +94,13 @@ eog_plugin_engine_new (void)
{
EogPluginEngine *engine;
gchar *user_plugin_path;
+ gchar *search_path;
+ GError *error = NULL;
+
+ search_path = g_build_filename (LIBDIR, "eog",
+ "girepository-1.0", NULL);
+ g_irepository_prepend_search_path (search_path);
+ g_free (search_path);
/* This should be moved to libpeas */
g_irepository_require (g_irepository_get_default (),
@@ -101,6 +108,14 @@ eog_plugin_engine_new (void)
g_irepository_require (g_irepository_get_default (),
"PeasUI", "1.0", 0, NULL);
+ if (g_irepository_require (g_irepository_get_default (),
+ "Eog", "3.0", 0, &error) == NULL)
+ {
+ g_warning ("Error loading eog typelib: %s\n",
+ error->message);
+ g_error_free (error);
+ }
+
engine = EOG_PLUGIN_ENGINE (g_object_new (EOG_TYPE_PLUGIN_ENGINE,
/* "base-module-dir", modules_dir, */
NULL));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]