Ejemplo n.º 1
0
char*
mucconfwin_get_string(ProfMucConfWin *confwin)
{
    assert(confwin != NULL);

    GString *res = g_string_new("");

    char *title = win_get_title((ProfWin*)confwin);
    g_string_append(res, title);
    free(title);

    char *resstr = res->str;
    g_string_free(res, FALSE);

    return resstr;
}
Ejemplo n.º 2
0
static void
_title_bar_draw(void)
{
    ProfWin *current = wins_get_current();

    werase(win);
    wmove(win, 0, 0);
    int i;
    for (i = 0; i < 45; i++) {
        waddch(win, ' ');
    }

    char *title = win_get_title(current);
    mvwprintw(win, 0, 0, " %s", title);
    free(title);

    if (current && current->type == WIN_CHAT) {
        ProfChatWin *chatwin = (ProfChatWin*) current;
        assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
        _show_contact_presence(chatwin);
        _show_privacy(chatwin);

        if (typing) {
            wprintw(win, " (typing...)");
        }
    } else if (current && current->type == WIN_MUC) {
        ProfMucWin *mucwin = (ProfMucWin*) current;
        assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
        _show_muc_privacy(mucwin);
    }

    _show_self_presence();

    wnoutrefresh(win);
    inp_put_back();
}