[gtk+/refactor: 66/96] gtk/gtkfontsel.c: use accessor functions to access GtkWidget
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/refactor: 66/96] gtk/gtkfontsel.c: use accessor functions to access GtkWidget
- Date: Thu, 12 Aug 2010 02:21:27 +0000 (UTC)
commit 331cf9aa089a9d038eeb29247268f4d48ec7f72a
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]