Mercurial > pidgin.yaz
changeset 2439:932adc1ac9ed
[gaim-migrate @ 2452]
you can detach and/or quit. how fun.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 06 Oct 2001 01:55:59 +0000 |
parents | 5cbe86a444d9 |
children | 8306c042bac7 |
files | src/core.c |
diffstat | 1 files changed, 36 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core.c Sat Oct 06 00:10:29 2001 +0000 +++ b/src/core.c Sat Oct 06 01:55:59 2001 +0000 @@ -67,6 +67,33 @@ } } +static void meta_handler(struct UI *ui, guchar subtype, guchar *data) +{ + switch (subtype) { + case CUI_META_LIST: + break; + case CUI_META_QUIT: + while (uis) { + ui = uis->data; + uis = g_slist_remove(uis, ui); + g_io_channel_close(ui->channel); + g_source_remove(ui->inpa); + g_free(ui); + } + do_quit(); + break; + case CUI_META_DETACH: + uis = g_slist_remove(uis, ui); + g_io_channel_close(ui->channel); + g_source_remove(ui->inpa); + g_free(ui); + break; + default: + debug_printf("unhandled meta subtype %d\n", subtype); + break; + } +} + static gint gaim_recv(GIOChannel *source, void *buf, gint len) { gint total = 0; @@ -132,27 +159,27 @@ } switch (type) { + case CUI_TYPE_META: + meta_handler(ui, subtype, in); + break; /* - case CUI_TYPE_META: - meta_handler(ui, in); - break; case CUI_TYPE_PLUGIN: - plugin_handler(ui, in); + plugin_handler(ui, subtype, in); break; case CUI_TYPE_USER: - user_handler(ui, in); + user_handler(ui, subtype, in); break; case CUI_TYPE_CONN: - conn_handler(ui, in); + conn_handler(ui, subtype, in); break; case CUI_TYPE_BUDDY: - buddy_handler(ui, in); + buddy_handler(ui, subtype, in); break; case CUI_TYPE_MESSAGE: - message_handler(ui, in); + message_handler(ui, subtype, in); break; case CUI_TYPE_CHAT: - chat_handler(ui, in); + chat_handler(ui, subtype, in); break; */ default: