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



commit 85f03493bbcbfc170efa72d5bb90196861cc245a
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 9f9bed4..a9fdef8 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -1163,6 +1163,7 @@ static void
 gtk_font_selection_update_preview (GtkFontSelection *fontsel)
 {
   GtkFontSelectionPriv *priv = fontsel->priv;
+  GtkRequisition requisition;
   GtkRcStyle *rc_style;
   gint new_height;
   GtkRequisition old_requisition;
@@ -1180,7 +1181,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]