Mercurial > pidgin
comparison src/protocols/oscar/oscar.c @ 8273:f24172f53650
[gaim-migrate @ 8997]
This is Scott Lamb's eventloop abstraction patch. If it breaks things,
Scott Lamb will be glad to take the punishment. If it doesn't, it should
make integration into other event loops easier. Well, no, not easier,
harder actually, but it'll be done more appropriately and less hackily..
er, hacky. Is hackily a word?
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 17 Feb 2004 02:17:48 +0000 |
parents | b37211166855 |
children | ef881489396e |
comparison
equal
deleted
inserted
replaced
8272:9af78e73f0b2 | 8273:f24172f53650 |
---|---|
1462 | 1462 |
1463 od->iconconnecting = FALSE; | 1463 od->iconconnecting = FALSE; |
1464 | 1464 |
1465 if (od->icontimer) | 1465 if (od->icontimer) |
1466 g_source_remove(od->icontimer); | 1466 g_source_remove(od->icontimer); |
1467 od->icontimer = g_timeout_add(100, gaim_icon_timerfunc, gc); | 1467 od->icontimer = gaim_timeout_add(100, gaim_icon_timerfunc, gc); |
1468 | 1468 |
1469 return 1; | 1469 return 1; |
1470 } | 1470 } |
1471 | 1471 |
1472 static void oscar_chatnav_connect(gpointer data, gint source, GaimInputCondition cond) { | 1472 static void oscar_chatnav_connect(gpointer data, gint source, GaimInputCondition cond) { |
1881 cur = cur->next; | 1881 cur = cur->next; |
1882 if (!cur) { | 1882 if (!cur) { |
1883 od->requesticon = g_slist_append(od->requesticon, g_strdup(gaim_normalize(gc->account, info->sn))); | 1883 od->requesticon = g_slist_append(od->requesticon, g_strdup(gaim_normalize(gc->account, info->sn))); |
1884 if (od->icontimer) | 1884 if (od->icontimer) |
1885 g_source_remove(od->icontimer); | 1885 g_source_remove(od->icontimer); |
1886 od->icontimer = g_timeout_add(500, gaim_icon_timerfunc, gc); | 1886 od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); |
1887 } | 1887 } |
1888 } | 1888 } |
1889 g_free(b16); | 1889 g_free(b16); |
1890 } | 1890 } |
1891 | 1891 |
3495 od->requesticon = g_slist_remove(od->requesticon, sn); | 3495 od->requesticon = g_slist_remove(od->requesticon, sn); |
3496 free(sn); | 3496 free(sn); |
3497 | 3497 |
3498 if (od->icontimer) | 3498 if (od->icontimer) |
3499 g_source_remove(od->icontimer); | 3499 g_source_remove(od->icontimer); |
3500 od->icontimer = g_timeout_add(500, gaim_icon_timerfunc, gc); | 3500 od->icontimer = gaim_timeout_add(500, gaim_icon_timerfunc, gc); |
3501 | 3501 |
3502 return 1; | 3502 return 1; |
3503 } | 3503 } |
3504 | 3504 |
3505 static int gaim_icon_parseicon(aim_session_t *sess, aim_frame_t *fr, ...) { | 3505 static int gaim_icon_parseicon(aim_session_t *sess, aim_frame_t *fr, ...) { |
3543 cur = cur->next; | 3543 cur = cur->next; |
3544 } | 3544 } |
3545 | 3545 |
3546 if (od->icontimer) | 3546 if (od->icontimer) |
3547 g_source_remove(od->icontimer); | 3547 g_source_remove(od->icontimer); |
3548 od->icontimer = g_timeout_add(250, gaim_icon_timerfunc, gc); | 3548 od->icontimer = gaim_timeout_add(250, gaim_icon_timerfunc, gc); |
3549 | 3549 |
3550 return 1; | 3550 return 1; |
3551 } | 3551 } |
3552 | 3552 |
3553 static gboolean gaim_icon_timerfunc(gpointer data) { | 3553 static gboolean gaim_icon_timerfunc(gpointer data) { |
4860 gaim_debug(GAIM_DEBUG_ERROR, "oscar", "ssi: SNAC error %hu\n", reason); | 4860 gaim_debug(GAIM_DEBUG_ERROR, "oscar", "ssi: SNAC error %hu\n", reason); |
4861 | 4861 |
4862 if (reason == 0x0005) { | 4862 if (reason == 0x0005) { |
4863 gaim_notify_error(gc, NULL, _("Unable To Retrieve Buddy List"), | 4863 gaim_notify_error(gc, NULL, _("Unable To Retrieve Buddy List"), |
4864 _("Gaim was temporarily unable to retrieve your buddy list from the AIM servers. Your buddy list is not lost, and will probably become available in a few hours.")); | 4864 _("Gaim was temporarily unable to retrieve your buddy list from the AIM servers. Your buddy list is not lost, and will probably become available in a few hours.")); |
4865 od->getblisttimer = g_timeout_add(300000, gaim_ssi_rerequestdata, od->sess); | 4865 od->getblisttimer = gaim_timeout_add(300000, gaim_ssi_rerequestdata, od->sess); |
4866 } | 4866 } |
4867 | 4867 |
4868 /* Activate SSI */ | 4868 /* Activate SSI */ |
4869 /* Sending the enable causes other people to be able to see you, and you to see them */ | 4869 /* Sending the enable causes other people to be able to see you, and you to see them */ |
4870 /* Make sure your privacy setting/invisibility is set how you want it before this! */ | 4870 /* Make sure your privacy setting/invisibility is set how you want it before this! */ |
5842 return 1; | 5842 return 1; |
5843 if (dim->watcher) { | 5843 if (dim->watcher) { |
5844 gaim_input_remove(dim->watcher); /* Otherwise, the callback will callback */ | 5844 gaim_input_remove(dim->watcher); /* Otherwise, the callback will callback */ |
5845 dim->watcher = 0; | 5845 dim->watcher = 0; |
5846 } | 5846 } |
5847 /* XXX is this really necessary? */ | |
5848 gaim_core_mainloop_finish_events(); | |
5849 | 5847 |
5850 c = gaim_find_conversation_with_account(sn, gaim_connection_get_account(gc)); | 5848 c = gaim_find_conversation_with_account(sn, gaim_connection_get_account(gc)); |
5851 if (c != NULL) | 5849 if (c != NULL) |
5852 gaim_conversation_update_progress(c, percent); | 5850 gaim_conversation_update_progress(c, percent); |
5853 dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ, | 5851 dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ, |