[gtk+] file chooser: Don't pass NULL as title to the portal
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] file chooser: Don't pass NULL as title to the portal
- Date: Tue, 13 Jun 2017 17:12:28 +0000 (UTC)
commit 1e47b9ea67a5eefc255ca2b9199df7e18dc783f8
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 13 13:09:56 2017 -0400
file chooser: Don't pass NULL as title to the portal
This causes critical warnings.
gtk/gtkfilechoosernativeportal.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c
index 45ceb3f..bf29442 100644
--- a/gtk/gtkfilechoosernativeportal.c
+++ b/gtk/gtkfilechoosernativeportal.c
@@ -288,6 +288,7 @@ show_portal_file_chooser (GtkFileChooserNative *self,
GDBusMessage *message;
GVariantBuilder opt_builder;
gboolean multiple;
+ const char *title;
message = g_dbus_message_new_method_call ("org.freedesktop.portal.Desktop",
"/org/freedesktop/portal/desktop",
@@ -333,10 +334,12 @@ show_portal_file_chooser (GtkFileChooserNative *self,
g_variant_builder_add (&opt_builder, "{sv}", "choices",
serialize_choices (GTK_FILE_CHOOSER_NATIVE (self)));
+ title = gtk_native_dialog_get_title (GTK_NATIVE_DIALOG (self));
+
g_dbus_message_set_body (message,
g_variant_new ("(ss@a{sv})",
parent_window_str ? parent_window_str : "",
- gtk_native_dialog_get_title (GTK_NATIVE_DIALOG (self)),
+ title ? title : "",
g_variant_builder_end (&opt_builder)));
g_dbus_connection_send_message_with_reply (data->connection,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]