Move current win check to event, removed next and prev win functions

This commit is contained in:
James Booth
2015-04-30 22:43:08 +01:00
parent d68fb25dde
commit e11e55e31a
7 changed files with 30 additions and 90 deletions

View File

@@ -53,6 +53,7 @@
#include "ui/statusbar.h"
#include "ui/window.h"
#include "ui/windows.h"
#include "event/ui_events.h"
static GHashTable *windows;
static int current;
@@ -661,7 +662,7 @@ wins_swap(int source_win, int target_win)
}
if (wins_get_current_num() == source_win) {
wins_set_current_by_num(target_win);
ui_switch_win(console);
ui_ev_focus_win(console);
}
return TRUE;
@@ -682,7 +683,7 @@ wins_swap(int source_win, int target_win)
status_bar_active(source_win);
}
if ((wins_get_current_num() == source_win) || (wins_get_current_num() == target_win)) {
ui_switch_win(console);
ui_ev_focus_win(console);
}
return TRUE;
}
@@ -742,7 +743,7 @@ wins_tidy(void)
windows = new_windows;
current = 1;
ProfWin *console = wins_get_console();
ui_switch_win(console);
ui_ev_focus_win(console);
g_list_free(keys);
return TRUE;
} else {