示例#1
0
void
status_bar_active(const int win)
{
    int true_win = win;
    if (true_win == 0) {
        true_win = 10;
    }

    // extra windows
    if (true_win > 10) {
        g_hash_table_add(remaining_active, GINT_TO_POINTER(true_win));
        g_hash_table_remove(remaining_new, GINT_TO_POINTER(true_win));

        // still have new windows
        if (g_hash_table_size(remaining_new) != 0) {
            is_active[11] = TRUE;
            is_new[11] = TRUE;
            _mark_new(11);

        // only active windows
        } else {
            is_active[11] = TRUE;
            is_new[11] = FALSE;
            _mark_active(11);
        }

    // visible window indicators
    } else {
        is_active[true_win] = TRUE;
        is_new[true_win] = FALSE;
        _mark_active(true_win);
    }

    _status_bar_draw();
}
示例#2
0
static void
_status_bar_new(const int win)
{
    int true_win = win;
    if (true_win == 0) {
        true_win = 10;
    }

    if (true_win > 10) {
        g_hash_table_add(remaining_active, GINT_TO_POINTER(true_win));
        g_hash_table_add(remaining_new, GINT_TO_POINTER(true_win));

        is_active[11] = TRUE;
        is_new[11] = TRUE;
        _mark_new(11);

    } else {
        is_active[true_win] = TRUE;
        is_new[true_win] = TRUE;
        _mark_new(true_win);
    }
}
示例#3
0
static void
_update_win_statuses(void)
{
    int i;
    for(i = 1; i < 12; i++) {
        if (is_new[i]) {
            _mark_new(i);
        }
        else if (is_active[i]) {
            _mark_active(i);
        }
        else {
            _mark_inactive(i);
        }
    }
}