[gtk+/portal] Implement check button support for GtkFileChooserNativePortal
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/portal] Implement check button support for GtkFileChooserNativePortal
- Date: Tue, 28 Jun 2016 00:57:22 +0000 (UTC)
commit d7fc250965504966b846bfb26a0f1b36c1dbc470
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 27 20:56:49 2016 -0400
Implement check button support for GtkFileChooserNativePortal
gtk/gtkfilechoosernativeportal.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c
index 1dbeea9..29ce73c 100644
--- a/gtk/gtkfilechoosernativeportal.c
+++ b/gtk/gtkfilechoosernativeportal.c
@@ -243,9 +243,10 @@ gtk_file_chooser_native_choice_to_variant (GtkFileChooserNativeChoice *choice)
int i;
g_variant_builder_init (&choices, G_VARIANT_TYPE ("a(ss)"));
- for (i = 0; choice->options[i]; i++)
+ if (choice->options)
{
- g_variant_builder_add (&choices, "(&s&s)", choice->options[i], choice->option_labels[i]);
+ for (i = 0; choice->options[i]; i++)
+ g_variant_builder_add (&choices, "(&s&s)", choice->options[i], choice->option_labels[i]);
}
return g_variant_new ("(&s&s a(ss)&s)",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]