[gimp] app, libgimp: make two functions of gimpgpparams private



commit b812d6241aee795f6c4f68aeb6b5393e6ef14d7b
Author: Michael Natterer <mitch gimp org>
Date:   Thu Sep 5 16:07:15 2019 +0200

    app, libgimp: make two functions of gimpgpparams private
    
    and remove a "gimp" parameter that is no longer needed.

 app/plug-in/gimpplugin-message.c |  6 ++----
 app/plug-in/plug-in-rc.c         |  2 +-
 libgimp/gimpgpparams-body.c      | 29 ++++++++++++++---------------
 libgimp/gimpgpparams.h           | 13 +------------
 4 files changed, 18 insertions(+), 32 deletions(-)
---
diff --git a/app/plug-in/gimpplugin-message.c b/app/plug-in/gimpplugin-message.c
index 51e5fc70c0..70420d2ad3 100644
--- a/app/plug-in/gimpplugin-message.c
+++ b/app/plug-in/gimpplugin-message.c
@@ -876,8 +876,7 @@ gimp_plug_in_handle_proc_install (GimpPlugIn    *plug_in,
   for (i = 0; i < proc_install->nparams; i++)
     {
       GParamSpec *pspec =
-        _gimp_gp_param_def_to_param_spec (plug_in->manager->gimp,
-                                          &proc_install->params[i]);
+        _gimp_gp_param_def_to_param_spec (&proc_install->params[i]);
 
       if (pspec)
         {
@@ -909,8 +908,7 @@ gimp_plug_in_handle_proc_install (GimpPlugIn    *plug_in,
   for (i = 0; i < proc_install->nreturn_vals; i++)
     {
       GParamSpec *pspec =
-        _gimp_gp_param_def_to_param_spec (plug_in->manager->gimp,
-                                          &proc_install->return_vals[i]);
+        _gimp_gp_param_def_to_param_spec (&proc_install->return_vals[i]);
 
       if (pspec)
         gimp_procedure_add_return_value (procedure, pspec);
diff --git a/app/plug-in/plug-in-rc.c b/app/plug-in/plug-in-rc.c
index 561be6beb3..bd5084554b 100644
--- a/app/plug-in/plug-in-rc.c
+++ b/app/plug-in/plug-in-rc.c
@@ -887,7 +887,7 @@ plug_in_proc_arg_deserialize (GScanner      *scanner,
 
   token = G_TOKEN_LEFT_PAREN;
 
-  pspec = _gimp_gp_param_def_to_param_spec (gimp, &param_def);
+  pspec = _gimp_gp_param_def_to_param_spec (&param_def);
 
   if (return_value)
     gimp_procedure_add_return_value (procedure, pspec);
diff --git a/libgimp/gimpgpparams-body.c b/libgimp/gimpgpparams-body.c
index 924e342f92..1a367f6858 100644
--- a/libgimp/gimpgpparams-body.c
+++ b/libgimp/gimpgpparams-body.c
@@ -26,8 +26,7 @@
  */
 
 GParamSpec *
-_gimp_gp_param_def_to_param_spec (gpointer          gimp,
-                                  const GPParamDef *param_def)
+_gimp_gp_param_def_to_param_spec (const GPParamDef *param_def)
 {
   const gchar *name  = param_def->name;
   const gchar *nick  = param_def->nick;
@@ -439,12 +438,12 @@ get_display_by_id (gpointer gimp,
 #endif
 }
 
-void
-_gimp_gp_param_to_value (gpointer        gimp,
-                         const GPParam  *param,
-                         GType           type,
-                         GValue         *value,
-                         gboolean        full_copy)
+static void
+gimp_gp_param_to_value (gpointer        gimp,
+                        const GPParam  *param,
+                        GType           type,
+                        GValue         *value,
+                        gboolean        full_copy)
 {
   g_return_if_fail (param != NULL);
   g_return_if_fail (value != NULL);
@@ -624,7 +623,7 @@ _gimp_gp_param_to_value (gpointer        gimp,
   else if (G_VALUE_HOLDS_PARAM (value))
     {
       GParamSpec *pspec =
-        _gimp_gp_param_def_to_param_spec (gimp, &param->data.d_param_def);
+        _gimp_gp_param_def_to_param_spec (&param->data.d_param_def);
 
       g_value_take_param (value, pspec);
     }
@@ -703,7 +702,7 @@ _gimp_gp_params_to_value_array (gpointer        gimp,
             }
         }
 
-      _gimp_gp_param_to_value (gimp, &params[i], type, &value, full_copy);
+      gimp_gp_param_to_value (gimp, &params[i], type, &value, full_copy);
 
       gimp_value_array_append (args, &value);
       g_value_unset (&value);
@@ -712,10 +711,10 @@ _gimp_gp_params_to_value_array (gpointer        gimp,
   return args;
 }
 
-void
-_gimp_value_to_gp_param (const GValue *value,
-                         GPParam      *param,
-                         gboolean      full_copy)
+static void
+gimp_value_to_gp_param (const GValue *value,
+                        GPParam      *param,
+                        gboolean      full_copy)
 {
   GType type;
 
@@ -968,7 +967,7 @@ _gimp_value_array_to_gp_params (const GimpValueArray  *args,
     {
       GValue *value = gimp_value_array_index (args, i);
 
-      _gimp_value_to_gp_param (value, &params[i], full_copy);
+      gimp_value_to_gp_param (value, &params[i], full_copy);
     }
 
   return params;
diff --git a/libgimp/gimpgpparams.h b/libgimp/gimpgpparams.h
index f1a0cf8f47..2470e7cc9a 100644
--- a/libgimp/gimpgpparams.h
+++ b/libgimp/gimpgpparams.h
@@ -25,17 +25,10 @@
 G_BEGIN_DECLS
 
 
-GParamSpec     * _gimp_gp_param_def_to_param_spec (gpointer              gimp,
-                                                   const GPParamDef     *param_def);
-
+GParamSpec     * _gimp_gp_param_def_to_param_spec (const GPParamDef     *param_def);
 void             _gimp_param_spec_to_gp_param_def (GParamSpec           *pspec,
                                                    GPParamDef           *param_def);
 
-void             _gimp_gp_param_to_value          (gpointer              gimp,
-                                                   const GPParam        *param,
-                                                   GType                 type,
-                                                   GValue               *value,
-                                                   gboolean              full_copy);
 GimpValueArray * _gimp_gp_params_to_value_array   (gpointer              gimp,
                                                    GParamSpec          **pspecs,
                                                    gint                  n_pspecs,
@@ -43,10 +36,6 @@ GimpValueArray * _gimp_gp_params_to_value_array   (gpointer              gimp,
                                                    gint                  n_params,
                                                    gboolean              return_values,
                                                    gboolean              full_copy);
-
-void             _gimp_value_to_gp_param          (const GValue         *value,
-                                                   GPParam              *param,
-                                                   gboolean              full_copy);
 GPParam        * _gimp_value_array_to_gp_params   (const GimpValueArray *args,
                                                    gboolean              full_copy);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]