mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
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
This commit is contained in:
parent
dce69904d8
commit
d05730db49
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user