[gtk+/wip/matthiasc/kill-event-signals: 5/58] font button: Use GtkWindow::hide-on-close
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/kill-event-signals: 5/58] font button: Use GtkWindow::hide-on-close
- Date: Wed, 3 Jan 2018 03:02:22 +0000 (UTC)
commit 5fe53b5c1722c753f0e8fe69fa2079c95172ef52
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 31 10:43:01 2017 -0500
font button: Use GtkWindow::hide-on-close
Instead of the ::delete-event signal.
gtk/gtkfontbutton.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c
index 0394b47..d91f700 100644
--- a/gtk/gtkfontbutton.c
+++ b/gtk/gtkfontbutton.c
@@ -1052,6 +1052,8 @@ gtk_font_button_clicked (GtkButton *button,
parent = gtk_widget_get_toplevel (GTK_WIDGET (font_button));
priv->font_dialog = gtk_font_chooser_dialog_new (priv->title, NULL);
+ gtk_window_set_hide_on_close (GTK_WINDOW (priv->font_dialog), TRUE);
+
font_dialog = GTK_FONT_CHOOSER (font_button->priv->font_dialog);
if (priv->font_map)
@@ -1093,16 +1095,13 @@ 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))
{
font_dialog = GTK_FONT_CHOOSER (font_button->priv->font_dialog);
gtk_font_chooser_set_font_desc (font_dialog, font_button->priv->font_desc);
- }
+ }
gtk_window_present (GTK_WINDOW (font_button->priv->font_dialog));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]