diff options
author | Alexander van der Meij <[email protected]> | 2014-08-29 20:52:13 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-10-27 11:23:51 +0100 |
commit | 451eef9b275ce006b270a3569d96e531e24dd15a (patch) | |
tree | c69beecbd84db9fc21479f4b0b5c2246c466d819 /libcaja-private/caja-module.c | |
parent | 2ce11c50a5f7cca914af7646cae5fb6d5362b5cf (diff) | |
download | caja-451eef9b275ce006b270a3569d96e531e24dd15a.tar.bz2 caja-451eef9b275ce006b270a3569d96e531e24dd15a.tar.xz |
implementation of extension interface and status management (gsoc2014)
Diffstat (limited to 'libcaja-private/caja-module.c')
-rw-r--r-- | libcaja-private/caja-module.c | 11 |
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; } |