applied patch from Jernej Simoncic which enables environment variables and

2006-11-18  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-rc.c (plug_in_def_deserialize): applied
	patch from Jernej Simoncic which enables environment variables and
	${gimp_foo} variables in plug-in filename and converts them to
	filesystem encoding. Fixes bug #375349.

	(plug_in_rc_write): write UTF-8 filenames to pluginrc.
This commit is contained in:
Michael Natterer 2006-11-18 16:19:47 +00:00 committed by Michael Natterer
parent 0b33ffc674
commit 170901c5eb
2 changed files with 27 additions and 3 deletions

View File

@ -1,3 +1,12 @@
2006-11-18 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-rc.c (plug_in_def_deserialize): applied
patch from Jernej Simoncic which enables environment variables and
${gimp_foo} variables in plug-in filename and converts them to
filesystem encoding. Fixes bug #375349.
(plug_in_rc_write): write UTF-8 filenames to pluginrc.
2006-11-18 Simon Budig <simon@gimp.org>
* plug-ins/script-fu/script-fu-scripts.c: Properly handle PDB_LAYERs

View File

@ -233,20 +233,27 @@ plug_in_def_deserialize (Gimp *gimp,
PlugInDef *plug_in_def;
GimpPlugInProcedure *proc = NULL;
gchar *name;
gchar *path;
gint mtime;
GTokenType token;
if (! gimp_scanner_parse_string (scanner, &name))
return G_TOKEN_STRING;
plug_in_def = plug_in_def_new (name);
path = gimp_config_path_expand (name, TRUE, NULL);
g_free (name);
if (! gimp_scanner_parse_int (scanner, (gint *) &plug_in_def->mtime))
plug_in_def = plug_in_def_new (path);
g_free (path);
if (! gimp_scanner_parse_int (scanner, &mtime))
{
plug_in_def_free (plug_in_def);
return G_TOKEN_INT;
}
plug_in_def->mtime = mtime;
token = G_TOKEN_LEFT_PAREN;
while (g_scanner_peek_next_token (scanner) == token)
@ -777,11 +784,19 @@ plug_in_rc_write (GSList *plug_in_defs,
if (plug_in_def->procedures)
{
GSList *list2;
gchar *utf8;
utf8 = g_filename_to_utf8 (plug_in_def->prog, -1, NULL, NULL, NULL);
if (! utf8)
continue;
gimp_config_writer_open (writer, "plug-in-def");
gimp_config_writer_string (writer, plug_in_def->prog);
gimp_config_writer_string (writer, utf8);
gimp_config_writer_printf (writer, "%ld", plug_in_def->mtime);
g_free (utf8);
for (list2 = plug_in_def->procedures; list2; list2 = list2->next)
{
GimpPlugInProcedure *proc = list2->data;