[gtk+/refactor: 9/23] 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: 9/23] gtk/gtkfontsel.c: use accessor functions to access GtkWidget
- Date: Tue, 24 Aug 2010 14:41:07 +0000 (UTC)
commit 9535891cc94989c378342d7379aee4cf8ba70e3d
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 ffe67b8..623fd92 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -1166,6 +1166,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;
@@ -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]