# HG changeset patch # User Nathan Walp # Date 1180658160 0 # Node ID 7790021b127059e5d09eb5ae6b99b789d08191d5 # Parent 92e27556160c57964b07dd6cfa35e0a087596e82 add a PURPLE_MESSAGE_NO_LINKIFY to prevent things from getting linkified diff -r 92e27556160c -r 7790021b1270 libpurple/conversation.c --- a/libpurple/conversation.c Wed May 30 05:37:04 2007 +0000 +++ b/libpurple/conversation.c Fri Jun 01 00:36:00 2007 +0000 @@ -108,8 +108,12 @@ type = purple_conversation_get_type(conv); - /* Always linkfy the text for display */ - displayed = purple_markup_linkify(message); + /* Always linkfy the text for display, unless we're + * explicitly asked to do otheriwse*/ + if(msgflags & PURPLE_MESSAGE_NO_LINKIFY) + displayed = g_strdup(message); + else + displayed = purple_markup_linkify(message); if ((conv->features & PURPLE_CONNECTION_HTML) && !(msgflags & PURPLE_MESSAGE_RAW)) diff -r 92e27556160c -r 7790021b1270 libpurple/conversation.h --- a/libpurple/conversation.h Wed May 30 05:37:04 2007 +0000 +++ b/libpurple/conversation.h Fri Jun 01 00:36:00 2007 +0000 @@ -116,7 +116,9 @@ PURPLE_MESSAGE_RAW = 0x0800, /**< "Raw" message - don't apply formatting */ PURPLE_MESSAGE_IMAGES = 0x1000, /**< Message contains images */ - PURPLE_MESSAGE_NOTIFY = 0x2000 /**< Message is a notification */ + PURPLE_MESSAGE_NOTIFY = 0x2000, /**< Message is a notification */ + PURPLE_MESSAGE_NO_LINKIFY = 0x4000 /**< Message should not be auto- + linkified */ } PurpleMessageFlags; diff -r 92e27556160c -r 7790021b1270 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Wed May 30 05:37:04 2007 +0000 +++ b/pidgin/gtkconv.c Fri Jun 01 00:36:00 2007 +0000 @@ -5062,7 +5062,11 @@ g_return_if_fail(gc != NULL); /* Make sure URLs are clickable */ - displaying = purple_markup_linkify(message); + if(flags & PURPLE_MESSAGE_NO_LINKIFY) + displaying = g_strdup(message); + else + displaying = purple_markup_linkify(message); + plugin_return = GPOINTER_TO_INT(purple_signal_emit_return_1( pidgin_conversations_get_handle(), (type == PURPLE_CONV_TYPE_IM ? "displaying-im-msg" : "displaying-chat-msg"),