summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Dane <3689-jakedane@users.noreply.gitlab.gnome.org>2022-08-04 06:18:06 +0000
committerJake Dane <3689-jakedane@users.noreply.gitlab.gnome.org>2022-08-04 06:18:06 +0000
commitc59f3a3fff66cb98785964f63b0e167f33ab2543 (patch)
treef93bf9bb68da8d5da9f4ad1df416c0f8e1e7e84b
parent4484990d0a1f86194a2eccff650ebacf058ad5d2 (diff)
downloadgnome-font-viewer-c59f3a3fff66cb98785964f63b0e167f33ab2543.tar.gz
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.
-rw-r--r--src/font-view.c5
1 files 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);
}