Beispiel #1
0
static void
_title_bar_resize(void)
{
    int cols = getmaxx(stdscr);

    wresize(win, 1, cols);
    wbkgd(win, COLOUR_TITLE_TEXT);

    _title_bar_draw();
}
Beispiel #2
0
void
title_bar_switch(void)
{
    if (typing_elapsed) {
        g_timer_destroy(typing_elapsed);
        typing_elapsed = NULL;
        typing = FALSE;
    }

    _title_bar_draw();
}
Beispiel #3
0
void
title_bar_console(void)
{
    werase(win);
    if (typing_elapsed) {
        g_timer_destroy(typing_elapsed);
    }
    typing_elapsed = NULL;
    typing = FALSE;

    _title_bar_draw();
}
Beispiel #4
0
static void
_title_bar_console(void)
{
    werase(win);
    current_recipient = NULL;
    typing = FALSE;
    typing_elapsed = NULL;

    free(current_title);
    current_title = strdup(CONSOLE_TITLE);

    _title_bar_draw();
}
Beispiel #5
0
void
title_bar_resize(void)
{
    int cols = getmaxx(stdscr);

    werase(win);

    int row = screen_titlebar_row();
    mvwin(win, row, 0);

    wresize(win, 1, cols);
    wbkgd(win, theme_attrs(THEME_TITLE_TEXT));

    _title_bar_draw();
}
Beispiel #6
0
static void
_title_bar_set_typing(gboolean is_typing)
{
    if (is_typing) {
        if (typing_elapsed != NULL) {
            g_timer_start(typing_elapsed);
        } else {
            typing_elapsed = g_timer_new();
        }
    }

    typing = is_typing;


    _title_bar_draw();
}
Beispiel #7
0
static void
_title_bar_set_recipient(const char * const recipient)
{
    if (typing_elapsed != NULL) {
        g_timer_destroy(typing_elapsed);
        typing_elapsed = NULL;
        typing = FALSE;
    }

    free(current_recipient);
    current_recipient = strdup(recipient);

    free(current_title);
    current_title = strdup(recipient);

    _title_bar_draw();
}
Beispiel #8
0
void
title_bar_update_virtual(void)
{
    ProfWin *window = wins_get_current();
    if (window->type != WIN_CONSOLE) {
        if (typing_elapsed) {
            gdouble seconds = g_timer_elapsed(typing_elapsed, NULL);

            if (seconds >= 10) {
                typing = FALSE;

                g_timer_destroy(typing_elapsed);
                typing_elapsed = NULL;
            }
        }
    }
    _title_bar_draw();
}
Beispiel #9
0
static void
_title_bar_refresh(void)
{
    if (current_recipient != NULL) {

        if (typing_elapsed != NULL) {
            gdouble seconds = g_timer_elapsed(typing_elapsed, NULL);

            if (seconds >= 10) {
                typing = FALSE;

                g_timer_destroy(typing_elapsed);
                typing_elapsed = NULL;

                _title_bar_draw();
            }
        }
    }
}
Beispiel #10
0
void
title_bar_update_virtual(void)
{
    if (current_recipient != NULL) {

        if (typing_elapsed != NULL) {
            gdouble seconds = g_timer_elapsed(typing_elapsed, NULL);

            if (seconds >= 10) {
                typing = FALSE;

                g_timer_destroy(typing_elapsed);
                typing_elapsed = NULL;

                _title_bar_draw();
            }
        }
    }
}
Beispiel #11
0
static void
_title_bar_set_presence(contact_presence_t presence)
{
    current_presence = presence;
    _title_bar_draw();
}
Beispiel #12
0
void
title_bar_set_tls(gboolean secured)
{
    tls_secured = secured;
    _title_bar_draw();
}
Beispiel #13
0
void
title_bar_set_connected(gboolean connected)
{
    is_connected = connected;
    _title_bar_draw();
}