[file-roller/wip/jtojnar/nautilus-gtk4] wip: Port extension to Nautilus 43




commit b576b7a4002d15e694193b0f07d91851f7f9e2c1
Author: Jan Tojnar <jtojnar gmail com>
Date:   Fri Jul 15 14:37:58 2022 +0200

    wip: Port extension to Nautilus 43

 default.nix                    | 21 ++++++++++++++++++++-
 meson.build                    |  3 ++-
 nautilus/meson.build           |  2 +-
 nautilus/nautilus-fileroller.c | 10 +++++-----
 nix/sources.json               | 36 ++++++++++++++++++++++++++++++++++++
 5 files changed, 64 insertions(+), 8 deletions(-)
---
diff --git a/default.nix b/default.nix
index 655416a7..09e2f29b 100644
--- a/default.nix
+++ b/default.nix
@@ -109,8 +109,27 @@ makeDerivation rec {
     file
     glib
     gnome.adwaita-icon-theme
-    gnome.nautilus
+    (let
+      gnome-desktop-master = gnome-desktop.overrideAttrs (attrs: {
+        src = sources.gnome-desktop;
+        # Remove removed flags
+        mesonFlags = builtins.filter (flag: builtins.match "-D(date_in_gnome_version|gnome_distributor).+" 
flag == null) attrs.mesonFlags;
+      });
+      libadwaita-master = libadwaita.overrideAttrs (attrs: {
+        src = sources.libadwaita;
+      });
+      nautilus-master = gnome.nautilus.overrideAttrs (attrs: {
+        src = sources.nautilus;
+        buildInputs = [
+          gtk4
+          gnome-desktop-master
+          libadwaita-master
+          libportal-gtk4
+        ] ++ attrs.buildInputs;
+      });
+    in nautilus-master)
     gtk3
+    gtk4
     json-glib
     libarchive
     libhandy
diff --git a/meson.build b/meson.build
index d917869f..b4af4295 100644
--- a/meson.build
+++ b/meson.build
@@ -7,7 +7,7 @@ project('file-roller', 'c',
 glib_version = '>=2.38'
 gtk_version = '>=3.22.0'
 hdy_version = '>=1.5.0'
-nautilus_version = '>=3.28.0'
+nautilus_version = '>=43'
 json_glib_version = '>=0.14.0'
 libarchive_version = '>=3.1.900a'
 
@@ -30,6 +30,7 @@ thread_dep = dependency('threads')
 glib_dep = dependency('glib-2.0', version : glib_version)
 gthread_dep = dependency('gthread-2.0')
 gtk_dep = dependency('gtk+-3.0', version : gtk_version)
+gtk4_dep = dependency('gtk4')
 hdy_dep = dependency('libhandy-1', version: hdy_version)
 libportal_dep = dependency('libportal', version: '>= 0.5', required: use_native_appchooser)
 libportal_gtk3_dep = dependency('libportal-gtk3', version: '>= 0.5', required: use_native_appchooser)
diff --git a/nautilus/meson.build b/nautilus/meson.build
index 5d989033..d0467410 100644
--- a/nautilus/meson.build
+++ b/nautilus/meson.build
@@ -8,7 +8,7 @@ shared_module('nautilus-fileroller',
     thread_dep,
     glib_dep, 
     gthread_dep, 
-    gtk_dep, 
+    gtk4_dep, 
     libnautilus_extension_dep,
     use_json_glib ? libjson_glib_dep : [],
   ],  
diff --git a/nautilus/nautilus-fileroller.c b/nautilus/nautilus-fileroller.c
index 4324ef5d..2f4e9e48 100644
--- a/nautilus/nautilus-fileroller.c
+++ b/nautilus/nautilus-fileroller.c
@@ -299,9 +299,9 @@ nautilus_fr_get_file_items (NautilusMenuProvider *provider,
 
 
 static void
-nautilus_fr_menu_provider_iface_init (NautilusMenuProviderIface *iface)
+nautilus_fr_menu_provider_interface_init (NautilusMenuProviderInterface *interface)
 {
-       iface->get_file_items = nautilus_fr_get_file_items;
+       interface->get_file_items = nautilus_fr_get_file_items;
 }
 
 
@@ -343,8 +343,8 @@ nautilus_fr_register_type (GTypeModule *module)
                (GInstanceInitFunc) nautilus_fr_instance_init,
        };
 
-       static const GInterfaceInfo menu_provider_iface_info = {
-               (GInterfaceInitFunc) nautilus_fr_menu_provider_iface_init,
+       static const GInterfaceInfo menu_provider_interface_info = {
+               (GInterfaceInitFunc) nautilus_fr_menu_provider_interface_init,
                NULL,
                NULL
        };
@@ -357,5 +357,5 @@ nautilus_fr_register_type (GTypeModule *module)
        g_type_module_add_interface (module,
                                     fr_type,
                                     NAUTILUS_TYPE_MENU_PROVIDER,
-                                    &menu_provider_iface_info);
+                                    &menu_provider_interface_info);
 }
diff --git a/nix/sources.json b/nix/sources.json
index 7434121b..9799099a 100644
--- a/nix/sources.json
+++ b/nix/sources.json
@@ -1,4 +1,40 @@
 {
+    "gnome-desktop": {
+        "branch": "master",
+        "description": "Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-desktop";,
+        "homepage": "https://gitlab.gnome.org/GNOME/gnome-desktop";,
+        "owner": "GNOME",
+        "repo": "gnome-desktop",
+        "rev": "2c5aae5234b32ec8616e2c93516815440253fd5e",
+        "sha256": "0xygsbyhpc8gharrhhgj33crjnhdx1zjzhsj7aklzqq88pxyli33",
+        "type": "tarball",
+        "url": 
"https://github.com/GNOME/gnome-desktop/archive/2c5aae5234b32ec8616e2c93516815440253fd5e.tar.gz";,
+        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+    },
+    "libadwaita": {
+        "branch": "main",
+        "description": "Read-only mirror of https://gitlab.gnome.org/GNOME/libadwaita";,
+        "homepage": "https://gitlab.gnome.org/GNOME/libadwaita";,
+        "owner": "GNOME",
+        "repo": "libadwaita",
+        "rev": "3ca918d68b37ce45caa2af2b0062e99246995aea",
+        "sha256": "1irhi89wyjf0dlnqbrrw7c6fjicdllyjj7ckzgwk01rdfwmz4ism",
+        "type": "tarball",
+        "url": "https://github.com/GNOME/libadwaita/archive/3ca918d68b37ce45caa2af2b0062e99246995aea.tar.gz";,
+        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+    },
+    "nautilus": {
+        "branch": "master",
+        "description": "Read-only mirror of https://gitlab.gnome.org/GNOME/nautilus";,
+        "homepage": "https://gitlab.gnome.org/GNOME/nautilus";,
+        "owner": "GNOME",
+        "repo": "nautilus",
+        "rev": "d2803bb7c36d46632002ebef788f0d56fd1c40df",
+        "sha256": "0yg5pmbhxkbgj9569aac9qg6ljch72rlcxh7nxwby2s7w6rkkx22",
+        "type": "tarball",
+        "url": "https://github.com/GNOME/nautilus/archive/d2803bb7c36d46632002ebef788f0d56fd1c40df.tar.gz";,
+        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+    },
     "niv": {
         "branch": "master",
         "description": "Easy dependency management for Nix projects",


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