[eog/use-appchooser-and-portals: 2/2] EogUtil: Do not emit warning if app chooser portal is cancelled



commit bf1aac8ab127da83cb797b40a8e086824e74425e
Author: Felix Riemann <friemann gnome org>
Date:   Thu Jul 2 16:20:58 2020 +0200

    EogUtil: Do not emit warning if app chooser portal is cancelled

 src/eog-util.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/eog-util.c b/src/eog-util.c
index 5460c035..bd0c009a 100644
--- a/src/eog-util.c
+++ b/src/eog-util.c
@@ -520,7 +520,8 @@ open_with_flatpak_portal_cb (GObject *source, GAsyncResult *result, gpointer use
        XdpPortal *portal = XDP_PORTAL (source);
        g_autoptr(GError) error = NULL;
 
-       if (!xdp_portal_open_uri_finish (portal, result, &error))
+       if (!xdp_portal_open_uri_finish (portal, result, &error)
+           && !g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
        {
                g_warning ("Failed to open file via portal: %s", error->message);
        }


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