Don't pass NULL to pango_context_get_metrics. Use

2005-01-09  Anders Carlsson <andersca@gnome.org>

	* 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.
This commit is contained in:
Anders Carlsson 2005-01-09 17:32:25 +00:00 committed by Anders Carlsson
parent f589509f72
commit b1167d1d11
7 changed files with 36 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2005-01-09 Anders Carlsson <andersca@gnome.org>
* 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 <mclasen@redhat.com>
* configure.in: Bump version

View File

@ -1,3 +1,11 @@
2005-01-09 Anders Carlsson <andersca@gnome.org>
* 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 <mclasen@redhat.com>
* configure.in: Bump version

View File

@ -1,3 +1,11 @@
2005-01-09 Anders Carlsson <andersca@gnome.org>
* 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 <mclasen@redhat.com>
* configure.in: Bump version

View File

@ -1,3 +1,11 @@
2005-01-09 Anders Carlsson <andersca@gnome.org>
* 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 <mclasen@redhat.com>
* configure.in: Bump version

View File

@ -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);

View File

@ -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);

View File

@ -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);