[xdg-desktop-portal-gnome/mwleeds/implement-dynamic-launcher: 27/28] fixup! Implement dynamic launcher portal (gtk4)
- From: Phaedrus Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [xdg-desktop-portal-gnome/mwleeds/implement-dynamic-launcher: 27/28] fixup! Implement dynamic launcher portal (gtk4)
- Date: Tue, 15 Mar 2022 00:54:18 +0000 (UTC)
commit 0967e5b718e6c602ffa548e568ff988602547ea2
Author: Phaedrus Leeds <mwleeds protonmail com>
Date: Fri Mar 11 12:43:48 2022 -0800
fixup! Implement dynamic launcher portal (gtk4)
src/dynamic-launcher.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/dynamic-launcher.c b/src/dynamic-launcher.c
index 965b280..6565f9e 100644
--- a/src/dynamic-launcher.c
+++ b/src/dynamic-launcher.c
@@ -113,8 +113,15 @@ send_prepare_install_response (InstallDialogHandle *handle)
if (handle->response == 0)
{
const char *chosen_name = gtk_entry_get_text (GTK_ENTRY (handle->entry));
- g_variant_builder_add (&opt_builder, "{sv}", "name", g_variant_new_string (chosen_name));
- g_variant_builder_add (&opt_builder, "{sv}", "icon", handle->icon_v);
+ if (chosen_name == NULL || chosen_name[0] == '\0')
+ {
+ handle->response = 3;
+ }
+ else
+ {
+ g_variant_builder_add (&opt_builder, "{sv}", "name", g_variant_new_string (chosen_name));
+ g_variant_builder_add (&opt_builder, "{sv}", "icon", handle->icon_v);
+ }
}
if (handle->request->exported)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]