[epiphany] Make libportal dependency non-optional



commit 0b25b213b189dcc01064fdeb8792e594f6ccf924
Author: Phaedrus Leeds <mwleeds protonmail com>
Date:   Fri Dec 17 14:08:52 2021 -0800

    Make libportal dependency non-optional
    
    This should simplify things since we use libportal for a few different
    things in ephy-flatpak-utils.c and we're about to use it in
    ephy-web-app-utils.c.

 lib/ephy-flatpak-utils.c | 9 ---------
 meson.build              | 4 +---
 meson_options.txt        | 6 ------
 3 files changed, 1 insertion(+), 18 deletions(-)
---
diff --git a/lib/ephy-flatpak-utils.c b/lib/ephy-flatpak-utils.c
index 0fd90b3f1..e01d54cd8 100644
--- a/lib/ephy-flatpak-utils.c
+++ b/lib/ephy-flatpak-utils.c
@@ -28,9 +28,7 @@
 #include <fcntl.h>
 #include <gio/gio.h>
 #include <gio/gunixfdlist.h>
-#if USE_LIBPORTAL
 #include <libportal-gtk3/portal-gtk3.h>
-#endif
 #include <string.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -82,7 +80,6 @@ ephy_is_running_inside_sandbox (void)
   return GPOINTER_TO_INT (g_once (&inside_sandbox, get_inside_sandbox, NULL));
 }
 
-#if USE_LIBPORTAL
 static void
 opened_uri (GObject      *object,
             GAsyncResult *result,
@@ -101,13 +98,11 @@ opened_uri (GObject      *object,
   if (!res)
     g_warning ("%s", error->message);
 }
-#endif
 
 static void
 ephy_open_uri (const char *uri,
                gboolean    is_dir)
 {
-#if USE_LIBPORTAL
   GApplication *application;
   GtkWindow *window;
   XdpParent *parent;
@@ -123,10 +118,6 @@ ephy_open_uri (const char *uri,
     xdp_portal_open_uri (g_steal_pointer (&portal), parent, uri, XDP_OPEN_URI_FLAG_ASK, NULL, opened_uri, 
GINT_TO_POINTER (FALSE));
 
   xdp_parent_free (parent);
-#else
-  g_warning ("Flatpak portal support disabled at compile time, cannot open %s",
-             uri);
-#endif
 }
 
 void
diff --git a/meson.build b/meson.build
index 154bf31e1..23f4ac3be 100644
--- a/meson.build
+++ b/meson.build
@@ -95,7 +95,7 @@ libhandy_dep = dependency('libhandy-1', version: '>= 1.5.0')
 libsecret_dep = dependency('libsecret-1', version: '>= 0.19.0')
 libxml_dep = dependency('libxml-2.0', version: '>= 2.6.12')
 nettle_dep = dependency('nettle', version: nettle_requirement)
-portal_dep = dependency('libportal-gtk3', version: '>= 0.5', required: get_option('libportal'))
+portal_dep = dependency('libportal-gtk3', version: '>= 0.5')
 sqlite3_dep = dependency('sqlite3', version: '>= 3.22')
 
 if get_option('soup2').enabled()
@@ -108,8 +108,6 @@ else
   webkit2gtk_web_extension_dep = dependency('webkit2gtk-web-extension-4.1', version: webkitgtk_requirement)
 endif
 
-conf.set10('USE_LIBPORTAL', portal_dep.found())
-
 webkit_revision = webkit2gtk_dep.get_variable(pkgconfig : 'revision', default_value : '')
 if webkit_revision == 'tarball'
   webkit_revision = ''
diff --git a/meson_options.txt b/meson_options.txt
index 023e61188..030cc9b9f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,12 +4,6 @@ option('developer_mode',
   description: 'Enable developer mode'
 )
 
-option('libportal',
-  type: 'feature',
-  value: 'enabled',
-  description: 'Depend on libportal for Flatpak support'
-)
-
 option('network_tests',
   type: 'feature',
   value: 'disabled',


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