void gimp_plug_in_def_set_locale_domain (GimpPlugInDef *plug_in_def, const gchar *domain_name, const gchar *domain_path) { GSList *list; g_return_if_fail (GIMP_IS_PLUG_IN_DEF (plug_in_def)); if (plug_in_def->locale_domain_name) g_free (plug_in_def->locale_domain_name); plug_in_def->locale_domain_name = g_strdup (domain_name); if (plug_in_def->locale_domain_path) g_free (plug_in_def->locale_domain_path); plug_in_def->locale_domain_path = g_strdup (domain_path); for (list = plug_in_def->procedures; list; list = g_slist_next (list)) { GimpPlugInProcedure *procedure = list->data; gimp_plug_in_procedure_set_locale_domain (procedure, plug_in_def->locale_domain_name); } }
void gimp_plug_in_add_temp_proc (GimpPlugIn *plug_in, GimpTemporaryProcedure *proc) { GimpPlugInProcedure *overridden; const gchar *locale_domain; const gchar *help_domain; g_return_if_fail (GIMP_IS_PLUG_IN (plug_in)); g_return_if_fail (GIMP_IS_TEMPORARY_PROCEDURE (proc)); overridden = gimp_plug_in_procedure_find (plug_in->temp_procedures, gimp_object_get_name (proc)); if (overridden) gimp_plug_in_remove_temp_proc (plug_in, GIMP_TEMPORARY_PROCEDURE (overridden)); locale_domain = gimp_plug_in_manager_get_locale_domain (plug_in->manager, plug_in->prog, NULL); help_domain = gimp_plug_in_manager_get_help_domain (plug_in->manager, plug_in->prog, NULL); gimp_plug_in_procedure_set_locale_domain (GIMP_PLUG_IN_PROCEDURE (proc), locale_domain); gimp_plug_in_procedure_set_help_domain (GIMP_PLUG_IN_PROCEDURE (proc), help_domain); plug_in->temp_procedures = g_slist_prepend (plug_in->temp_procedures, g_object_ref (proc)); gimp_plug_in_manager_add_temp_proc (plug_in->manager, proc); }
void gimp_plug_in_def_add_procedure (GimpPlugInDef *plug_in_def, GimpPlugInProcedure *proc) { GimpPlugInProcedure *overridden; g_return_if_fail (GIMP_IS_PLUG_IN_DEF (plug_in_def)); g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (proc)); overridden = gimp_plug_in_procedure_find (plug_in_def->procedures, gimp_object_get_name (proc)); if (overridden) gimp_plug_in_def_remove_procedure (plug_in_def, overridden); proc->mtime = plug_in_def->mtime; gimp_plug_in_procedure_set_locale_domain (proc, plug_in_def->locale_domain_name); gimp_plug_in_procedure_set_help_domain (proc, plug_in_def->help_domain_name); plug_in_def->procedures = g_slist_append (plug_in_def->procedures, g_object_ref (proc)); }