[gimp/gimp-2-10] plug-ins: clean out some warnings.



commit bcf2b4c7a6b476f5644c4db32f4a71b444bb5504
Author: Jehan <jehan girinstud io>
Date:   Wed Nov 6 13:26:09 2019 +0100

    plug-ins: clean out some warnings.
    
    This cleans just a third of the warnings in this metadata plug-in. It is
    a very bad practice to define static const strings in a header file like
    this, especially if this header is included in several files. Let's make
    these macros.
    
    Also why are these header tags sometimes used with the const name (now
    macros), sometimes directly with the string literals? I fixed some of
    these, but more string literals are lying around.
    
    Remaining warnings are similar, about const string arrays. If really we
    want this, we should declare these extern and define them in a separate
    implementation file. This whole plug-in should be really reorganized and
    cleaned in depth.
    
    (cherry picked from commit 024a919c77b99ff543d41fd3991c78bc74bff9ee)

 plug-ins/metadata/metadata-editor.c | 100 ++++++++++++++++++------------------
 plug-ins/metadata/metadata-tags.h   |  17 +++---
 plug-ins/metadata/metadata-xml.c    |  24 ++++-----
 3 files changed, 70 insertions(+), 71 deletions(-)
---
diff --git a/plug-ins/metadata/metadata-editor.c b/plug-ins/metadata/metadata-editor.c
index 7d24e20d3e..6360621707 100644
--- a/plug-ins/metadata/metadata-editor.c
+++ b/plug-ins/metadata/metadata-editor.c
@@ -3073,11 +3073,11 @@ metadata_dialog_editor_set_metadata (GExiv2Metadata *metadata,
                   gint               counter;
                   gint               j;
 
-                  counter = count_tags (metadata, licensor_header,
+                  counter = count_tags (metadata, LICENSOR_HEADER,
                                         licensor,
                                         G_N_ELEMENTS (licensor));
 
-                  get_tags (metadata, licensor_header,
+                  get_tags (metadata, LICENSOR_HEADER,
                             licensor,
                             G_N_ELEMENTS (licensor), counter);
 
@@ -3345,11 +3345,11 @@ metadata_dialog_editor_set_metadata (GExiv2Metadata *metadata,
                   GtkTreeIter        iter;
                   gint               counter;
 
-                  counter = count_tags (metadata, copyrightowner_header,
+                  counter = count_tags (metadata, COPYRIGHTOWNER_HEADER,
                                         copyrightowner,
                                         G_N_ELEMENTS (copyrightowner));
 
-                  get_tags (metadata, copyrightowner_header,
+                  get_tags (metadata, COPYRIGHTOWNER_HEADER,
                             copyrightowner,
                             G_N_ELEMENTS (copyrightowner), counter);
 
@@ -3437,11 +3437,11 @@ metadata_dialog_editor_set_metadata (GExiv2Metadata *metadata,
                   GtkTreeIter        iter;
                   gint               counter;
 
-                  counter = count_tags (metadata, imagecreator_header,
+                  counter = count_tags (metadata, IMAGECREATOR_HEADER,
                                         imagecreator,
                                         G_N_ELEMENTS (imagecreator));
 
-                  get_tags (metadata, imagecreator_header,
+                  get_tags (metadata, IMAGECREATOR_HEADER,
                             imagecreator,
                             G_N_ELEMENTS (imagecreator), counter);
 
@@ -3529,11 +3529,11 @@ metadata_dialog_editor_set_metadata (GExiv2Metadata *metadata,
                   GtkTreeIter        iter;
                   gint               counter;
 
-                  counter = count_tags (metadata, artworkorobject_header,
+                  counter = count_tags (metadata, ARTWORKOROBJECT_HEADER,
                                         artworkorobject,
                                         G_N_ELEMENTS (artworkorobject));
 
-                  get_tags (metadata, artworkorobject_header,
+                  get_tags (metadata, ARTWORKOROBJECT_HEADER,
                             artworkorobject,
                             G_N_ELEMENTS (artworkorobject), counter);
 
@@ -3732,11 +3732,11 @@ metadata_dialog_editor_set_metadata (GExiv2Metadata *metadata,
                   GtkTreeIter        iter;
                   gint               counter;
 
-                  counter = count_tags (metadata, registryid_header,
+                  counter = count_tags (metadata, REGISTRYID_HEADER,
                                         registryid,
                                         G_N_ELEMENTS (registryid));
 
-                  get_tags (metadata, registryid_header,
+                  get_tags (metadata, REGISTRYID_HEADER,
                             registryid,
                             G_N_ELEMENTS (registryid), counter);
 
@@ -3824,11 +3824,11 @@ metadata_dialog_editor_set_metadata (GExiv2Metadata *metadata,
                   GtkTreeIter        iter;
                   gint               counter;
 
-                  counter = count_tags (metadata, locationshown_header,
+                  counter = count_tags (metadata, LOCATIONSHOWN_HEADER,
                                         locationshown,
                                         G_N_ELEMENTS (locationshown));
 
-                  get_tags (metadata, locationshown_header,
+                  get_tags (metadata, LOCATIONSHOWN_HEADER,
                             locationshown,
                             G_N_ELEMENTS (locationshown), counter);
 
@@ -4495,7 +4495,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
   /* CLEAR LOCATION SHOW DATA */
 
   gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata),
-                             locationshown_header);
+                             LOCATIONSHOWN_HEADER);
 
   output_data[0] = 0;
   for (row = 0; row < 256; row++)
@@ -4505,7 +4505,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
       for (item = 0; item < G_N_ELEMENTS (locationshown); item++)
         {
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                     locationshown_header, row, locationshown[item]);
+                     LOCATIONSHOWN_HEADER, row, locationshown[item]);
           gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata), tag);
         }
     }
@@ -4527,7 +4527,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      locationshown_header, counter, locationshown[0]);
+                      LOCATIONSHOWN_HEADER, counter, locationshown[0]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4537,7 +4537,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      locationshown_header, counter, locationshown[1]);
+                      LOCATIONSHOWN_HEADER, counter, locationshown[1]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4547,7 +4547,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      locationshown_header, counter, locationshown[2]);
+                      LOCATIONSHOWN_HEADER, counter, locationshown[2]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4557,7 +4557,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      locationshown_header, counter, locationshown[3]);
+                      LOCATIONSHOWN_HEADER, counter, locationshown[3]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4567,7 +4567,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      locationshown_header, counter, locationshown[4]);
+                      LOCATIONSHOWN_HEADER, counter, locationshown[4]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4577,7 +4577,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      locationshown_header, counter, locationshown[5]);
+                      LOCATIONSHOWN_HEADER, counter, locationshown[5]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4597,7 +4597,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
   /* CLEAR ARTWORK OR OBJECT DATA */
 
   gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata),
-                             artworkorobject_header);
+                             ARTWORKOROBJECT_HEADER);
 
   output_data[0] = 0;
   for (row = 0; row < 256; row++)
@@ -4607,7 +4607,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
       for (item = 0; item < G_N_ELEMENTS (artworkorobject); item++)
         {
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      artworkorobject_header, row, artworkorobject[item]);
+                      ARTWORKOROBJECT_HEADER, row, artworkorobject[item]);
 
           gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata), tag);
         }
@@ -4631,7 +4631,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      artworkorobject_header, counter, artworkorobject[0]);
+                      ARTWORKOROBJECT_HEADER, counter, artworkorobject[0]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4641,7 +4641,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      artworkorobject_header, counter, artworkorobject[1]);
+                      ARTWORKOROBJECT_HEADER, counter, artworkorobject[1]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4651,7 +4651,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      artworkorobject_header, counter, artworkorobject[2]);
+                      ARTWORKOROBJECT_HEADER, counter, artworkorobject[2]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4661,7 +4661,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      artworkorobject_header, counter, artworkorobject[3]);
+                      ARTWORKOROBJECT_HEADER, counter, artworkorobject[3]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4671,7 +4671,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      artworkorobject_header, counter, artworkorobject[4]);
+                      ARTWORKOROBJECT_HEADER, counter, artworkorobject[4]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4681,7 +4681,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      artworkorobject_header, counter, artworkorobject[5]);
+                      ARTWORKOROBJECT_HEADER, counter, artworkorobject[5]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4701,7 +4701,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
   /* CLEAR REGISTRY ID DATA */
 
   gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata),
-                             registryid_header);
+                             REGISTRYID_HEADER);
 
   output_data[0] = 0;
   for (row = 0; row < 256; row++)
@@ -4711,7 +4711,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
       for (item = 0; item < G_N_ELEMENTS (registryid); item++)
         {
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      registryid_header, row, registryid[item]);
+                      REGISTRYID_HEADER, row, registryid[item]);
 
           gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata), tag);
         }
@@ -4735,7 +4735,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      registryid_header, counter, registryid[0]);
+                      REGISTRYID_HEADER, counter, registryid[0]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4745,7 +4745,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      registryid_header, counter, registryid[1]);
+                      REGISTRYID_HEADER, counter, registryid[1]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4765,7 +4765,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
   /* CLEAR IMAGE CREATOR DATA */
 
   gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata),
-                             imagecreator_header);
+                             IMAGECREATOR_HEADER);
 
   output_data[0] = 0;
   for (row = 0; row < 256; row++)
@@ -4775,7 +4775,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
       for (item = 0; item < G_N_ELEMENTS (imagecreator); item++)
         {
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      imagecreator_header, row, imagecreator[item]);
+                      IMAGECREATOR_HEADER, row, imagecreator[item]);
 
           gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata), tag);
         }
@@ -4799,7 +4799,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      imagecreator_header, counter, imagecreator[0]);
+                      IMAGECREATOR_HEADER, counter, imagecreator[0]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4809,7 +4809,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      imagecreator_header, counter, imagecreator[1]);
+                      IMAGECREATOR_HEADER, counter, imagecreator[1]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4829,7 +4829,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
   /* CLEAR COPYRIGHT OWNER DATA */
 
   gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata),
-                             copyrightowner_header);
+                             COPYRIGHTOWNER_HEADER);
 
   output_data[0] = 0;
   for (row = 0; row < 256; row++)
@@ -4839,7 +4839,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
       for (item = 0; item < G_N_ELEMENTS (copyrightowner); item++)
         {
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      copyrightowner_header, row, copyrightowner[item]);
+                      COPYRIGHTOWNER_HEADER, row, copyrightowner[item]);
 
           gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata), tag);
         }
@@ -4863,7 +4863,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      copyrightowner_header, counter, copyrightowner[0]);
+                      COPYRIGHTOWNER_HEADER, counter, copyrightowner[0]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4873,7 +4873,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      copyrightowner_header, counter, copyrightowner[1]);
+                      COPYRIGHTOWNER_HEADER, counter, copyrightowner[1]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4893,7 +4893,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
   /* CLEAR LICENSOR DATA */
 
   gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata),
-                             licensor_header);
+                             LICENSOR_HEADER);
 
   output_data[0] = 0;
   for (row = 0; row < 256; row++)
@@ -4903,7 +4903,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
       for (item = 0; item < G_N_ELEMENTS (licensor); item++)
         {
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      licensor_header, row, licensor[item]);
+                      LICENSOR_HEADER, row, licensor[item]);
 
           gexiv2_metadata_clear_tag (GEXIV2_METADATA (g_metadata), tag);
         }
@@ -4930,7 +4930,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      licensor_header, counter, licensor[0]);
+                      LICENSOR_HEADER, counter, licensor[0]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4940,7 +4940,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      licensor_header, counter, licensor[1]);
+                      LICENSOR_HEADER, counter, licensor[1]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4950,7 +4950,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      licensor_header, counter, licensor[2]);
+                      LICENSOR_HEADER, counter, licensor[2]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4960,7 +4960,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      licensor_header, counter, licensor[3]);
+                      LICENSOR_HEADER, counter, licensor[3]);
 
           strcpy (type1, phone_types[0].data);
 
@@ -4983,7 +4983,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      licensor_header, counter, licensor[4]);
+                      LICENSOR_HEADER, counter, licensor[4]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -4993,7 +4993,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      licensor_header, counter, licensor[5]);
+                      LICENSOR_HEADER, counter, licensor[5]);
 
           strcpy (type2, phone_types[0].data);
 
@@ -5018,7 +5018,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      licensor_header, counter, licensor[6]);
+                      LICENSOR_HEADER, counter, licensor[6]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
@@ -5028,7 +5028,7 @@ metadata_editor_write_callback (GtkWidget  *dialog,
                               -1);
 
           g_snprintf (tag, sizeof (tag), "%s[%d]%s",
-                      licensor_header, counter, licensor[7]);
+                      LICENSOR_HEADER, counter, licensor[7]);
 
           set_tag_string (g_metadata, tag, tag_data);
           g_free (tag_data);
diff --git a/plug-ins/metadata/metadata-tags.h b/plug-ins/metadata/metadata-tags.h
index 63bc09c802..bcc9dac4f9 100644
--- a/plug-ins/metadata/metadata-tags.h
+++ b/plug-ins/metadata/metadata-tags.h
@@ -404,7 +404,7 @@ static const TranslateTag imageSupplierInfoTags[] =
 
 /* Plus and IPTC extension tags */
 
-static const gchar *licensor_header = "Xmp.plus.Licensor";
+#define LICENSOR_HEADER "Xmp.plus.Licensor"
 static const gchar *licensor[] =
 {
   "/plus:LicensorName",
@@ -418,7 +418,7 @@ static const gchar *licensor[] =
 };
 
 #ifdef USE_TAGS
-static const gchar *imagesupplier_header = "Xmp.plus.ImageSupplier";
+#define IMAGESUPPLIER_HEADER "Xmp.plus.ImageSupplier"
 static const gchar *imagesupplier[] =
 {
   "/plus:ImageSupplierName",
@@ -426,28 +426,28 @@ static const gchar *imagesupplier[] =
 };
 #endif
 
-static const gchar *imagecreator_header = "Xmp.plus.ImageCreator";
+#define IMAGECREATOR_HEADER "Xmp.plus.ImageCreator"
 static const gchar *imagecreator[] =
 {
   "/plus:ImageCreatorName",
   "/plus:ImageCreatorID"
 };
 
-static const gchar *copyrightowner_header = "Xmp.plus.CopyrightOwner";
+#define COPYRIGHTOWNER_HEADER "Xmp.plus.CopyrightOwner"
 static const gchar *copyrightowner[] =
 {
   "/plus:CopyrightOwnerName",
   "/plus:CopyrightOwnerID"
 };
 
-static const gchar *registryid_header = "Xmp.iptcExt.RegistryId";
+#define REGISTRYID_HEADER "Xmp.iptcExt.RegistryId"
 static const gchar *registryid[] =
 {
   "/Iptc4xmpExt:RegOrgId",
   "/Iptc4xmpExt:RegItemId"
 };
 
-static const gchar *artworkorobject_header = "Xmp.iptcExt.ArtworkOrObject";
+#define ARTWORKOROBJECT_HEADER "Xmp.iptcExt.ArtworkOrObject"
 static const gchar *artworkorobject[] =
 {
   "/Iptc4xmpExt:AODateCreated",
@@ -458,7 +458,7 @@ static const gchar *artworkorobject[] =
   "/Iptc4xmpExt:AOCreator"
 };
 
-static const gchar *locationshown_header = "Xmp.iptcExt.LocationShown";
+#define LOCATIONSHOWN_HEADER "Xmp.iptcExt.LocationShown"
 static const gchar *locationshown[] =
 {
   "/Iptc4xmpExt:Sublocation",
@@ -470,7 +470,7 @@ static const gchar *locationshown[] =
 };
 
 #ifdef USE_TAGS
-static const gchar *locationcreated_header = "Xmp.iptcExt.LocationCreated";
+#define LOCATIONCREATED_HEADER "Xmp.iptcExt.LocationCreated"
 static const gchar *locationcreated[] =
 {
   "/Iptc4xmpExt:Sublocation",
@@ -483,4 +483,3 @@ static const gchar *locationcreated[] =
 #endif
 
 #endif /* __METADATA_TAGS_H__ */
-
diff --git a/plug-ins/metadata/metadata-xml.c b/plug-ins/metadata/metadata-xml.c
index b4f3dde74c..16a5caa7b7 100644
--- a/plug-ins/metadata/metadata-xml.c
+++ b/plug-ins/metadata/metadata-xml.c
@@ -221,7 +221,7 @@ set_tag_ui (metadata_editor *args,
             }
         }
       /* Add new values values */
-      if (!strcmp ("Xmp.plus.Licensor", name))
+      if (!strcmp (LICENSOR_HEADER, name))
         {
           for (row = 1; row < row_count+1; row++)
             {
@@ -264,7 +264,7 @@ set_tag_ui (metadata_editor *args,
                 }
             }
         }
-      else if (!strcmp ("Xmp.plus.ImageCreator", name))
+      else if (!strcmp (IMAGECREATOR_HEADER, name))
         {
           for (row = 1; row < row_count+1; row++)
             {
@@ -295,7 +295,7 @@ set_tag_ui (metadata_editor *args,
                 }
             }
         }
-      else if (!strcmp ("Xmp.iptcExt.ArtworkOrObject", name))
+      else if (!strcmp (ARTWORKOROBJECT_HEADER, name))
         {
           for (row = 1; row < row_count+1; row++)
             {
@@ -334,7 +334,7 @@ set_tag_ui (metadata_editor *args,
                 }
             }
         }
-      else if (!strcmp ("Xmp.iptcExt.RegistryId", name))
+      else if (!strcmp (REGISTRYID_HEADER, name))
         {
           for (row = 1; row < row_count+1; row++)
             {
@@ -365,7 +365,7 @@ set_tag_ui (metadata_editor *args,
                 }
             }
         }
-      else if (!strcmp ("Xmp.plus.CopyrightOwner", name))
+      else if (!strcmp (COPYRIGHTOWNER_HEADER, name))
         {
           if (row_count > 0)
             {
@@ -399,7 +399,7 @@ set_tag_ui (metadata_editor *args,
                 }
             }
         }
-      else if (!strcmp ("Xmp.iptcExt.LocationShown", name))
+      else if (!strcmp (LOCATIONSHOWN_HEADER, name))
         {
           for (row = 1; row < row_count+1; row++)
             {
@@ -604,7 +604,7 @@ get_tag_ui_list (metadata_editor *args, gchar *name, gchar *mode)
     {
       if (gtk_tree_model_iter_nth_child(treemodel, &iter, NULL, row))
         {
-          if (!strcmp ("Xmp.plus.Licensor", name))
+          if (!strcmp (LICENSOR_HEADER, name))
             {
               gtk_tree_model_get (treemodel, &iter,
                                   COL_LICENSOR_NAME, &tagdata[row][0],
@@ -640,7 +640,7 @@ get_tag_ui_list (metadata_editor *args, gchar *name, gchar *mode)
                   xmldata = g_strconcat (xmldata, "\t\t\t</list-element>\n", NULL);
                 }
             }
-          else if (!strcmp ("Xmp.plus.CopyrightOwner", name))
+          else if (!strcmp (COPYRIGHTOWNER_HEADER, name))
             {
               gtk_tree_model_get (treemodel, &iter,
                                   COL_CR_OWNER_NAME, &tagdata[row][0],
@@ -662,7 +662,7 @@ get_tag_ui_list (metadata_editor *args, gchar *name, gchar *mode)
                   xmldata = g_strconcat (xmldata, "\t\t\t</list-element>\n", NULL);
                 }
             }
-          else if (!strcmp ("Xmp.plus.ImageCreator", name))
+          else if (!strcmp (IMAGECREATOR_HEADER, name))
             {
               gtk_tree_model_get (treemodel, &iter,
                                   COL_IMG_CR8_NAME, &tagdata[row][0],
@@ -686,7 +686,7 @@ get_tag_ui_list (metadata_editor *args, gchar *name, gchar *mode)
                   xmldata = g_strconcat (xmldata, "\t\t\t</list-element>\n", NULL);
                 }
             }
-          else if (!strcmp ("Xmp.iptcExt.ArtworkOrObject", name))
+          else if (!strcmp (ARTWORKOROBJECT_HEADER, name))
             {
               gtk_tree_model_get (treemodel, &iter,
                                   COL_AOO_TITLE, &tagdata[row][0],
@@ -718,7 +718,7 @@ get_tag_ui_list (metadata_editor *args, gchar *name, gchar *mode)
                   xmldata = g_strconcat (xmldata, "\t\t\t</list-element>\n", NULL);
                 }
             }
-          else if (!strcmp ("Xmp.iptcExt.RegistryId", name))
+          else if (!strcmp (REGISTRYID_HEADER, name))
             {
               gtk_tree_model_get (treemodel, &iter,
                                   COL_REGSITRY_ORG_ID, &tagdata[row][0],
@@ -742,7 +742,7 @@ get_tag_ui_list (metadata_editor *args, gchar *name, gchar *mode)
                   xmldata = g_strconcat (xmldata, "\t\t\t</list-element>\n", NULL);
                 }
             }
-          else if (!strcmp ("Xmp.iptcExt.LocationShown", name))
+          else if (!strcmp (LOCATIONSHOWN_HEADER, name))
             {
               gtk_tree_model_get (treemodel, &iter,
                                   COL_LOC_SHO_SUB_LOC, &tagdata[row][0],


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