[recipes] Check portal availability in one more place
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Check portal availability in one more place
- Date: Sat, 18 Mar 2017 01:39:00 +0000 (UTC)
commit d4a246b307e94b563f3e5f9f2e155e810e7a4863
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]