GtkIMHtml hack still needed?

Andrew Victor avictor.za at gmail.com
Thu Jan 28 15:06:34 EST 2010


hi,

In pidgin/gtkconv.c:
    /* Awful hack to work around GtkIMHtml's inefficient rendering of
messages with lots of formatting changes.
     * If a message has over 100 '<' characters, strip formatting
before appending it. Hopefully nobody actually
     * needs that much formatting, anyway.
     */
    for (bracket = strchr(displaying, '<'); bracket && *(bracket + 1);
bracket = strchr(bracket + 1, '<'))
        tag_count++;

    if (tag_count > 100) {
        char *tmp = displaying;
        displaying = purple_markup_strip_html(tmp);
        g_free(tmp);
    }

ie, If there are more than 100 HTML tags in a message, then all the
markup is stripped and the raw message is dumped to the conversation
window.

Is this "hack" still needed with the current GtkIMHtml?


For MXit's Services we're trying to show a more visually appealing
user-interface using HTML formatting in the conversation window.
At the moment we have a work-around for the "hack" above
[libpurple/protocols/mxit/markup.c mxit_show_split_message()] to count
HTML tags and then try to intelligently split the message into
multiple messages for the Gtk conversation window.
A messy solution, but was necessary when it was a 3rd-party plugin.

The "hack" was originally added in the Gaim days (2007-01-18):
[http://developer.pidgin.im/viewmtn/revision/info/2cca70bad0ff8696e0af15a11855b95e667fd78e]


Is it possible to remove this "hack" from pidgin/gtkconv.c?


Regards,
  Andrew Victor




More information about the Devel mailing list