[gimp] plug-ins: change "comment" arguments to "gimp-comment"



commit 0d56bbb74579ed24778b6ec2aabc4ad54504e4b1
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jun 15 23:54:09 2020 +0200

    plug-ins: change "comment" arguments to "gimp-comment"
    
    so they continue to be handled automatically.

 plug-ins/common/file-csource.c      | 13 ++++++++-----
 plug-ins/common/file-gif-save.c     | 10 +++++++---
 plug-ins/common/file-png.c          |  7 +++++--
 plug-ins/common/file-xbm.c          |  9 ++++++---
 plug-ins/file-tiff/file-tiff-save.c |  4 ++--
 plug-ins/file-tiff/file-tiff.c      |  5 ++++-
 6 files changed, 32 insertions(+), 16 deletions(-)
---
diff --git a/plug-ins/common/file-csource.c b/plug-ins/common/file-csource.c
index c6278d9faa..1454599fb7 100644
--- a/plug-ins/common/file-csource.c
+++ b/plug-ins/common/file-csource.c
@@ -141,12 +141,15 @@ csource_create_procedure (GimpPlugIn  *plug_in,
                                 "gimp_image",
                                 GIMP_PARAM_READWRITE);
 
-      GIMP_PROC_AUX_ARG_STRING (procedure, "comment",
+      GIMP_PROC_AUX_ARG_STRING (procedure, "gimp-comment",
                                 "Comment",
                                 "Comment",
                                 gimp_get_default_comment (),
                                 GIMP_PARAM_READWRITE);
 
+      gimp_procedure_set_argument_sync (procedure, "gimp-comment",
+                                        GIMP_ARGUMENT_SYNC_PARASITE);
+
       GIMP_PROC_AUX_ARG_BOOLEAN (procedure, "save-comment",
                                  "Save comment",
                                  "Save comment",
@@ -251,7 +254,7 @@ csource_save (GimpProcedure        *procedure,
 
   g_object_get (config,
                 "prefixed-name", &prefixed_name,
-                "comment",       &comment,
+                "gimp-comment",  &comment,
                 NULL);
 
   if (! prefixed_name || ! prefixed_name[0])
@@ -261,7 +264,7 @@ csource_save (GimpProcedure        *procedure,
 
   if (comment && ! comment[0])
     g_object_set (config,
-                  "comment", NULL,
+                  "gimp-comment", NULL,
                   NULL);
 
   g_free (prefixed_name);
@@ -537,7 +540,7 @@ save_image (GFile         *file,
 
   g_object_get (config,
                 "prefixed-name", &config_prefixed_name,
-                "comment",       &config_comment,
+                "gimp-comment",  &config_comment,
                 "save-comment",  &config_save_comment,
                 "glib-types",    &config_glib_types,
                 "save-alpha",    &config_save_alpha,
@@ -983,7 +986,7 @@ save_dialog (GimpProcedure *procedure,
 
   /* Comment Entry
    */
-  entry = gimp_prop_entry_new (config, "comment", -1);
+  entry = gimp_prop_entry_new (config, "gimp-comment", -1);
   gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
                             _("Co_mment:"), 0.0, 0.5,
                             entry, 1);
diff --git a/plug-ins/common/file-gif-save.c b/plug-ins/common/file-gif-save.c
index 300bc59cab..59789539c5 100644
--- a/plug-ins/common/file-gif-save.c
+++ b/plug-ins/common/file-gif-save.c
@@ -226,11 +226,14 @@ gif_create_procedure (GimpPlugIn  *plug_in,
                                  gimp_export_comment (),
                                  G_PARAM_READWRITE);
 
-      GIMP_PROC_AUX_ARG_STRING (procedure, "comment",
+      GIMP_PROC_AUX_ARG_STRING (procedure, "gimp-comment",
                                 "Comment",
                                 _("Image comment"),
                                  gimp_get_default_comment (),
                                  G_PARAM_READWRITE);
+
+      gimp_procedure_set_argument_sync (procedure, "gimp-comment",
+                                        GIMP_ARGUMENT_SYNC_PARASITE);
     }
 
   return procedure;
@@ -770,7 +773,7 @@ save_image (GFile         *file,
                 "force-dispose",   &config_use_default_dispose,
                 "as-animation",    &config_as_animation,
                 "save-comment",    &config_save_comment,
-                "comment",         &config_comment,
+                "gimp-comment",    &config_comment,
                 NULL);
 
   /* The GIF spec says 7bit ASCII for the comment block. */
@@ -1200,7 +1203,8 @@ save_dialog (GimpImage     *image,
 
 #define MAX_COMMENT 240
 
-  text_buffer = gimp_prop_text_buffer_new (config, "comment", MAX_COMMENT);
+  text_buffer = gimp_prop_text_buffer_new (config, "gimp-comment",
+                                           MAX_COMMENT);
   gtk_text_view_set_buffer (GTK_TEXT_VIEW (text_view), text_buffer);
   g_object_unref (text_buffer);
 
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index f8234b90eb..1de09a6ad8 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -271,12 +271,15 @@ png_create_procedure (GimpPlugIn  *plug_in,
                              gimp_export_comment (),
                              G_PARAM_READWRITE);
 
-      GIMP_PROC_AUX_ARG_STRING (procedure, "comment",
+      GIMP_PROC_AUX_ARG_STRING (procedure, "gimp-comment",
                                 "Comment",
                                 "Image comment",
                                 gimp_get_default_comment (),
                                 G_PARAM_READWRITE);
 
+      gimp_procedure_set_argument_sync (procedure, "gimp-comment",
+                                        GIMP_ARGUMENT_SYNC_PARASITE);
+
       GIMP_PROC_ARG_BOOLEAN (procedure, "save-transparent",
                              "Save transparent",
                              "Preserve color of transparent pixels?",
@@ -1291,7 +1294,7 @@ save_image (GFile        *file,
                 "phys",               &save_phys,
                 "time",               &save_time,
                 "save-comment",       &save_comment,
-                "comment",            &comment,
+                "gimp-comment",       &comment,
                 "save-transparent",   &save_transp_pixels,
                 "compression",        &compression_level,
                 "format",             &export_format,
diff --git a/plug-ins/common/file-xbm.c b/plug-ins/common/file-xbm.c
index 39ab475f80..ab1a673d23 100644
--- a/plug-ins/common/file-xbm.c
+++ b/plug-ins/common/file-xbm.c
@@ -209,12 +209,15 @@ xbm_create_procedure (GimpPlugIn  *plug_in,
                              FALSE, /* *NOT* gimp_export_comment() */
                              G_PARAM_READWRITE);
 
-      GIMP_PROC_ARG_STRING (procedure, "comment",
+      GIMP_PROC_ARG_STRING (procedure, "gimp-comment",
                             "Comment",
                             "Image description (maximum 72 bytes)",
                             gimp_get_default_comment (),
                             G_PARAM_READWRITE);
 
+      gimp_procedure_set_argument_sync (procedure, "gimp-comment",
+                                        GIMP_ARGUMENT_SYNC_PARASITE);
+
       GIMP_PROC_ARG_BOOLEAN (procedure, "x10-format",
                              "X10 format",
                              "Export in X10 format",
@@ -988,7 +991,7 @@ save_image (GFile         *file,
 
   g_object_get (config,
                 "save-comment", &config_save_comment,
-                "comment",      &config_comment,
+                "gimp-comment", &config_comment,
                 "x10-format",   &config_x10_format,
                 "use-hot-spot", &config_use_hot,
                 "hot-spot-x",   &config_x_hot,
@@ -1301,7 +1304,7 @@ save_dialog (GimpDrawable  *drawable,
                           grid,   "sensitive",
                           G_BINDING_SYNC_CREATE);
 
-  entry = gimp_prop_entry_new (config, "comment", MAX_COMMENT);
+  entry = gimp_prop_entry_new (config, "gimp-comment", MAX_COMMENT);
   gtk_widget_set_size_request (entry, 240, -1);
   gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
                             _("Comment:"), 0.0, 0.5,
diff --git a/plug-ins/file-tiff/file-tiff-save.c b/plug-ins/file-tiff/file-tiff-save.c
index 9fcd31482d..013143a179 100644
--- a/plug-ins/file-tiff/file-tiff-save.c
+++ b/plug-ins/file-tiff/file-tiff-save.c
@@ -957,7 +957,7 @@ save_image (GFile         *file,
   gboolean    config_save_thumbnail;
 
   g_object_get (config,
-                "comment",            &config_comment,
+                "gimp-comment",       &config_comment,
                 "save-color-profile", &config_save_profile,
                 "save-thumbnail",     &config_save_thumbnail,
                 NULL);
@@ -1313,7 +1313,7 @@ save_dialog (GimpImage     *image,
   gtk_grid_attach (GTK_GRID (grid), frame, 0, row++, 2, 1);
   gtk_widget_show (frame);
 
-  entry = gimp_prop_entry_new (config, "comment", -1);
+  entry = gimp_prop_entry_new (config, "gimp-comment", -1);
   gtk_container_add (GTK_CONTAINER (frame), entry);
   gtk_widget_show (entry);
 
diff --git a/plug-ins/file-tiff/file-tiff.c b/plug-ins/file-tiff/file-tiff.c
index c85b998fe1..40ba7f2220 100644
--- a/plug-ins/file-tiff/file-tiff.c
+++ b/plug-ins/file-tiff/file-tiff.c
@@ -208,12 +208,15 @@ tiff_create_procedure (GimpPlugIn  *plug_in,
                              TRUE,
                              G_PARAM_READWRITE);
 
-      GIMP_PROC_AUX_ARG_STRING (procedure, "comment",
+      GIMP_PROC_AUX_ARG_STRING (procedure, "gimp-comment",
                                 "Comment",
                                 "Image comment",
                                 gimp_get_default_comment (),
                                 G_PARAM_READWRITE);
 
+      gimp_procedure_set_argument_sync (procedure, "gimp-comment",
+                                        GIMP_ARGUMENT_SYNC_PARASITE);
+
       GIMP_PROC_AUX_ARG_BOOLEAN (procedure, "save-layers",
                                  "Save Layers",
                                  "Save Layers",


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