From e9088e344a6d17afe5c497ff98179fea49a50fff Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 5 Sep 2023 16:36:58 +0600 Subject: [PATCH] When target is unselected, command will disappear --- source/ubl-utils.c | 1 + source/ublexec.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/source/ubl-utils.c b/source/ubl-utils.c index fadaadc..20ac0bb 100644 --- a/source/ubl-utils.c +++ b/source/ubl-utils.c @@ -1126,6 +1126,7 @@ char *yon_app_chooser_open_with_sections(char *section_name, char *section_filte } } else { gtk_widget_destroy(dialog); + return ""; } } else { gtk_widget_destroy(dialog); diff --git a/source/ublexec.c b/source/ublexec.c index e98879f..3de1052 100644 --- a/source/ublexec.c +++ b/source/ublexec.c @@ -196,6 +196,9 @@ void on_setup_command(GtkWidget *self, main_window *widgets){ gtk_entry_set_text(GTK_ENTRY(widgets->commandEntry),final_command); free(final_command); } + else { + gtk_entry_set_text(GTK_ENTRY(widgets->commandEntry),""); + } } void on_command_run(GtkWidget *self, main_window *widgets){