diff src/audacious/ui_skinned_textbox.c @ 2957:c859aa1a1a4e trunk

don't update text if it haven't changed
author Tomasz Mon <desowin@gmail.com>
date Sun, 01 Jul 2007 18:51:36 +0200
parents 45f0c83ed7a2
children afc8f8c21e75
line wrap: on
line diff
--- a/src/audacious/ui_skinned_textbox.c	Mon Jul 02 01:14:57 2007 +0900
+++ b/src/audacious/ui_skinned_textbox.c	Sun Jul 01 18:51:36 2007 +0200
@@ -268,6 +268,7 @@
     textbox->height = bmp_active_skin->properties.textbox_bitmap_font_height;
     textbox->x = x;
     textbox->y = y;
+    textbox->text = g_strdup("");
     priv->gc = gc;
     textbox->width = w;
     priv->scroll_allowed = allow_scroll;
@@ -514,6 +515,8 @@
     UiSkinnedTextbox *textbox = UI_SKINNED_TEXTBOX (widget);
     UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE (textbox);
 
+    if (!strcmp(textbox->text, text))
+         return;
     if (textbox->text)
         g_free(textbox->text);