# HG changeset patch # User Jeffrey Connelly # Date 1184985191 0 # Node ID f61047bae7c00c8f81ecd54093585f50fde33985 # Parent 948ed51b7cf940d5ec25f596dde31588c21bd760 Recognize non-canonical emoticon forms from Pidgin, and turn them into msim emoticons. For example, turn :-) as well as :) into emoticons. diff -r 948ed51b7cf9 -r f61047bae7c0 libpurple/protocols/myspace/myspace.c --- a/libpurple/protocols/myspace/myspace.c Sat Jul 21 02:13:34 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.c Sat Jul 21 02:33:11 2007 +0000 @@ -38,25 +38,34 @@ #include "myspace.h" -/* Based on Miranda plugin by Scott Ellis, formatting.cpp, +/* Loosely based on Miranda plugin by Scott Ellis, formatting.cpp, * https://server.scottellis.com.au/websvn/filedetails.php?repname=Miranda+Plugins&path=%2FMySpace%2Fformatting.cpp&rev=0&sc=0 */ +/* The names in in emoticon_names (for ) map to corresponding + * entries in emoticon_symbols (for the ASCII representation of the emoticon). + */ static const char *emoticon_names[] = { - "bigsmile", "growl", "mad", "scared", "tongue", - "devil", "happy", "messed", "sidefrown", "upset", - "frazzled", "heart", "nerd", "sinister", "wink", /* wink doesn't work */ - "geek", "laugh", "oops", "smirk", "worried", + "bigsmile", "growl", "growl", "mad", "scared", "scared", "tongue", "tongue", + "devil", "devil", "happy", "happy", "happi", + "messed", "sidefrown", "upset", + "frazzled", "heart", "heart", "nerd", "sinister", "wink", "winc", + "geek", "laugh", "laugh", "oops", "smirk", "worried", "worried", "googles", "mohawk", "pirate", "straight", "kiss", - "happi" /* ??? */, NULL}; +/* Multiple emoticon symbols in Pidgin can map to one name. List the + * canonical form, as inserted by the "Smile!" dialog, first. For example, + * :) comes before :-), because although both are recognized as 'happy', + * the first is inserted by the smiley button. + * + * Note that symbols are case-sensitive in Pidgin -- :-X is not :-x. */ static const char *emoticon_symbols[] = { - ":D", ">:o", ":-[", "=-O", ":P", - "O:-)" /*:)*/, ":)", "8-)", ":-$", ":-$", - ":-/", ";-)", "8-)" /*:)*/, ":-D", ";-)", - ":-X", ":-D", ":'(", "8-)", ":-(", + ":D", ">:o", ">:O", ":-[", "=-O", "=-o", ":P", ":p", + "O:-)", "o:-)", ":)", ":-)", ":-)", + "8-)", ":-$", ":-$", + ":-/", ";-)", ";)", "8-)" /*:)*/, ":-D", ";-)", ";-)", + ":-X", ":-D", ":-d", ":'(", "8-)", ":-(", ":(", "8-)", ":-X", ":-)", ":-!", ":-*", - ":-)", NULL}; /**