From 36666a5b499377d2c5f23400b3cebe80ba98c9f2 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 5 Sep 2006 09:45:48 +0000 Subject: [PATCH] sort the load and save procedures after adding them to the database, 2006-09-05 Sven Neumann * app/plug-in/gimppluginmanager.c (gimp_plug_in_manager_restore): sort the load and save procedures after adding them to the database, otherwise there is nothing to sort. --- ChangeLog | 6 ++++++ app/plug-in/gimppluginmanager.c | 28 +++++++++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad1ff92165..0b02a833ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-09-05 Sven Neumann + + * app/plug-in/gimppluginmanager.c (gimp_plug_in_manager_restore): + sort the load and save procedures after adding them to the + database, otherwise there is nothing to sort. + 2006-09-05 Sven Neumann * app/widgets/gimpselectiondata.c: disabled debug spew. diff --git a/app/plug-in/gimppluginmanager.c b/app/plug-in/gimppluginmanager.c index 1432411e22..b883928588 100644 --- a/app/plug-in/gimppluginmanager.c +++ b/app/plug-in/gimppluginmanager.c @@ -518,6 +518,7 @@ gimp_plug_in_manager_restore (GimpPlugInManager *manager, g_slist_free (manager->plug_in_defs); manager->plug_in_defs = NULL; + /* bind plug-in text domains */ if (! gimp->no_interface) { gchar **locale_domains; @@ -525,13 +526,6 @@ gimp_plug_in_manager_restore (GimpPlugInManager *manager, gint n_domains; gint i; - manager->load_procs = g_slist_sort_with_data (manager->load_procs, - gimp_plug_in_manager_file_proc_compare, - manager); - manager->save_procs = g_slist_sort_with_data (manager->save_procs, - gimp_plug_in_manager_file_proc_compare, - manager); - n_domains = gimp_plug_in_manager_get_locale_domains (manager, &locale_domains, &locale_paths); @@ -554,6 +548,19 @@ gimp_plug_in_manager_restore (GimpPlugInManager *manager, gimp_plug_in_manager_add_to_db (manager, context, list->data); } + /* sort the load and save procedures */ + if (! gimp->no_interface) + { + manager->load_procs = + g_slist_sort_with_data (manager->load_procs, + gimp_plug_in_manager_file_proc_compare, + manager); + manager->save_procs = + g_slist_sort_with_data (manager->save_procs, + gimp_plug_in_manager_file_proc_compare, + manager); + } + /* run automatically started extensions */ { GList *extensions = NULL; @@ -829,10 +836,9 @@ gimp_plug_in_manager_add_from_rc (GimpPlugInManager *manager, /* If this is a file load or save plugin, make sure we have * something for one of the extensions, prefixes, or magic number. - * Other bits of code rely on detecting file plugins by the presence - * of one of these things, but Nick Lamb's alien/unknown format - * loader needs to be able to register no extensions, prefixes or - * magics. -- austin 13/Feb/99 + * Other bits of code rely on detecting file plugins by the + * presence of one of these things, but the raw plug-in needs to be + * able to register no extensions, prefixes or magics. */ for (list = plug_in_def->procedures; list; list = list->next) {