diff options
Diffstat (limited to 'libcaja-private')
-rw-r--r-- | libcaja-private/caja-extensions.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/libcaja-private/caja-extensions.c b/libcaja-private/caja-extensions.c index 78b4af06..7f4791ec 100644 --- a/libcaja-private/caja-extensions.c +++ b/libcaja-private/caja-extensions.c @@ -192,23 +192,13 @@ caja_extensions_get_list (void) void caja_extension_register (gchar *filename, GObject *module) { - gboolean ext_state = TRUE; // new extensions are enabled by default. - gchar *ext_filename; - GList *l; + gboolean state = TRUE; // new extensions are enabled by default. + gchar *extname; - ext_filename = g_strndup (filename, strlen(filename) - 3); - ext_state = caja_extension_get_state (ext_filename); - - /* Do not attempt to register already registered extensions */ - for (l = caja_extensions; l != NULL; l = l->next) - { - Extension *r = l->data; - if (g_ascii_strcasecmp (r->filename, ext_filename) == 0) { - return; - } - } + extname = g_strndup (filename, strlen(filename) - 3); + state = caja_extension_get_state (extname); - Extension *ext = extension_new (ext_filename, ext_state, module); + Extension *ext = extension_new (extname, state, module); caja_extensions = g_list_append (caja_extensions, ext); } |