void status_bar_inactive(const int win) { int true_win = win; if (true_win == 0) { true_win = 10; } // extra windows if (true_win > 10) { g_hash_table_remove(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); // still have active windows } else if (g_hash_table_size(remaining_active) != 0) { is_active[11] = TRUE; is_new[11] = FALSE; _mark_active(11); // no active or new windows } else { is_active[11] = FALSE; is_new[11] = FALSE; _mark_inactive(11); } // visible window indicators } else { is_active[true_win] = FALSE; is_new[true_win] = FALSE; _mark_inactive(true_win); } _status_bar_draw(); }
static void _status_bar_set_all_inactive(void) { int i = 0; for (i = 0; i < 12; i++) { is_active[i] = FALSE; is_new[i] = FALSE; _mark_inactive(i); } g_hash_table_remove_all(remaining_active); g_hash_table_remove_all(remaining_new); }
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); } } }