# HG changeset patch # User Eric Warmenhoven # Date 1002333359 0 # Node ID 932adc1ac9edbf17640f6a1a8d1d6d01c2b80052 # Parent 5cbe86a444d9d3a7342a04287b19d8a56cc6b689 [gaim-migrate @ 2452] you can detach and/or quit. how fun. committer: Tailor Script diff -r 5cbe86a444d9 -r 932adc1ac9ed src/core.c --- 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: