[nautilus/wip/oholy/gexiv2-deprecation] extensions/image-properties: Replace deprecated symbols




commit ce8346978bfe919b59d63d70492f1122c8d41a03
Author: Ondrej Holy <oholy redhat com>
Date:   Fri Jun 4 14:39:06 2021 +0200

    extensions/image-properties: Replace deprecated symbols
    
    The build log contains warnings about deprecated gexiv2 functions. Let's
    port to the new API and bump the gexiv2 dependency accordingly to get rid
    of the warnings.

 extensions/image-properties/nautilus-image-properties-page.c | 6 +++---
 meson.build                                                  | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/extensions/image-properties/nautilus-image-properties-page.c 
b/extensions/image-properties/nautilus-image-properties-page.c
index 23aca4986..9b7485f58 100644
--- a/extensions/image-properties/nautilus-image-properties-page.c
+++ b/extensions/image-properties/nautilus-image-properties-page.c
@@ -196,11 +196,11 @@ append_gexiv2_tag (NautilusImagesPropertiesPage  *page,
         {
             g_autofree char *tag_value = NULL;
 
-            tag_value = gexiv2_metadata_get_tag_interpreted_string (page->md, *i);
+            tag_value = gexiv2_metadata_try_get_tag_interpreted_string (page->md, *i, NULL);
 
             if (description == NULL)
             {
-                description = gexiv2_metadata_get_tag_description (*i);
+                description = gexiv2_metadata_try_get_tag_description (*i, NULL);
             }
 
             /* don't add empty tags - try next one */
@@ -262,7 +262,7 @@ append_gexiv2_info (NautilusImagesPropertiesPage *page)
     append_gexiv2_tag (page, rights, _("Copyright"));
     append_gexiv2_tag (page, rating, _("Rating"));
 
-    if (gexiv2_metadata_get_gps_info (page->md, &longitude, &latitude, &altitude))
+    if (gexiv2_metadata_try_get_gps_info (page->md, &longitude, &latitude, &altitude, NULL))
     {
         g_autofree char *gps_coords = NULL;
 
diff --git a/meson.build b/meson.build
index 12a7cd601..1d28f4e6c 100644
--- a/meson.build
+++ b/meson.build
@@ -109,7 +109,7 @@ libgd_dep = libgd.get_variable('libgd_dep')
 libm = cc.find_library('m')
 
 if get_option('extensions')
-  gexiv = dependency('gexiv2', version: '>= 0.10.0')
+  gexiv = dependency('gexiv2', version: '>= 0.12.2')
   gst_tag_dep = dependency('gstreamer-tag-1.0')
   gst_pbutils_dep = dependency('gstreamer-pbutils-1.0')
 endif


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