[recipes/recipes-1.0] Check portal availability in one more place



commit bc8cdc65b82a94c32e9864ad5288791350895614
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Mar 17 21:37:54 2017 -0400

    Check portal availability in one more place
    
    We want to show this warning dialog in all places
    where a missing portal would affect functionality.

 src/gr-chef-dialog.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-chef-dialog.c b/src/gr-chef-dialog.c
index a5ecfad..6b32378 100644
--- a/src/gr-chef-dialog.c
+++ b/src/gr-chef-dialog.c
@@ -146,6 +146,9 @@ image_button_clicked (GrChefDialog *self)
         GtkFileChooserNative *chooser;
         g_autoptr(GtkFileFilter) filter = NULL;
 
+        if (!portal_available (GTK_WINDOW (self), "org.freedesktop.portal.FileChooser"))
+                return;
+
         chooser = gtk_file_chooser_native_new (_("Select an Image"),
                                                GTK_WINDOW (self),
                                                GTK_FILE_CHOOSER_ACTION_OPEN,


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