aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Hooper <adamh@src.gnome.org>2004-09-14 05:52:00 +0800
committerAdam Hooper <adamh@src.gnome.org>2004-09-14 05:52:00 +0800
commit809f1aca44d03364d59d33780684ad8c524a0025 (patch)
tree7bef6e9dc63f82fc2b9318ad1acbaa5f915e979c /lib
parent25a80e3d76c1c74e810271f0cf46832f7b6e127d (diff)
downloadgsoc2013-epiphany-809f1aca44d03364d59d33780684ad8c524a0025.tar
gsoc2013-epiphany-809f1aca44d03364d59d33780684ad8c524a0025.tar.gz
gsoc2013-epiphany-809f1aca44d03364d59d33780684ad8c524a0025.tar.bz2
gsoc2013-epiphany-809f1aca44d03364d59d33780684ad8c524a0025.tar.lz
gsoc2013-epiphany-809f1aca44d03364d59d33780684ad8c524a0025.tar.xz
gsoc2013-epiphany-809f1aca44d03364d59d33780684ad8c524a0025.tar.zst
gsoc2013-epiphany-809f1aca44d03364d59d33780684ad8c524a0025.zip
Load/unload extensions based on GConf key
/apps/epiphany/general/active_extensions. Update documentation a bit (i.e., make sure it actually builds).
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-module-loader.c20
-rw-r--r--lib/ephy-module-loader.h2
2 files changed, 11 insertions, 11 deletions
diff --git a/lib/ephy-module-loader.c b/lib/ephy-module-loader.c
index 99c452927..2cd72fd89 100644
--- a/lib/ephy-module-loader.c
+++ b/lib/ephy-module-loader.c
@@ -96,13 +96,6 @@ ephy_module_loader_new (const char *path)
g_type_module_set_name (G_TYPE_MODULE (result), path);
result->path = g_strdup (path);
- if (!g_type_module_use (G_TYPE_MODULE (result)))
- {
- g_object_unref (result);
-
- return NULL;
- }
-
return result;
}
@@ -110,14 +103,11 @@ static gboolean
ephy_module_loader_load (GTypeModule *module)
{
EphyModuleLoader *loader = EPHY_MODULE_LOADER (module);
- char *module_path;
register_module_fn register_module;
LOG ("ephy_module_loader_load %s", loader->path)
- module_path = g_strdup (loader->path);
- loader->library = g_module_open (module_path, 0);
- g_free (module_path);
+ loader->library = g_module_open (loader->path, 0);
if (!loader->library)
{
@@ -159,6 +149,14 @@ ephy_module_loader_unload (GTypeModule *module)
loader->type = 0;
}
+const char *
+ephy_module_loader_get_path (EphyModuleLoader *loader)
+{
+ g_return_val_if_fail (EPHY_IS_MODULE_LOADER (loader), NULL);
+
+ return loader->path;
+}
+
static void
ephy_module_loader_class_init (EphyModuleLoaderClass *class)
{
diff --git a/lib/ephy-module-loader.h b/lib/ephy-module-loader.h
index 6b5b29a66..fe25712a7 100644
--- a/lib/ephy-module-loader.h
+++ b/lib/ephy-module-loader.h
@@ -38,6 +38,8 @@ GType ephy_module_loader_get_type (void);
EphyModuleLoader *ephy_module_loader_new (const char *path);
+const char *ephy_module_loader_get_path (EphyModuleLoader *loader);
+
GObject *ephy_module_loader_factory (EphyModuleLoader *loader);
G_END_DECLS