From bd03bbad730a7b5f2a935dcda3f7b06184cb72d7 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 18 Oct 2014 22:43:47 +0100 Subject: [PATCH] Moved previous win function --- src/ui/core.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/ui/core.c b/src/ui/core.c index 12cc2055..899cc3fb 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -748,6 +748,28 @@ _ui_switch_win(const int i) } } +static void +_ui_previous_win(void) +{ + ProfWin *new_current = wins_get_previous(); + int i = wins_get_num(new_current); + wins_set_current_by_num(i); + + new_current->unread = 0; + + if (i == 1) { + title_bar_console(); + status_bar_current(1); + status_bar_active(1); + } else { + GString *recipient_str = _get_recipient_string(new_current); + title_bar_set_recipient(recipient_str->str); + g_string_free(recipient_str, TRUE); + status_bar_current(i); + status_bar_active(i); + } +} + static void _ui_next_win(void) { @@ -944,28 +966,6 @@ _ui_untrust(const char * const recipient) } } -static void -_ui_previous_win(void) -{ - ProfWin *new_current = wins_get_previous(); - int i = wins_get_num(new_current); - wins_set_current_by_num(i); - - new_current->unread = 0; - - if (i == 1) { - title_bar_console(); - status_bar_current(1); - status_bar_active(1); - } else { - GString *recipient_str = _get_recipient_string(new_current); - title_bar_set_recipient(recipient_str->str); - g_string_free(recipient_str, TRUE); - status_bar_current(i); - status_bar_active(i); - } -} - static void _ui_clear_current(void) {