"text" was no longer needed

This commit is contained in:
Dana Jansens 2007-04-25 01:59:56 +00:00
parent 4717b9870c
commit 0927804559

View file

@ -175,7 +175,6 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
XftColor c; XftColor c;
gint mw; gint mw;
PangoRectangle rect; PangoRectangle rect;
gchar *text;
PangoAttrList* attrs = NULL; PangoAttrList* attrs = NULL;
/* center the text vertically /* center the text vertically
@ -192,13 +191,11 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
/* * * set up the layout * * */ /* * * set up the layout * * */
text = g_strdup(t->string);
if (t->shortcut) { if (t->shortcut) {
gchar *i; gchar *i;
gchar *lowertext; gchar *lowertext;
lowertext = g_utf8_strdown(text, -1); lowertext = g_utf8_strdown(t->string, -1);
i = g_utf8_strchr(lowertext, -1, t->shortcut); i = g_utf8_strchr(lowertext, -1, t->shortcut);
if (i != NULL) { if (i != NULL) {
PangoAttribute *a; PangoAttribute *a;
@ -214,11 +211,9 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
g_free(lowertext); g_free(lowertext);
} }
pango_layout_set_text(t->font->layout, text, -1); pango_layout_set_text(t->font->layout, t->string, -1);
pango_layout_set_width(t->font->layout, w * PANGO_SCALE); pango_layout_set_width(t->font->layout, w * PANGO_SCALE);
g_free(text);
/* * * end of setting up the layout * * */ /* * * end of setting up the layout * * */
pango_layout_get_pixel_extents(t->font->layout, NULL, &rect); pango_layout_get_pixel_extents(t->font->layout, NULL, &rect);