Esempio n. 1
0
void kill_chat_window(ToxWindow *self)
{
    ChatContext *ctx = self->chatwin;
    StatusBar *statusbar = self->stb;

    log_disable(ctx->log);
    line_info_cleanup(ctx->hst);

#ifdef _AUDIO
    stop_current_call(self);
#endif

    delwin(ctx->linewin);
    delwin(ctx->history);
    delwin(statusbar->topline);

    free(ctx->log);
    free(ctx->hst);
    free(ctx);
    free(self->help);
    free(statusbar);

    disable_chatwin(self->num);
    del_window(self);
}
Esempio n. 2
0
static void kill_groupchat_window(ToxWindow *self)
{
    ChatContext *ctx = self->chatwin;

    log_disable(ctx->log);
    line_info_cleanup(ctx->hst);
    delwin(ctx->linewin);
    delwin(ctx->history);
    delwin(ctx->sidebar);
    free(ctx->log);
    free(ctx);
    free(self->help);
    del_window(self);
}
Esempio n. 3
0
File: main.c Progetto: stqism/toxic
void exit_toxic(Tox *m)
{
    store_data(m, DATA_FILE);
    close_all_file_senders();
    kill_all_windows();
    log_disable(prompt->chatwin->log);
    line_info_cleanup(prompt->chatwin->hst);
    free(DATA_FILE);
    free(prompt->stb);
    free(prompt->chatwin->log);
    free(prompt->chatwin->hst);
    free(prompt->chatwin);
    tox_kill(m);
    #ifdef _SUPPORT_AUDIO
    terminate_audio();
    #endif /* _SUPPORT_AUDIO */
    endwin();
    exit(EXIT_SUCCESS);
}
Esempio n. 4
0
void kill_prompt_window(ToxWindow *self)
{
    ChatContext *ctx = self->chatwin;
    StatusBar *statusbar = self->stb;

    log_disable(ctx->log);
    line_info_cleanup(ctx->hst);

    delwin(ctx->linewin);
    delwin(ctx->history);
    delwin(statusbar->topline);

    free(ctx->log);
    free(ctx);
    free(self->help);
    free(statusbar);

    del_window(self);
}