[gtk+/refactor: 10/18] gtk/gtkfontsel.c: use accessor functions to access GtkWidget



commit ef70a987119e8b51f19237838551ed812a18804d
Author: Javier Jardón <jjardon gnome org>
Date:   Wed Aug 11 23:11:49 2010 +0200

    gtk/gtkfontsel.c: use accessor functions to access GtkWidget

 gtk/gtkfontsel.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index f1a509c..4e88d06 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -1166,6 +1166,7 @@ static void
 gtk_font_selection_update_preview (GtkFontSelection *fontsel)
 {
   GtkFontSelectionPrivate *priv = fontsel->priv;
+  GtkRequisition requisition;
   GtkRcStyle *rc_style;
   gint new_height;
   GtkRequisition old_requisition;
@@ -1183,7 +1184,8 @@ gtk_font_selection_update_preview (GtkFontSelection *fontsel)
   gtk_widget_size_request (preview_entry, NULL);
   
   /* We don't ever want to be over MAX_PREVIEW_HEIGHT pixels high. */
-  new_height = CLAMP (preview_entry->requisition.height, INITIAL_PREVIEW_HEIGHT, MAX_PREVIEW_HEIGHT);
+  gtk_widget_get_requisition (preview_entry, &requisition);
+  new_height = CLAMP (requisition.height, INITIAL_PREVIEW_HEIGHT, MAX_PREVIEW_HEIGHT);
 
   if (new_height > old_requisition.height || new_height < old_requisition.height - 30)
     gtk_widget_set_size_request (preview_entry, -1, new_height);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]