Mercurial > pidgin
changeset 5185:dec87634bcb1
[gaim-migrate @ 5549]
fix some ticker stuff. i'm about sick of the ticker now.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 20 Apr 2003 19:37:06 +0000 |
parents | 4dbaa8772781 |
children | a107115a13ae |
files | plugins/ticker/ticker.c |
diffstat | 1 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/ticker/ticker.c Sun Apr 20 19:14:19 2003 +0000 +++ b/plugins/ticker/ticker.c Sun Apr 20 19:37:06 2003 +0000 @@ -196,9 +196,23 @@ void signoff_cb(struct gaim_connection *gc) { if (!connections) { + while(tickerbuds) { + g_free(tickerbuds->data); + tickerbuds = g_list_delete_link(tickerbuds, tickerbuds); + } gtk_widget_destroy(tickerwindow); tickerwindow = NULL; ticker = NULL; + } else { + GList *t = tickerbuds; + while(t) { + TickerData *td = t->data; + t = t->next; + if(td->buddy->account == gc->account) { + g_free(td); + tickerbuds = g_list_remove(tickerbuds, td); + } + } } } @@ -206,6 +220,8 @@ struct buddy *b = gaim_find_buddy(gc->account, who); buddy_ticker_remove_buddy(b); + if(!tickerbuds) + gtk_widget_hide(tickerwindow); } void away_cb(struct gaim_connection *gc, char *who) { @@ -243,6 +259,10 @@ } G_MODULE_EXPORT void gaim_plugin_remove() { + while(tickerbuds) { + g_free(tickerbuds->data); + g_list_delete_link(tickerbuds, tickerbuds); + } gtk_widget_destroy(tickerwindow); }