diff pidgin-twitter.c @ 124:ec861f8a2268

- added new pref value for API based fetch interval. - some hard-coded constant have been replaced with macros. - removed unnecessary code.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 18 Jul 2008 20:03:59 +0900
parents 76012df4e194
children f0305c387d32
line wrap: on
line diff
--- a/pidgin-twitter.c	Fri Jul 18 19:17:30 2008 +0900
+++ b/pidgin-twitter.c	Fri Jul 18 20:03:59 2008 +0900
@@ -1173,13 +1173,6 @@
         /* only attach to twitter conversation window */
         switch(service) {
         case twitter_service:
-#if 0
-            /* api based retrieve */ //xxx should configurable
-            if(purple_prefs_get_bool(OPT_API_BASE_POST)) {
-                get_status_with_api((gpointer)conv);
-                g_timeout_add_seconds(60, get_status_with_api, (gpointer)conv);
-            }
-#endif
             attach_to_conv(conv, NULL);
             break;
         case wassr_service:
@@ -1356,12 +1349,12 @@
     switch(service) {
     case twitter_service:
         /* api based retrieve */ //xxx should configurable
-#if 1
         if(purple_prefs_get_bool(OPT_API_BASE_POST)) {
             get_status_with_api((gpointer)conv);
-            g_timeout_add_seconds(60, get_status_with_api, (gpointer)conv);
+            g_timeout_add_seconds(
+                purple_prefs_get_int(OPT_API_BASE_GET_INTERVAL),
+                get_status_with_api, (gpointer)conv);
         }
-#endif
         attach_to_conv(conv, NULL);
         break;
     case wassr_service:
@@ -2578,9 +2571,10 @@
     purple_prefs_add_string(OPT_SCREEN_NAME_TWITTER, EMPTY);
     purple_prefs_add_string(OPT_PASSWORD_TWITTER, EMPTY);
 
-    purple_prefs_add_int(OPT_ICON_SIZE, 48);
+    purple_prefs_add_int(OPT_ICON_SIZE, DEFAULT_ICON_SIZE);
     purple_prefs_add_string(OPT_SCREEN_NAME_WASSR, EMPTY);
     purple_prefs_add_string(OPT_SCREEN_NAME_IDENTICA, EMPTY);
+    purple_prefs_add_int(OPT_API_BASE_GET_INTERVAL, TWITTER_DEFAULT_INTERVAL);
 
 }