[gtk/matthiasc/css-change-tracking-5: 5/5] Try again to fix the file portal for ci



commit a1031c176956d893c6a67f847507ea2fbfe199bc
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jan 18 02:55:57 2020 -0500

    Try again to fix the file portal for ci
    
    This is a neverending story. Use GTK_USE_PORTAL=0
    in the environment to avoid the D-Bus calls altogether.

 gdk/filetransferportal.c         | 7 +++++++
 testsuite/css/change/meson.build | 1 +
 2 files changed, 8 insertions(+)
---
diff --git a/gdk/filetransferportal.c b/gdk/filetransferportal.c
index 541fd85a24..cb7be03066 100644
--- a/gdk/filetransferportal.c
+++ b/gdk/filetransferportal.c
@@ -518,7 +518,14 @@ file_transfer_portal_register (void)
 
   if (!called)
     {
+      const char *use_portal;
+      
       called = TRUE;
+
+      use_portal = g_getenv ("GTK_USE_PORTAL");
+      if (use_portal && use_portal[0] == '0')
+        return;
+
       g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
                                 G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES
                                 | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS
diff --git a/testsuite/css/change/meson.build b/testsuite/css/change/meson.build
index 59a2562710..1b4b6eba44 100644
--- a/testsuite/css/change/meson.build
+++ b/testsuite/css/change/meson.build
@@ -14,6 +14,7 @@ test('change', test_change,
             'GSETTINGS_BACKEND=memory',
             'GTK_CSD=1',
             'G_ENABLE_DIAGNOSTIC=0',
+            'GTK_USE_PORTAL=0',
             'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
             'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
           ],


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