=== modified file 'src/bubble.c' --- old/src/bubble.c 2009-03-17 11:32:50 +0000 +++ new/src/bubble.c 2009-03-18 12:37:26 +0000 @@ -147,7 +147,7 @@ /* top-left, right of the corner */ cairo_move_to (cr, x + radius, y); - /* top-right, left of the corner */ + /* top-right, left of the corner */ cairo_line_to (cr, x + width - radius, y); @@ -160,12 +160,12 @@ -90.0f * G_PI / 180.0f, 0.0f * G_PI / 180.0f); - /* bottom-right, above the corner */ + /* bottom-right, above the corner */ cairo_line_to (cr, x + width, y + height - radius); - /* bottom-right, left of the corner */ + /* bottom-right, left of the corner */ cairo_arc (cr, x + width - radius, y + height - radius, @@ -178,7 +178,7 @@ x + radius, y + height); - /* bottom-left, above the corner */ + /* bottom-left, above the corner */ cairo_arc (cr, x + radius, y + height - radius, @@ -2028,13 +2028,24 @@ g_object_unref (self); } +static gchar * +filter_html (const gchar *text) +{ + gchar *ret; + GRegex *regex; + + regex = g_regex_new ("<(.|\n)*?>", 0, 0, NULL); + + ret = g_regex_replace (regex, text, -1, 0, "", 0, NULL); + + return ret; +} + void bubble_set_title (Bubble* self, const gchar* title) { - gboolean success; gchar* text; - GError* error = NULL; BubblePrivate* priv; if (!self || !IS_BUBBLE (self)) @@ -2046,23 +2057,10 @@ g_string_free (priv->title, TRUE); /* filter out any HTML/markup if possible */ - success = pango_parse_markup (title, - -1, - 0, /* no accel-marker needed */ - NULL, /* no PangoAttr needed */ - &text, - NULL, /* no accel-marker-return needed */ - &error); + text = filter_html (title); - /* if parsing worked out set the "filtered" text ...*/ - if (success) - { - priv->title = g_string_new (text); - g_free ((gpointer) text); - } - /* ... other pass it as-is */ - else - priv->title = g_string_new (title); + priv->title = g_string_new (text); + g_free ((gpointer) text); } const gchar*