[gtk+] GtkFontButton: Fix the handling of show-preview-button
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkFontButton: Fix the handling of show-preview-button
- Date: Mon, 9 Jun 2014 17:43:36 +0000 (UTC)
commit eb34ff5b489e28bca79e4c8107ea4a58cf3994b1
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jun 8 11:57:47 2014 -0400
GtkFontButton: Fix the handling of show-preview-button
We were not storing the value at all, and not notifying.
gtk/gtkfontbutton.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c
index 70c024f..e780e48 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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]