Mercurial > pidgin
diff plugins/ticker/ticker.c @ 8213:8d41a4250bb7
[gaim-migrate @ 8936]
fix the buddy ticker for when accounts sign off, and fix newlines in jabber profiles
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 06 Feb 2004 00:30:35 +0000 |
parents | abdc55ffadba |
children | d7b8eb1f0a18 |
line wrap: on
line diff
--- a/plugins/ticker/ticker.c Thu Feb 05 16:28:51 2004 +0000 +++ b/plugins/ticker/ticker.c Fri Feb 06 00:30:35 2004 +0000 @@ -210,36 +210,6 @@ } static void -signoff_cb(GaimConnection *gc) -{ - TickerData *td; - if (!gaim_connections_get_all()) { - while (tickerbuds) { - td = tickerbuds->data; - tickerbuds = g_list_delete_link(tickerbuds, tickerbuds); - if (td->timeout != 0) - g_source_remove(td->timeout); - g_free(td); - } - gtk_widget_destroy(tickerwindow); - tickerwindow = NULL; - ticker = NULL; - } else { - GList *t = tickerbuds; - while (t) { - td = t->data; - t = t->next; - if (td->buddy->account == gc->account) { - tickerbuds = g_list_remove(tickerbuds, td); - if (td->timeout != 0) - g_source_remove(td->timeout); - g_free(td); - } - } - } -} - -static void buddy_signon_cb(GaimBuddy *b) { if(buddy_ticker_find_buddy(b)) @@ -265,6 +235,34 @@ buddy_ticker_add_buddy(b); } +static void +signoff_cb(GaimConnection *gc) +{ + TickerData *td; + if (!gaim_connections_get_all()) { + while (tickerbuds) { + td = tickerbuds->data; + tickerbuds = g_list_delete_link(tickerbuds, tickerbuds); + if (td->timeout != 0) + g_source_remove(td->timeout); + g_free(td); + } + gtk_widget_destroy(tickerwindow); + tickerwindow = NULL; + ticker = NULL; + } else { + GList *t = tickerbuds; + while (t) { + td = t->data; + t = t->next; + if (td->buddy->account == gc->account) { + buddy_signoff_cb(td->buddy); + } + } + } +} + + /* * EXPORTED FUNCTIONS */