diff options
author | Rui Matos <tiagomatos@gmail.com> | 2013-12-05 21:35:36 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-09-28 22:07:48 -0400 |
commit | d05730db490641156ed46046dbd7099edd830004 (patch) | |
tree | 1679bb09ea3b966fb897895e788c917b2ed59be0 /gtk/gtkfontbutton.c | |
parent | dce69904d8451f2f8f3c827bdf676d2eb08d898a (diff) | |
download | gtk+-d05730db490641156ed46046dbd7099edd830004.tar.gz |
GtkFontButton: Make sure the dialog isn't destroyed on delete-event
The remaining code assumes that the dialog doesn't get destroyed, but
it actually does on delete-event.
In particular, the filter function and the preview text are lost as
soon as the dialog is created and thus when we create a new dialog we
don't have those properties to set on it anymore.
https://bugzilla.gnome.org/show_bug.cgi?id=719936
Diffstat (limited to 'gtk/gtkfontbutton.c')
-rw-r--r-- | gtk/gtkfontbutton.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c index 867d82fa55..7e068c40c1 100644 --- a/gtk/gtkfontbutton.c +++ b/gtk/gtkfontbutton.c @@ -1049,6 +1049,9 @@ gtk_font_button_clicked (GtkButton *button) g_signal_connect (font_dialog, "destroy", G_CALLBACK (dialog_destroy), font_button); + + g_signal_connect (font_dialog, "delete-event", + G_CALLBACK (gtk_widget_hide_on_delete), NULL); } if (!gtk_widget_get_visible (font_button->priv->font_dialog)) |