]> Dogcows Code - chaz/openbox/commitdiff
"text" was no longer needed
authorDana Jansens <danakj@orodu.net>
Wed, 25 Apr 2007 01:59:56 +0000 (01:59 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 25 Apr 2007 01:59:56 +0000 (01:59 +0000)
render/font.c

index a0e622d55364deac81a5f66f50690127173bc649..bd4dcfc23c39074d7ccb3c6d6ca35d14a0ed158a 100644 (file)
@@ -175,7 +175,6 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
     XftColor c;
     gint mw;
     PangoRectangle rect;
-    gchar *text;
     PangoAttrList* attrs = NULL;
 
     /* center the text vertically
@@ -192,13 +191,11 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
 
     /* * * set up the layout * * */
 
-    text = g_strdup(t->string);
-
     if (t->shortcut) {
         gchar *i;
         gchar *lowertext;
 
-        lowertext = g_utf8_strdown(text, -1);
+        lowertext = g_utf8_strdown(t->string, -1);
         i = g_utf8_strchr(lowertext, -1, t->shortcut);
         if (i != NULL) {
             PangoAttribute *a;
@@ -214,11 +211,9 @@ void RrFontDraw(XftDraw *d, RrTextureText *t, RrRect *area)
         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);
 
-    g_free(text);
-
     /* * * end of setting up the layout * * */
 
     pango_layout_get_pixel_extents(t->font->layout, NULL, &rect);
This page took 0.024452 seconds and 4 git commands to generate.