From b1167d1d11993f5d9c5306e8d26b7442aa3e5fbf Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sun, 9 Jan 2005 17:32:25 +0000 Subject: [PATCH] Don't pass NULL to pango_context_get_metrics. Use 2005-01-09 Anders Carlsson * gtk/gtkcellrenderertext.c: (get_size): * gtk/gtklabel.c: (gtk_label_size_request): * gtk/gtkprogressbar.c: (gtk_progress_bar_size_request): Don't pass NULL to pango_context_get_metrics. Use pango_context_get_language instead, which is way faster. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkcellrenderertext.c | 2 +- gtk/gtklabel.c | 3 ++- gtk/gtkprogressbar.c | 2 +- 7 files changed, 36 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c755af56ec..28e6eac39a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-01-09 Anders Carlsson + + * gtk/gtkcellrenderertext.c: (get_size): + * gtk/gtklabel.c: (gtk_label_size_request): + * gtk/gtkprogressbar.c: (gtk_progress_bar_size_request): + Don't pass NULL to pango_context_get_metrics. Use + pango_context_get_language instead, which is way faster. + 2005-01-08 Matthias Clasen * configure.in: Bump version diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c755af56ec..28e6eac39a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +2005-01-09 Anders Carlsson + + * gtk/gtkcellrenderertext.c: (get_size): + * gtk/gtklabel.c: (gtk_label_size_request): + * gtk/gtkprogressbar.c: (gtk_progress_bar_size_request): + Don't pass NULL to pango_context_get_metrics. Use + pango_context_get_language instead, which is way faster. + 2005-01-08 Matthias Clasen * configure.in: Bump version diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c755af56ec..28e6eac39a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +2005-01-09 Anders Carlsson + + * gtk/gtkcellrenderertext.c: (get_size): + * gtk/gtklabel.c: (gtk_label_size_request): + * gtk/gtkprogressbar.c: (gtk_progress_bar_size_request): + Don't pass NULL to pango_context_get_metrics. Use + pango_context_get_language instead, which is way faster. + 2005-01-08 Matthias Clasen * configure.in: Bump version diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c755af56ec..28e6eac39a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +2005-01-09 Anders Carlsson + + * gtk/gtkcellrenderertext.c: (get_size): + * gtk/gtklabel.c: (gtk_label_size_request): + * gtk/gtkprogressbar.c: (gtk_progress_bar_size_request): + Don't pass NULL to pango_context_get_metrics. Use + pango_context_get_language instead, which is way faster. + 2005-01-08 Matthias Clasen * configure.in: Bump version diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index cada59ad2e..ca57fa3bed 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -1436,7 +1436,7 @@ get_size (GtkCellRenderer *cell, gint char_width; context = pango_layout_get_context (layout); - metrics = pango_context_get_metrics (context, widget->style->font_desc, NULL); + metrics = pango_context_get_metrics (context, widget->style->font_desc, pango_context_get_language (context)); char_width = pango_font_metrics_get_approximate_char_width (metrics); pango_font_metrics_unref (metrics); diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 7bd5329e74..aa5f9b9379 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -2024,7 +2024,8 @@ gtk_label_size_request (GtkWidget *widget, gint char_width, digit_width, char_pixels, w; context = pango_layout_get_context (label->layout); - metrics = pango_context_get_metrics (context, widget->style->font_desc, NULL); + metrics = pango_context_get_metrics (context, widget->style->font_desc, + pango_context_get_language (context)); char_width = pango_font_metrics_get_approximate_char_width (metrics); digit_width = pango_font_metrics_get_approximate_digit_width (metrics); diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c index fd241a074b..ac9f052014 100644 --- a/gtk/gtkprogressbar.c +++ b/gtk/gtkprogressbar.c @@ -523,7 +523,7 @@ gtk_progress_bar_size_request (GtkWidget *widget, /* The minimum size for ellipsized text is ~ 3 chars */ context = pango_layout_get_context (layout); - metrics = pango_context_get_metrics (context, widget->style->font_desc, NULL); + metrics = pango_context_get_metrics (context, widget->style->font_desc, pango_context_get_language (context)); char_width = pango_font_metrics_get_approximate_char_width (metrics); pango_font_metrics_unref (metrics);