[nautilus] Drop libportal option
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Drop libportal option
- Date: Fri, 27 May 2022 07:59:24 +0000 (UTC)
commit 794931998cb27b7ca94651c72300a5ed167a8951
Author: Jeremy Bicha <jeremy bicha canonical com>
Date: Thu May 26 15:19:04 2022 -0400
Drop libportal option
This is a follow up from https://gitlab.gnome.org/GNOME/nautilus/-/commit/6af38c29d
As a result of that commit, it's not possible to set a picture as desktop wallpaper
from Nautilus unless libportal is used. Since libportal is generally available,
it's no longer a useful option to not use libportal.
meson.build | 9 ++-------
meson_options.txt | 6 ------
src/nautilus-files-view.c | 15 ++-------------
3 files changed, 4 insertions(+), 26 deletions(-)
---
diff --git a/meson.build b/meson.build
index e9ec2b856..154c7b763 100644
--- a/meson.build
+++ b/meson.build
@@ -109,12 +109,8 @@ gnome_autoar = dependency('gnome-autoar-0', version: '>= 0.4.0')
gnome_desktop = dependency('gnome-desktop-4', version: '>= 43')
gtk = dependency('gtk4', version: '>= 4.6')
libadwaita = dependency('libadwaita-1', version: '>= 1.0')
-libportal = []
-libportal_gtk4 = []
-if get_option('libportal')
- libportal = dependency('libportal', version: '>= 0.5')
- libportal_gtk4 = dependency('libportal-gtk4', version: '>= 0.5')
-endif
+libportal = dependency('libportal', version: '>= 0.5')
+libportal_gtk4 = dependency('libportal-gtk4', version: '>= 0.5')
selinux = []
if get_option('selinux')
selinux = dependency('libselinux', version: '>= 2.0')
@@ -160,7 +156,6 @@ conf.set_quoted('VERSION', version_string)
conf.set('ENABLE_PACKAGEKIT', get_option('packagekit'))
conf.set('ENABLE_PROFILING', get_option('profiling'))
-conf.set('HAVE_LIBPORTAL', get_option('libportal'))
conf.set('HAVE_SELINUX', get_option('selinux'))
#############################################################
diff --git a/meson_options.txt b/meson_options.txt
index 6e781c4ef..fce5f16f9 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -26,12 +26,6 @@ option(
############
# Features #
############
-option(
- 'libportal',
- type: 'boolean',
- value: true,
- description: 'Enable using xdg-desktop-portals for desktop integration',
-)
option(
'packagekit',
type: 'boolean',
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 109d991c2..00617b508 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -38,6 +38,8 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include <gnome-autoar/gnome-autoar.h>
+#include <libportal/portal.h>
+#include <libportal-gtk4/portal-gtk4.h>
#include <math.h>
#include <nautilus-extension.h>
#include <string.h>
@@ -88,11 +90,6 @@
#include "nautilus-window.h"
#include "nautilus-tracker-utilities.h"
-#ifdef HAVE_LIBPORTAL
-#include <libportal/portal.h>
-#include <libportal-gtk4/portal-gtk4.h>
-#endif
-
/* Minimum starting update inverval */
#define UPDATE_INTERVAL_MIN 100
/* Maximum update interval */
@@ -6525,9 +6522,6 @@ can_set_wallpaper (GList *selection)
{
NautilusFile *file;
-#ifndef HAVE_LIBPORTAL
- return FALSE;
-#else
if (g_list_length (selection) != 1)
{
return FALSE;
@@ -6542,10 +6536,8 @@ can_set_wallpaper (GList *selection)
/* FIXME: check file size? */
return TRUE;
-#endif
}
-#ifdef HAVE_LIBPORTAL
static void
set_wallpaper_with_portal_cb (GObject *source,
GAsyncResult *result,
@@ -6584,7 +6576,6 @@ set_wallpaper_with_portal (NautilusFile *file,
NULL);
xdp_parent_free (parent);
}
-#endif /* HAVE_LIBPORTAL */
static void
action_set_as_wallpaper (GSimpleAction *action,
@@ -6602,9 +6593,7 @@ action_set_as_wallpaper (GSimpleAction *action,
file = NAUTILUS_FILE (selection->data);
-#ifdef HAVE_LIBPORTAL
set_wallpaper_with_portal (file, user_data);
-#endif
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]