summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-module.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcaja-private/caja-module.c')
-rw-r--r--libcaja-private/caja-module.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libcaja-private/caja-module.c b/libcaja-private/caja-module.c
index b24dc053..07951498 100644
--- a/libcaja-private/caja-module.c
+++ b/libcaja-private/caja-module.c
@@ -152,6 +152,7 @@ module_object_weak_notify (gpointer user_data, GObject *object)
static void
add_module_objects (CajaModule *module)
{
+ GObject *object;
const GType *types;
int num_types;
int i;
@@ -164,8 +165,10 @@ add_module_objects (CajaModule *module)
{
break;
}
- caja_module_add_type (types[i]);
+ object = caja_module_add_type (types[i]);
}
+ gchar *filename = g_path_get_basename (module->path);
+ caja_extension_register (filename, object);
}
static CajaModule *
@@ -210,10 +213,8 @@ load_module_dir (const char *dirname)
name,
NULL);
caja_module_load_file (filename);
- g_free (filename);
}
}
-
g_dir_close (dir);
}
}
@@ -236,6 +237,7 @@ void
caja_module_setup (void)
{
static gboolean initialized = FALSE;
+ GList *res;
if (!initialized)
{
@@ -279,7 +281,7 @@ caja_module_extension_list_free (GList *extensions)
g_list_free (extensions);
}
-void
+GObject *
caja_module_add_type (GType type)
{
GObject *object;
@@ -290,4 +292,5 @@ caja_module_add_type (GType type)
NULL);
module_objects = g_list_prepend (module_objects, object);
+ return object;
}