[epiphany/peas] e-exts-manager: require our gir
- From: Diego Escalante Urrelo <diegoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/peas] e-exts-manager: require our gir
- Date: Sun, 3 Apr 2011 14:13:41 +0000 (UTC)
commit 30a53e624c6d96ebb09c1c7c49bf5b69b7e2806e
Author: Diego Escalante Urrelo <descalante igalia com>
Date: Sun Apr 3 08:43:23 2011 -0500
e-exts-manager: require our gir
src/ephy-extensions-manager.c | 37 ++++++++++++++++++++++++++++++++-----
1 files changed, 32 insertions(+), 5 deletions(-)
---
diff --git a/src/ephy-extensions-manager.c b/src/ephy-extensions-manager.c
index a2bcfec..b8c7dd6 100644
--- a/src/ephy-extensions-manager.c
+++ b/src/ephy-extensions-manager.c
@@ -45,17 +45,44 @@ G_DEFINE_TYPE (EphyExtensionsManager, ephy_extensions_manager, PEAS_TYPE_ENGINE)
void
ephy_extensions_manager_init (EphyExtensionsManager *manager)
{
- char *extensions_dir;
+ char *userdir;
+ GError *error = NULL;
LOG ("EphyExtensionsManager startup");
peas_engine_add_search_path (PEAS_ENGINE (manager),
EXTENSIONS_DIR, EXTENSIONS_DIR);
- extensions_dir = g_build_filename (ephy_dot_dir (), "extensions", NULL);
- peas_engine_add_search_path (PEAS_ENGINE (manager),
- extensions_dir, extensions_dir);
- g_free (extensions_dir);
+ userdir = g_build_filename (ephy_dot_dir (), "extensions", NULL);
+ peas_engine_add_search_path (PEAS_ENGINE (manager), userdir, userdir);
+ g_free (userdir);
+
+ if (!g_irepository_require (g_irepository_get_default (),
+ "Epiphany", "2.31", 0, &error))
+ {
+ g_warning ("Could not load Epiphany gir: %s", error->message);
+ g_error_free (error);
+ error = NULL;
+ }
+
+#if 0
+ /* This should be moved to libpeas */
+ if (!g_irepository_require (g_irepository_get_default (),
+ "Peas", "1.0", 0, &error))
+ {
+ g_warning ("Could not load Peas repository: %s", error->message);
+ g_error_free (error);
+ error = NULL;
+ }
+
+ if (!g_irepository_require (g_irepository_get_default (),
+ "PeasGtk", "1.0", 0, &error))
+ {
+ g_warning ("Could not load PeasGtk repository: %s", error->message);
+ g_error_free (error);
+ error = NULL;
+ }
+#endif
g_settings_bind (EPHY_SETTINGS_MAIN,
EPHY_PREFS_ENABLED_EXTENSIONS,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]