[gimp] app: forgot to add support for GP_PARAM_DEF_TYPE_UNIT to plug-in-rc.c
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: forgot to add support for GP_PARAM_DEF_TYPE_UNIT to plug-in-rc.c
- Date: Thu, 1 Aug 2019 11:03:05 +0000 (UTC)
commit 9926e3fd96729b3e968f3643668cbe277e045a76
Author: Michael Natterer <mitch gimp org>
Date: Thu Aug 1 13:02:33 2019 +0200
app: forgot to add support for GP_PARAM_DEF_TYPE_UNIT to plug-in-rc.c
app/plug-in/plug-in-rc.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
---
diff --git a/app/plug-in/plug-in-rc.c b/app/plug-in/plug-in-rc.c
index e76ca27c91..7408e325a8 100644
--- a/app/plug-in/plug-in-rc.c
+++ b/app/plug-in/plug-in-rc.c
@@ -790,6 +790,19 @@ plug_in_proc_arg_deserialize (GScanner *scanner,
}
break;
+ case GP_PARAM_DEF_TYPE_UNIT:
+ if (! gimp_scanner_parse_int (scanner,
+ ¶m_def.meta.m_unit.allow_pixels) ||
+ ! gimp_scanner_parse_int (scanner,
+ ¶m_def.meta.m_unit.allow_percent) ||
+ ! gimp_scanner_parse_int (scanner,
+ ¶m_def.meta.m_unit.default_val))
+ {
+ token = G_TOKEN_INT;
+ goto error;
+ }
+ break;
+
case GP_PARAM_DEF_TYPE_ENUM:
if (! gimp_scanner_parse_string (scanner,
¶m_def.meta.m_enum.type_name))
@@ -903,6 +916,7 @@ plug_in_proc_arg_deserialize (GScanner *scanner,
{
case GP_PARAM_DEF_TYPE_DEFAULT:
case GP_PARAM_DEF_TYPE_INT:
+ case GP_PARAM_DEF_TYPE_UNIT:
break;
case GP_PARAM_DEF_TYPE_ENUM:
@@ -1020,6 +1034,13 @@ plug_in_rc_write_proc_arg (GimpConfigWriter *writer,
param_def.meta.m_int.default_val);
break;
+ case GP_PARAM_DEF_TYPE_UNIT:
+ gimp_config_writer_printf (writer, "%d %d %d",
+ param_def.meta.m_unit.allow_pixels,
+ param_def.meta.m_unit.allow_percent,
+ param_def.meta.m_unit.default_val);
+ break;
+
case GP_PARAM_DEF_TYPE_ENUM:
gimp_config_writer_string (writer,
param_def.meta.m_enum.type_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]