changeset 258:2145f975ef69

- fixed a glitch in identi.ca icon pattern - added support for identi.ca default icon - enabled api based twitter access by default - added file name field to the debug messages
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 26 Nov 2008 14:32:09 +0900
parents 954753a52ed8
children d45dd3589560
files icon.c main.c pidgin-twitter.h
diffstat 3 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/icon.c	Sun Nov 23 03:39:40 2008 +0900
+++ b/icon.c	Wed Nov 26 14:32:09 2008 +0900
@@ -210,6 +210,10 @@
             twitter_debug("fall back to twitter default icon\n");
             url = g_strdup(TWITTER_DEFAULT_ICON_URL);
         }
+        else if(service == identica_service) {
+            twitter_debug("fall back to identica default icon\n");
+            url = g_strdup(IDENTICA_DEFAULT_ICON_URL);
+        }
         else if(service == jisko_service) {
             twitter_debug("fall back to jisko default icon\n");
             url = g_strdup(JISKO_DEFAULT_ICON_URL);
--- a/main.c	Sun Nov 23 03:39:40 2008 +0900
+++ b/main.c	Wed Nov 26 14:32:09 2008 +0900
@@ -1321,7 +1321,7 @@
     purple_prefs_add_bool(OPT_SUPPRESS_OOPS, TRUE);
     purple_prefs_add_bool(OPT_PREVENT_NOTIFICATION, FALSE);
 
-    purple_prefs_add_bool(OPT_API_BASE_POST, FALSE);
+    purple_prefs_add_bool(OPT_API_BASE_POST, TRUE);
     purple_prefs_add_int(OPT_API_BASE_GET_INTERVAL, TWITTER_DEFAULT_INTERVAL);
     purple_prefs_add_string(OPT_SCREEN_NAME_TWITTER, EMPTY);
     purple_prefs_add_string(OPT_PASSWORD_TWITTER, EMPTY);
--- a/pidgin-twitter.h	Sun Nov 23 03:39:40 2008 +0900
+++ b/pidgin-twitter.h	Wed Nov 26 14:32:09 2008 +0900
@@ -173,7 +173,7 @@
 #define P_TAG_IDENTICA      "#([-A-Za-z0-9_]+)"
 #define P_IMAGE_TWITTER     "<a href=\"/account/profile_image/.+?\"><img .+? id=\"profile-image\".*src=\"(http://.+)\" .+?/>"
 #define P_IMAGE_WASSR       "<div class=\"image\"><a href=\".+\"><img src=\"(.+)\" width=\".+?\" /></a></div>"
-#define P_IMAGE_IDENTICA    "<img src=\"(http://.+.identi.ca/.+)\" class=\"avatar profile\" width=\"96\" height=\"96\" alt=\"[A-Za-z0-0_]+\"/>"
+#define P_IMAGE_IDENTICA    "<img src=\"(http://.+.identi.ca/.+)\" class=\"avatar profile\" width=\"96\" height=\"96\" alt=\"[A-Za-z0-9_]+\"/>"
 #define P_IMAGE_JISKO       "<img src=\"(http://jisko.net/users/.+/img/avatar/thumb_side\\..+)\" alt=\"Avatar\" />"
 #define P_SIZE_128_WASSR    "\\.128\\."
 #define P_EXCESS_LF         "([\\r|\\n]{2,})"
@@ -195,7 +195,10 @@
 
 /* wassr specific macros */
 #define WASSR_POST_LEN (255)
+
+/* identica specific macros */
 #define IDENTICA_POST_LEN (140)
+#define IDENTICA_DEFAULT_ICON_URL "http://theme.identi.ca/identica/default-avatar-profile.png"
 
 /* jisko specific macro */
 #define JISKO_DEFAULT_ICON_URL "http://jisko.net/static/img/avatar/default_note.png"
@@ -212,7 +215,7 @@
 #define NUM_SERVICES (4)          /* twitter, wassr, identica, jisko. */
 
 /* debug macros */
-#define twitter_debug(fmt, ...)	do { if(purple_prefs_get_bool(OPT_LOG_OUTPUT)) purple_debug(PURPLE_DEBUG_INFO, PLUGIN_NAME, "%s():%4d:  " fmt, __FUNCTION__, (int)__LINE__, ## __VA_ARGS__); } while(0);
-#define twitter_error(fmt, ...)	do { if(purple_prefs_get_bool(OPT_LOG_OUTPUT)) purple_debug(PURPLE_DEBUG_ERROR, PLUGIN_NAME, "%s():%4d:  " fmt, __FUNCTION__, (int)__LINE__, ## __VA_ARGS__); } while(0);
+#define twitter_debug(fmt, ...)	do { if(purple_prefs_get_bool(OPT_LOG_OUTPUT)) purple_debug(PURPLE_DEBUG_INFO, PLUGIN_NAME, "%s: %s():%4d:  " fmt, __FILE__, __FUNCTION__, (int)__LINE__, ## __VA_ARGS__); } while(0);
+#define twitter_error(fmt, ...)	do { if(purple_prefs_get_bool(OPT_LOG_OUTPUT)) purple_debug(PURPLE_DEBUG_ERROR, PLUGIN_NAME, "%s: %s():%4d:  " fmt, __FILE__, __FUNCTION__, (int)__LINE__, ## __VA_ARGS__); } while(0);
 
 #endif