# HG changeset patch # User Yoshiki Yazawa # Date 1217011583 -32400 # Node ID ae09f0d93b17a988e376465704430d241a1e3c40 # Parent fbe526b2088596e05fd7e2bb652e4adb2e6f2490 fixed a bug that get_status_with_api() will never be called if pidgin-twitter started with api_based_post disabled. it must be submitted to main loop regardless of configuration. diff -r fbe526b20885 -r ae09f0d93b17 pidgin-twitter.c --- a/pidgin-twitter.c Sat Jul 26 01:18:24 2008 +0900 +++ b/pidgin-twitter.c Sat Jul 26 03:46:23 2008 +0900 @@ -513,9 +513,9 @@ twitter_debug("called\n"); - PurpleConversation *conv = (PurpleConversation *)data; - if(!conv) - return FALSE; /* cease fetch */ + /* if disabled, just return */ + if(!purple_prefs_get_bool(OPT_API_BASE_POST)) + return TRUE; const char *screen_name = purple_prefs_get_string(OPT_SCREEN_NAME_TWITTER); @@ -1420,13 +1420,11 @@ /* only attach to twitter conversation window */ switch(service) { case twitter_service: - if(purple_prefs_get_bool(OPT_API_BASE_POST)) { - get_status_with_api((gpointer)conv); - source.id = g_timeout_add_seconds( - purple_prefs_get_int(OPT_API_BASE_GET_INTERVAL), - get_status_with_api, (gpointer)conv); - source.conv = conv; - } + get_status_with_api((gpointer)conv); + source.id = g_timeout_add_seconds( + purple_prefs_get_int(OPT_API_BASE_GET_INTERVAL), + get_status_with_api, (gpointer)conv); + source.conv = conv; attach_to_conv(conv, NULL); break; case wassr_service: @@ -2314,6 +2312,7 @@ gpointer data) { signed_on_cb(NULL); + get_status_with_api((gpointer)(source.conv)); } @@ -2647,7 +2646,6 @@ purple_prefs_get_bool(OPT_API_BASE_POST)); g_signal_connect(e, "toggled", G_CALLBACK(bool_toggled_cb), &e); - purple_prefs_connect_callback(plugin, OPT_API_BASE_POST, /* xxx divide? */ api_base_post_cb, NULL);