[nautilus/wip/antoniof/switch-to-gtk4: 5/40] build: Switch to GTK 4 -- DOESN'T BUILD




commit 5d428b98605a95522fc184f9a373c428a503ea94
Author: António Fernandes <antoniof gnome org>
Date:   Fri Dec 17 15:36:18 2021 +0000

    build: Switch to GTK 4 -- DOESN'T BUILD
    
    Also use GTK 4-ready libportal and libgnome-desktop libraries.
    
    The gtk4 helper mock API is dropped now that we have the real thing.

 build-aux/flatpak/org.gnome.Nautilus.json |   2 +-
 build-aux/flatpak/org.gnome.Nautilus.yml  |   2 +-
 libnautilus-extension/meson.build         |   6 +-
 meson.build                               |   8 +-
 src/meson.build                           |   4 +-
 src/nautilus-application.c                |   1 -
 src/nautilus-dnd.c                        |   1 -
 src/nautilus-file-operations.c            |   5 +-
 src/nautilus-files-view.c                 |   3 +-
 src/nautilus-floating-bar.c               |   1 -
 src/nautilus-gtk4-helpers.c               | 218 ------------------------------
 src/nautilus-gtk4-helpers.h               |  66 ---------
 src/nautilus-list-view.c                  |   1 -
 src/nautilus-notebook.c                   |   1 -
 src/nautilus-pathbar.c                    |   1 -
 src/nautilus-places-view.c                |   1 -
 src/nautilus-properties-window.c          |   1 -
 src/nautilus-query-editor.c               |   1 -
 src/nautilus-search-popover.c             |   1 -
 src/nautilus-special-location-bar.c       |   1 -
 src/nautilus-toolbar.c                    |   1 -
 src/nautilus-trash-bar.c                  |   1 -
 src/nautilus-view-icon-controller.c       |   1 -
 src/nautilus-window-slot.c                |   1 -
 src/nautilus-window.c                     |   5 +-
 src/nautilus-x-content-bar.c              |   1 -
 26 files changed, 15 insertions(+), 320 deletions(-)
---
diff --git a/build-aux/flatpak/org.gnome.Nautilus.json b/build-aux/flatpak/org.gnome.Nautilus.json
index fb6213074..f952cfeed 100644
--- a/build-aux/flatpak/org.gnome.Nautilus.json
+++ b/build-aux/flatpak/org.gnome.Nautilus.json
@@ -118,7 +118,7 @@
       "builddir": true,
       "config-opts": [
         "-Ddocs=false",
-        "-Dbackends=gtk3",
+        "-Dbackends=gtk4",
         "--libdir=/app/lib",
         "--buildtype=debugoptimized"
       ],
diff --git a/build-aux/flatpak/org.gnome.Nautilus.yml b/build-aux/flatpak/org.gnome.Nautilus.yml
index 555f95905..af617396f 100644
--- a/build-aux/flatpak/org.gnome.Nautilus.yml
+++ b/build-aux/flatpak/org.gnome.Nautilus.yml
@@ -86,7 +86,7 @@ modules:
   builddir: true
   config-opts:
   - "-Ddocs=false"
-  - "-Dbackends=gtk3"
+  - "-Dbackends=gtk4"
   - "--libdir=/app/lib"
   -  "--buildtype=debugoptimized"
   sources:
diff --git a/libnautilus-extension/meson.build b/libnautilus-extension/meson.build
index ad791f60e..6ceb53a14 100644
--- a/libnautilus-extension/meson.build
+++ b/libnautilus-extension/meson.build
@@ -83,10 +83,10 @@ if get_option('introspection')
       '-DNAUTILUS_COMPILATION'
     ],
     sources: libnautilus_extension_sources,
-    nsversion: '3.0',
+    nsversion: '4.0',
     namespace: 'Nautilus',
     includes: [
-      'Gtk-3.0',
+      'Gtk-4.0',
       'Gio-2.0',
       'GLib-2.0'
     ],
@@ -115,7 +115,7 @@ pkgconfig.generate(
   requires: [
     'gio-2.0',
     'glib-2.0',
-    'gtk+-3.0'
+    'gtk4'
   ],
   variables: [
     'exec_prefix=${prefix}',
diff --git a/meson.build b/meson.build
index c8f28ccb3..2f730bfbb 100644
--- a/meson.build
+++ b/meson.build
@@ -107,14 +107,14 @@ gio_unix = dependency('gio-unix-2.0', version: glib_ver)
 glib = dependency('glib-2.0', version: glib_ver)
 gmodule = dependency('gmodule-no-export-2.0', version: glib_ver)
 gnome_autoar = dependency('gnome-autoar-0', version: '>= 0.4.0')
-gnome_desktop = dependency('gnome-desktop-3.0', version: '>= 3.0.0')
-gtk = dependency('gtk+-3.0', version: '>= 3.22.27')
+gnome_desktop = dependency('gnome-desktop-4', version: '>= 1.0.0')
 libhandy = dependency('libhandy-1', version: '>= 1.1.90')
+gtk = dependency('gtk4', version: '>= 4.6')
 libportal = []
-libportal_gtk3 = []
+libportal_gtk4 = []
 if get_option('libportal')
   libportal = dependency('libportal', version: '>= 0.5')
-  libportal_gtk3 = dependency('libportal-gtk3', version: '>= 0.5')
+  libportal_gtk4 = dependency('libportal-gtk4', version: '>= 0.5')
 endif
 selinux = []
 if get_option('selinux')
diff --git a/src/meson.build b/src/meson.build
index 4a11e4ed8..7b9dc9832 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -65,8 +65,6 @@ libnautilus_sources = [
   'gtk/nautilusgtkplacesviewprivate.h',
   'gtk/nautilusgtkplacesviewrow.c',
   'gtk/nautilusgtkplacesviewrowprivate.h',
-  'nautilus-gtk4-helpers.c',
-  'nautilus-gtk4-helpers.h',
   'nautilus-application.c',
   'nautilus-application.h',
   'nautilus-bookmark-list.c',
@@ -267,7 +265,7 @@ nautilus_deps = [
   gnome_desktop,
   libhandy,
   libportal,
-  libportal_gtk3,
+  libportal_gtk4,
   nautilus_extension,
   selinux,
   tracker_sparql,
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index e254c6513..2eff0c4b0 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -65,7 +65,6 @@
 #include "nautilus-view.h"
 #include "nautilus-window-slot.h"
 #include "nautilus-window.h"
-#include "nautilus-gtk4-helpers.h"
 
 typedef struct
 {
diff --git a/src/nautilus-dnd.c b/src/nautilus-dnd.c
index 4803d52fa..7477f0af8 100644
--- a/src/nautilus-dnd.c
+++ b/src/nautilus-dnd.c
@@ -27,7 +27,6 @@
 #include "nautilus-dnd.h"
 
 #include "nautilus-program-choosing.h"
-#include "nautilus-gtk4-helpers.h"
 #include <eel/eel-glib-extensions.h>
 #include <eel/eel-string.h>
 #include <eel/eel-vfs-extensions.h>
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 7af3865aa..0e9a19b21 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -59,14 +59,13 @@
 #include "nautilus-file-undo-operations.h"
 #include "nautilus-file-undo-manager.h"
 #include "nautilus-ui-utilities.h"
-#include "nautilus-gtk4-helpers.h"
 
 #ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
+#include <gdk/x11/gdkx.h>
 #endif
 
 #ifdef GDK_WINDOWING_WAYLAND
-#include <gdk/gdkwayland.h>
+#include <gdk/wayland/gdkwayland.h>
 #endif
 
 typedef struct
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index ac2c0525b..4437a25b3 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -87,11 +87,10 @@
 #include "nautilus-view-icon-controller.h"
 #include "nautilus-window.h"
 #include "nautilus-tracker-utilities.h"
-#include "nautilus-gtk4-helpers.h"
 
 #ifdef HAVE_LIBPORTAL
 #include <libportal/portal.h>
-#include <libportal-gtk3/portal-gtk3.h>
+#include <libportal-gtk4/portal-gtk4.h>
 #endif
 
 /* Minimum starting update inverval */
diff --git a/src/nautilus-floating-bar.c b/src/nautilus-floating-bar.c
index 095e7288b..430d7ca9d 100644
--- a/src/nautilus-floating-bar.c
+++ b/src/nautilus-floating-bar.c
@@ -24,7 +24,6 @@
 #include <string.h>
 
 #include "nautilus-floating-bar.h"
-#include "nautilus-gtk4-helpers.h"
 
 #define HOVER_HIDE_TIMEOUT_INTERVAL 100
 
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 74c8e6f4d..5309f1dfd 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -54,7 +54,6 @@
 #include "nautilus-ui-utilities.h"
 #include "nautilus-view.h"
 #include "nautilus-tracker-utilities.h"
-#include "nautilus-gtk4-helpers.h"
 
 struct SelectionForeachData
 {
diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
index f36c722ee..e5bc14d53 100644
--- a/src/nautilus-notebook.c
+++ b/src/nautilus-notebook.c
@@ -29,7 +29,6 @@
 #include "nautilus-window.h"
 #include "nautilus-window-slot.h"
 #include "nautilus-window-slot-dnd.h"
-#include "nautilus-gtk4-helpers.h"
 
 #include <eel/eel-vfs-extensions.h>
 #include <glib/gi18n.h>
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index dbe30162e..f7e2e895a 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -33,7 +33,6 @@
 #include "nautilus-icon-names.h"
 #include "nautilus-trash-monitor.h"
 #include "nautilus-ui-utilities.h"
-#include "nautilus-gtk4-helpers.h"
 
 #include "nautilus-window-slot-dnd.h"
 
diff --git a/src/nautilus-places-view.c b/src/nautilus-places-view.c
index a2edbfc85..7ba5296fa 100644
--- a/src/nautilus-places-view.c
+++ b/src/nautilus-places-view.c
@@ -26,7 +26,6 @@
 #include "nautilus-toolbar-menu-sections.h"
 #include "nautilus-view.h"
 #include "nautilus-window-slot.h"
-#include "nautilus-gtk4-helpers.h"
 
 typedef struct
 {
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index c01c471ce..45b4f2d35 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -47,7 +47,6 @@
 #include "nautilus-signaller.h"
 #include "nautilus-ui-utilities.h"
 #include "nautilus-signaller.h"
-#include "nautilus-gtk4-helpers.h"
 
 static GHashTable *windows;
 static GHashTable *pending_lists;
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index c88010920..938b2c63a 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -35,7 +35,6 @@
 #include "nautilus-search-popover.h"
 #include "nautilus-mime-actions.h"
 #include "nautilus-ui-utilities.h"
-#include "nautilus-gtk4-helpers.h"
 
 struct _NautilusQueryEditor
 {
diff --git a/src/nautilus-search-popover.c b/src/nautilus-search-popover.c
index 20fde2753..fd77a911f 100644
--- a/src/nautilus-search-popover.c
+++ b/src/nautilus-search-popover.c
@@ -24,7 +24,6 @@
 #include "nautilus-file.h"
 #include "nautilus-ui-utilities.h"
 #include "nautilus-global-preferences.h"
-#include "nautilus-gtk4-helpers.h"
 
  #define SEARCH_FILTER_MAX_YEARS 5
 
diff --git a/src/nautilus-special-location-bar.c b/src/nautilus-special-location-bar.c
index d2a559726..b959346da 100644
--- a/src/nautilus-special-location-bar.c
+++ b/src/nautilus-special-location-bar.c
@@ -24,7 +24,6 @@
 
 #include "nautilus-special-location-bar.h"
 #include "nautilus-enum-types.h"
-#include "nautilus-gtk4-helpers.h"
 
 struct _NautilusSpecialLocationBar
 {
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index c6f03517c..6f2e43af4 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -37,7 +37,6 @@
 #include "nautilus-toolbar-menu-sections.h"
 #include "nautilus-ui-utilities.h"
 #include "nautilus-window.h"
-#include "nautilus-gtk4-helpers.h"
 
 #define OPERATION_MINIMUM_TIME 2 /*s */
 #define NEEDS_ATTENTION_ANIMATION_TIMEOUT 2000 /*ms */
diff --git a/src/nautilus-trash-bar.c b/src/nautilus-trash-bar.c
index af87dbdf1..6ce995586 100644
--- a/src/nautilus-trash-bar.c
+++ b/src/nautilus-trash-bar.c
@@ -32,7 +32,6 @@
 #include "nautilus-file.h"
 #include "nautilus-trash-monitor.h"
 #include "nautilus-ui-utilities.h"
-#include "nautilus-gtk4-helpers.h"
 
 enum
 {
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index f56797771..f28414767 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -9,7 +9,6 @@
 #include "nautilus-directory.h"
 #include "nautilus-global-preferences.h"
 #include "nautilus-thumbnails.h"
-#include "nautilus-gtk4-helpers.h"
 
 struct _NautilusViewIconController
 {
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 16ae23a4a..909143e30 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -48,7 +48,6 @@
 #include <nautilus-extension.h>
 #include "nautilus-ui-utilities.h"
 #include <eel/eel-vfs-extensions.h>
-#include "nautilus-gtk4-helpers.h"
 
 enum
 {
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 8134fcb4e..dfe3bd25b 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -36,11 +36,11 @@
 #include <sys/time.h>
 
 #ifdef GDK_WINDOWING_WAYLAND
-#include <gdk/gdkwayland.h>
+#include <gdk/wayland/gdkwayland.h>
 #endif
 
 #ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
+#include <gdk/x11/gdkx.h>
 #endif
 
 #define DEBUG_FLAG NAUTILUS_DEBUG_WINDOW
@@ -70,7 +70,6 @@
 #include "nautilus-trash-monitor.h"
 #include "nautilus-ui-utilities.h"
 #include "nautilus-window-slot.h"
-#include "nautilus-gtk4-helpers.h"
 
 /* Forward and back buttons on the mouse */
 static gboolean mouse_extra_buttons = TRUE;
diff --git a/src/nautilus-x-content-bar.c b/src/nautilus-x-content-bar.c
index 03fa0cade..5dfb0371a 100644
--- a/src/nautilus-x-content-bar.c
+++ b/src/nautilus-x-content-bar.c
@@ -30,7 +30,6 @@
 #include "nautilus-icon-info.h"
 #include "nautilus-file-utilities.h"
 #include "nautilus-program-choosing.h"
-#include "nautilus-gtk4-helpers.h"
 
 struct _NautilusXContentBar
 {


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