[gimp] app, libgimp: support GParamUInt on the wire
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app, libgimp: support GParamUInt on the wire
- Date: Mon, 5 Aug 2019 12:16:35 +0000 (UTC)
commit a6516e50975a8cf0e12a42fb415d214a8c48e577
Author: Michael Natterer <mitch gimp org>
Date: Mon Aug 5 12:46:25 2019 +0200
app, libgimp: support GParamUInt on the wire
app/plug-in/gimpgpparams.c | 7 +++++++
libgimp/gimpgpparams-body.c | 3 ++-
libgimp/gimpgpparams.c | 7 +++++++
3 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/app/plug-in/gimpgpparams.c b/app/plug-in/gimpgpparams.c
index 35356d1392..c98aed55e8 100644
--- a/app/plug-in/gimpgpparams.c
+++ b/app/plug-in/gimpgpparams.c
@@ -104,6 +104,13 @@ _gimp_gp_param_def_to_param_spec (gpointer gimp,
param_def->meta.m_int.default_val,
flags);
+ if (! strcmp (param_def->type_name, "GParamUInt"))
+ return g_param_spec_uint (name, nick, blurb,
+ param_def->meta.m_int.min_val,
+ param_def->meta.m_int.max_val,
+ param_def->meta.m_int.default_val,
+ flags);
+
if (! strcmp (param_def->type_name, "GimpParamInt8"))
return gimp_param_spec_int8 (name, nick, blurb,
param_def->meta.m_int.min_val,
diff --git a/libgimp/gimpgpparams-body.c b/libgimp/gimpgpparams-body.c
index c0e726376f..00da2b1faa 100644
--- a/libgimp/gimpgpparams-body.c
+++ b/libgimp/gimpgpparams-body.c
@@ -51,7 +51,8 @@ _gimp_param_spec_to_gp_param_def (GParamSpec *pspec,
param_def->meta.m_int.max_val = ispec->maximum;
param_def->meta.m_int.default_val = ispec->default_value;
}
- else if (pspec_type == GIMP_TYPE_PARAM_INT8)
+ else if (pspec_type == G_TYPE_PARAM_UINT ||
+ pspec_type == GIMP_TYPE_PARAM_INT8)
{
GParamSpecUInt *uspec = G_PARAM_SPEC_UINT (pspec);
diff --git a/libgimp/gimpgpparams.c b/libgimp/gimpgpparams.c
index 51f814e312..21dee89fae 100644
--- a/libgimp/gimpgpparams.c
+++ b/libgimp/gimpgpparams.c
@@ -95,6 +95,13 @@ _gimp_gp_param_def_to_param_spec (gpointer gimp,
param_def->meta.m_int.default_val,
flags);
+ if (! strcmp (param_def->type_name, "GParamUInt"))
+ return g_param_spec_uint (name, nick, blurb,
+ param_def->meta.m_int.min_val,
+ param_def->meta.m_int.max_val,
+ param_def->meta.m_int.default_val,
+ flags);
+
if (! strcmp (param_def->type_name, "GimpParamInt8"))
return gimp_param_spec_int8 (name, nick, blurb,
param_def->meta.m_int.min_val,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]