[gtk+/refactor: 84/145] gtk/gtkcellrenderertext.c: use accessor functions to access GtkWidget
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/refactor: 84/145] gtk/gtkcellrenderertext.c: use accessor functions to access GtkWidget
- Date: Mon, 16 Aug 2010 18:26:06 +0000 (UTC)
commit ac4b1542089870afd6ce3292f36039b6d7c014fb
Author: Javier Jardón <jjardon gnome org>
Date: Wed Aug 11 23:16:11 2010 +0200
gtk/gtkcellrenderertext.c: use accessor functions to access GtkWidget
gtk/gtkcellrenderertext.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c
index 435bb3d..3dd2131 100644
--- a/gtk/gtkcellrenderertext.c
+++ b/gtk/gtkcellrenderertext.c
@@ -1522,7 +1522,7 @@ get_size (GtkCellRenderer *cell,
PangoFontDescription *font_desc;
gint row_height;
- font_desc = pango_font_description_copy_static (widget->style->font_desc);
+ font_desc = pango_font_description_copy_static (gtk_widget_get_style (widget)->font_desc);
pango_font_description_merge_static (font_desc, priv->font, TRUE);
if (priv->scale_set)
@@ -1576,7 +1576,9 @@ get_size (GtkCellRenderer *cell,
gint char_width;
context = pango_layout_get_context (layout);
- metrics = pango_context_get_metrics (context, widget->style->font_desc, pango_context_get_language (context));
+ metrics = pango_context_get_metrics (context,
+ gtk_widget_get_style (widget)->font_desc,
+ pango_context_get_language (context));
char_width = pango_font_metrics_get_approximate_char_width (metrics);
pango_font_metrics_unref (metrics);
@@ -1708,7 +1710,7 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
else if (priv->wrap_width == -1)
pango_layout_set_width (layout, -1);
- gtk_paint_layout (widget->style,
+ gtk_paint_layout (gtk_widget_get_style (widget),
window,
state,
TRUE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]