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




commit d65f5e42cb0626a4d3cf5e2b5ccf65722d455f41
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, unpin gexiv2 dependency in flatpak manifests and bump
    the build dependency accordingly to get rid of the warnings.

 build-aux/flatpak/org.gnome.Nautilus.json                    | 6 +++---
 build-aux/flatpak/org.gnome.Nautilus.yml                     | 4 ++--
 build-aux/flatpak/org.gnome.NautilusMaster.yml               | 1 +
 extensions/image-properties/nautilus-image-properties-page.c | 6 +++---
 meson.build                                                  | 2 +-
 5 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/build-aux/flatpak/org.gnome.Nautilus.json b/build-aux/flatpak/org.gnome.Nautilus.json
index 52e6333a7..d6767b85b 100644
--- a/build-aux/flatpak/org.gnome.Nautilus.json
+++ b/build-aux/flatpak/org.gnome.Nautilus.json
@@ -46,13 +46,13 @@
       "builddir": true,
       "config-opts": [
         "--libdir=/app/lib",
-        "-Ddisable-introspection=True"
+        "-Dintrospection=false",
+        "-Dpython3_girdir=no"
       ],
       "sources": [
         {
           "type": "git",
-          "url": "https://gitlab.gnome.org/GNOME/gexiv2.git";,
-          "tag": "gexiv2-0.10.10"
+          "url": "https://gitlab.gnome.org/GNOME/gexiv2.git";
         }
       ]
     },
diff --git a/build-aux/flatpak/org.gnome.Nautilus.yml b/build-aux/flatpak/org.gnome.Nautilus.yml
index 4a15c4c53..3f54a4275 100644
--- a/build-aux/flatpak/org.gnome.Nautilus.yml
+++ b/build-aux/flatpak/org.gnome.Nautilus.yml
@@ -38,11 +38,11 @@ modules:
   builddir: true
   config-opts:
   - "--libdir=/app/lib"
-  - "-Ddisable-introspection=True"
+  - "-Dintrospection=false"
+  - "-Dpython3_girdir=no"
   sources:
   - type: git
     url: https://gitlab.gnome.org/GNOME/gexiv2.git
-    tag: gexiv2-0.10.10
 - name: tracker-miners
   buildsystem: meson
   cleanup:
diff --git a/build-aux/flatpak/org.gnome.NautilusMaster.yml b/build-aux/flatpak/org.gnome.NautilusMaster.yml
index bc1771627..fb56cc9d7 100644
--- a/build-aux/flatpak/org.gnome.NautilusMaster.yml
+++ b/build-aux/flatpak/org.gnome.NautilusMaster.yml
@@ -39,6 +39,7 @@ modules:
   config-opts:
   - "--libdir=/app/lib"
   - "-Dintrospection=false"
+  - "-Dpython3_girdir=no"
   sources:
   - type: git
     url: https://gitlab.gnome.org/GNOME/gexiv2.git
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]