GtkIMHtml hack still needed?

Mark Doliner mark at kingant.net
Thu Jan 28 19:35:52 EST 2010


I suspect this hack is still needed with the current verison of GtkIMHtml.

--Mark

On Thu, Jan 28, 2010 at 12:06 PM, Andrew Victor <avictor.za at gmail.com> wrote:
> 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
>
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel
>




More information about the Devel mailing list