1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Fixes to windows tidy

This commit is contained in:
James Booth 2013-08-28 23:09:54 +01:00
parent b7e7cb9c68
commit 8a35bae267
2 changed files with 3 additions and 4 deletions

View File

@ -439,7 +439,6 @@ get_next_available_win_num(GList *used)
int curr_num = GPOINTER_TO_INT(curr->data); int curr_num = GPOINTER_TO_INT(curr->data);
if (((last_num != 9) && ((last_num + 1) != curr_num)) || if (((last_num != 9) && ((last_num + 1) != curr_num)) ||
((last_num == 9) && (curr_num != 0))) { ((last_num == 9) && (curr_num != 0))) {
g_list_free(curr);
result = last_num + 1; result = last_num + 1;
if (result == 10) { if (result == 10) {
result = 0; result = 0;

View File

@ -331,16 +331,16 @@ wins_tidy(void)
int num = 1; int num = 1;
GList *curr = keys; GList *curr = keys;
while (curr != NULL) { while (curr != NULL) {
ProfWin *window = g_hash_table_lookup(windows, GINT_TO_POINTER(curr->data)); ProfWin *window = g_hash_table_lookup(windows, curr->data);
if (num == 10) { if (num == 10) {
g_hash_table_insert(windows, GINT_TO_POINTER(0), window); g_hash_table_insert(new_windows, GINT_TO_POINTER(0), window);
if (window->unread > 0) { if (window->unread > 0) {
status_bar_new(0); status_bar_new(0);
} else { } else {
status_bar_active(0); status_bar_active(0);
} }
} else { } else {
g_hash_table_insert(windows, GINT_TO_POINTER(num), window); g_hash_table_insert(new_windows, GINT_TO_POINTER(num), window);
if (window->unread > 0) { if (window->unread > 0) {
status_bar_new(num); status_bar_new(num);
} else { } else {