[seahorse-nautilus] libnautilus-extension: Prefer libnautilus-extension-4



commit 2cc2a06148604b2f118ef460527b03d27530f6d4
Author: Corey Berla <corey berla me>
Date:   Tue Sep 6 13:52:08 2022 -0700

    libnautilus-extension: Prefer libnautilus-extension-4
    
    Check for libnautilus-extension-4 first.  If not found, fallback
    to libnautilus-extension.

 meson.build                      | 9 +++++++--
 nautilus-ext/seahorse-nautilus.c | 6 +++++-
 2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 025e2d1..c1efbfb 100644
--- a/meson.build
+++ b/meson.build
@@ -7,6 +7,8 @@ project('seahorse-nautilus', 'c',
 gnome = import('gnome')
 i18n = import('i18n')
 
+conf = configuration_data()
+
 # Options
 check_compatible_gpg = get_option('check-compatible-gpg')
 libnotify_enabled = get_option('libnotify')
@@ -27,7 +29,11 @@ min_gtk_version = '3.18'
 accepted_gpg_versions= ['1.2.0', '1.4.0', '2.0.0', '2.1.0', '2.2.0', '2.3.0']
 min_gpgme_version = '1.0.0'
 
-libnautilus_extension = dependency('libnautilus-extension-4', version: '>= 4.0')
+libnautilus_extension = dependency('libnautilus-extension-4', version: '>= 43.rc', required: false)
+if not libnautilus_extension.found()
+  conf.set('USE_LIBNAUTILUS_3', true)
+  libnautilus_extension = dependency('libnautilus-extension', version: '>= 2.12.0', required: true)
+endif
 if nautilus_ext_dir == ''
   nautilus_ext_dir = libnautilus_extension.get_pkgconfig_variable('extensiondir')
 endif
@@ -63,7 +69,6 @@ if check_compatible_gpg
 endif
 
 # Configuration
-conf = configuration_data()
 conf.set_quoted('VERSION', meson.project_version())
 conf.set_quoted('PACKAGE', meson.project_name())
 conf.set_quoted('PACKAGE_NAME', meson.project_name())
diff --git a/nautilus-ext/seahorse-nautilus.c b/nautilus-ext/seahorse-nautilus.c
index b567f1c..186f998 100644
--- a/nautilus-ext/seahorse-nautilus.c
+++ b/nautilus-ext/seahorse-nautilus.c
@@ -120,7 +120,11 @@ is_all_mime_types (GList *files, char* types[])
 }
 
 static GList*
-seahorse_nautilus_get_file_items (NautilusMenuProvider *provider, GList *files)
+seahorse_nautilus_get_file_items (NautilusMenuProvider *provider,
+#ifdef USE_LIBNAUTILUS_3
+                                 GtkWidget *window,
+#endif
+                                 GList *files)
 {
     NautilusMenuItem *item;
     GList *scan, *items = NULL;


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