comparison 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
comparison
equal deleted inserted replaced
123:76012df4e194 124:ec861f8a2268
1171 pidgin_conv_window_get_active_conversation(win); 1171 pidgin_conv_window_get_active_conversation(win);
1172 gint service = get_service_type(conv); 1172 gint service = get_service_type(conv);
1173 /* only attach to twitter conversation window */ 1173 /* only attach to twitter conversation window */
1174 switch(service) { 1174 switch(service) {
1175 case twitter_service: 1175 case twitter_service:
1176 #if 0
1177 /* api based retrieve */ //xxx should configurable
1178 if(purple_prefs_get_bool(OPT_API_BASE_POST)) {
1179 get_status_with_api((gpointer)conv);
1180 g_timeout_add_seconds(60, get_status_with_api, (gpointer)conv);
1181 }
1182 #endif
1183 attach_to_conv(conv, NULL); 1176 attach_to_conv(conv, NULL);
1184 break; 1177 break;
1185 case wassr_service: 1178 case wassr_service:
1186 case identica_service: 1179 case identica_service:
1187 attach_to_conv(conv, NULL); 1180 attach_to_conv(conv, NULL);
1354 gint service = get_service_type(conv); 1347 gint service = get_service_type(conv);
1355 /* only attach to twitter conversation window */ 1348 /* only attach to twitter conversation window */
1356 switch(service) { 1349 switch(service) {
1357 case twitter_service: 1350 case twitter_service:
1358 /* api based retrieve */ //xxx should configurable 1351 /* api based retrieve */ //xxx should configurable
1359 #if 1
1360 if(purple_prefs_get_bool(OPT_API_BASE_POST)) { 1352 if(purple_prefs_get_bool(OPT_API_BASE_POST)) {
1361 get_status_with_api((gpointer)conv); 1353 get_status_with_api((gpointer)conv);
1362 g_timeout_add_seconds(60, get_status_with_api, (gpointer)conv); 1354 g_timeout_add_seconds(
1363 } 1355 purple_prefs_get_int(OPT_API_BASE_GET_INTERVAL),
1364 #endif 1356 get_status_with_api, (gpointer)conv);
1357 }
1365 attach_to_conv(conv, NULL); 1358 attach_to_conv(conv, NULL);
1366 break; 1359 break;
1367 case wassr_service: 1360 case wassr_service:
1368 case identica_service: 1361 case identica_service:
1369 attach_to_conv(conv, NULL); 1362 attach_to_conv(conv, NULL);
2576 2569
2577 purple_prefs_add_bool(OPT_API_BASE_POST, FALSE); 2570 purple_prefs_add_bool(OPT_API_BASE_POST, FALSE);
2578 purple_prefs_add_string(OPT_SCREEN_NAME_TWITTER, EMPTY); 2571 purple_prefs_add_string(OPT_SCREEN_NAME_TWITTER, EMPTY);
2579 purple_prefs_add_string(OPT_PASSWORD_TWITTER, EMPTY); 2572 purple_prefs_add_string(OPT_PASSWORD_TWITTER, EMPTY);
2580 2573
2581 purple_prefs_add_int(OPT_ICON_SIZE, 48); 2574 purple_prefs_add_int(OPT_ICON_SIZE, DEFAULT_ICON_SIZE);
2582 purple_prefs_add_string(OPT_SCREEN_NAME_WASSR, EMPTY); 2575 purple_prefs_add_string(OPT_SCREEN_NAME_WASSR, EMPTY);
2583 purple_prefs_add_string(OPT_SCREEN_NAME_IDENTICA, EMPTY); 2576 purple_prefs_add_string(OPT_SCREEN_NAME_IDENTICA, EMPTY);
2577 purple_prefs_add_int(OPT_API_BASE_GET_INTERVAL, TWITTER_DEFAULT_INTERVAL);
2584 2578
2585 } 2579 }
2586 2580
2587 PURPLE_INIT_PLUGIN(pidgin_twitter, init_plugin, info) 2581 PURPLE_INIT_PLUGIN(pidgin_twitter, init_plugin, info)