mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
plug-ins: do not warn for invalid font names at startup.
While all other resources are supposed to be already loaded, this is not the case of fonts which are loaded in a thread, and whose loading may end after plug-ins are initialized. So ignore unknown font name as an exception (because we can't know if it is really unknown or just not loaded yet). This fixes such WARNINGs: > (script-fu:33006): scriptfu-WARNING **: 14:35:28.259: script_fu_add_resource_arg declared resource name is invalid Serif
This commit is contained in:
parent
02fd84394c
commit
51d69fa44b
1 changed files with 8 additions and 1 deletions
|
@ -304,7 +304,14 @@ script_fu_add_resource_arg (
|
||||||
|
|
||||||
if (default_resource == NULL)
|
if (default_resource == NULL)
|
||||||
{
|
{
|
||||||
g_warning ("%s declared resource name is invalid %s", G_STRFUNC, declared_name_of_default);
|
/* Fonts are loaded asynchronously so they may not be loaded
|
||||||
|
* yet when plug-in procedures' arguments are declared. That's
|
||||||
|
* OK though because resource argument defaults are not stored
|
||||||
|
* anyway. And when the procedure will be actually called
|
||||||
|
* later on, the fonts will likely have been loaded by then.
|
||||||
|
*/
|
||||||
|
if (arg->default_value.sfa_resource.resource_type != GIMP_TYPE_FONT)
|
||||||
|
g_warning ("%s declared resource name is invalid %s", G_STRFUNC, declared_name_of_default);
|
||||||
script_fu_add_resource_arg_default_from_context (procedure, name, nick, blurb, func);
|
script_fu_add_resource_arg_default_from_context (procedure, name, nick, blurb, func);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue