[gnome-font-viewer] font-view: destroy error dialog when closed
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-font-viewer] font-view: destroy error dialog when closed
- Date: Thu, 4 Aug 2022 14:05:57 +0000 (UTC)
commit c59f3a3fff66cb98785964f63b0e167f33ab2543
Author: Jake Dane <3689-jakedane users noreply gitlab gnome org>
Date: Thu Aug 4 06:18:06 2022 +0000
font-view: destroy error dialog when closed
The error dialog couldn't be closed. The cause was that it connected the
dialog response to gtk_widget_unparent instead of to gtk_window_destroy.
Fixes #45.
src/font-view.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/font-view.c b/src/font-view.c
index adb0540..b22135a 100644
--- a/src/font-view.c
+++ b/src/font-view.c
@@ -723,11 +723,12 @@ font_view_show_error (FontViewApplication *self,
GtkWidget *dialog;
dialog = gtk_message_dialog_new (GTK_WINDOW (self->main_window),
- GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE, "%s", primary_text);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s",
secondary_text);
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_unparent),
+ g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy),
NULL);
gtk_widget_show (dialog);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]