# HG changeset patch # User Yoshiki Yazawa # Date 1218529600 -32400 # Node ID 67d8eaba446d8d64ff0fc9d3a14309204283dff2 # Parent 0aeeafe37ef776794b00469976789dce6656178d preliminary identi.ca tag support. diff -r 0aeeafe37ef7 -r 67d8eaba446d pidgin-twitter.c --- a/pidgin-twitter.c Tue Aug 12 15:20:58 2008 +0900 +++ b/pidgin-twitter.c Tue Aug 12 17:26:40 2008 +0900 @@ -881,7 +881,7 @@ g_free(match1); g_free(match2); } - else if(service == wassr_service && which == CHANNEL) { + else if(which == CHANNEL && service == wassr_service) { gchar *match1 = g_match_info_fetch(match_info, 1); /*before channel*/ gchar *match2 = g_match_info_fetch(match_info, 2); /* channel */ const gchar *format = CHANNEL_FORMAT_WASSR; @@ -891,6 +891,16 @@ g_free(match1); g_free(match2); } + else if(which == CHANNEL && service == identica_service) { + gchar *match1 = g_match_info_fetch(match_info, 1); /*before channel*/ + gchar *match2 = g_match_info_fetch(match_info, 2); /* channel */ + const gchar *format = CHANNEL_FORMAT_IDENTICA; + + g_snprintf(sub, 128, format, match1 ? match1: "", match2, match2); + + g_free(match1); + g_free(match2); + } g_string_append(result, sub); twitter_debug("sub = %s\n", sub); @@ -1021,12 +1031,16 @@ if(purple_prefs_get_bool(OPT_TRANSLATE_SENDER)) { translate(buffer, SENDER, service); } + if(purple_prefs_get_bool(OPT_TRANSLATE_RECIPIENT)) { + translate(buffer, RECIPIENT, service); + } if(service == wassr_service && purple_prefs_get_bool(OPT_TRANSLATE_CHANNEL)) { translate(buffer, CHANNEL, service); } - if(purple_prefs_get_bool(OPT_TRANSLATE_RECIPIENT)) { - translate(buffer, RECIPIENT, service); + if(service == identica_service && + purple_prefs_get_bool(OPT_TRANSLATE_CHANNEL)) { + translate(buffer, CHANNEL, service); } /* escape pseudo command (to show same result to sending message) */ diff -r 0aeeafe37ef7 -r 67d8eaba446d pidgin-twitter.h --- a/pidgin-twitter.h Tue Aug 12 15:20:58 2008 +0900 +++ b/pidgin-twitter.h Tue Aug 12 17:26:40 2008 +0900 @@ -128,6 +128,7 @@ #define RECIPIENT_FORMAT_IDENTICA "@%s" #define SENDER_FORMAT_IDENTICA "%s%s: " #define CHANNEL_FORMAT_WASSR "%s%s " +#define CHANNEL_FORMAT_IDENTICA "%s%s " #define DEFAULT_LIST "(list of users: separated with ' ,:;')" #define OOPS_MESSAGE "Oops! Your update was over 140 characters. We sent the short version to your friends (they can view the entire update on the web).
" #define EMPTY ""