From eb34ff5b489e28bca79e4c8107ea4a58cf3994b1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 8 Jun 2014 11:57:47 -0400 Subject: [PATCH] GtkFontButton: Fix the handling of show-preview-button We were not storing the value at all, and not notifying. --- gtk/gtkfontbutton.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c index 70c024f875..e780e48b62 100644 --- a/gtk/gtkfontbutton.c +++ b/gtk/gtkfontbutton.c @@ -272,10 +272,15 @@ gtk_font_button_set_show_preview_entry (GtkFontButton *font_button, { GtkFontButtonPrivate *priv = font_button->priv; - if (priv->font_dialog) - gtk_font_chooser_set_show_preview_entry (GTK_FONT_CHOOSER (priv->font_dialog), show); - else - priv->show_preview_entry = show != FALSE; + show = show != FALSE; + + if (priv->show_preview_entry != show) + { + priv->show_preview_entry = show; + if (priv->font_dialog) + gtk_font_chooser_set_show_preview_entry (GTK_FONT_CHOOSER (priv->font_dialog), show); + g_object_notify (G_OBJECT (font_button), "show-preview-entry"); + } } static PangoFontFamily *