Added missing files, refactored ui_switch_win to check win exists

This commit is contained in:
James Booth
2014-04-01 23:54:26 +01:00
parent 7113b97952
commit b19b881b97
7 changed files with 56 additions and 35 deletions

View File

@@ -530,12 +530,10 @@ gboolean
cmd_win(gchar **args, struct cmd_help_t help)
{
int num = atoi(args[0]);
if (ui_win_exists(num)) {
ui_switch_win(num);
} else {
gboolean switched = ui_switch_win(num);
if (switched == FALSE) {
cons_show("Window %d does not exist.", num);
}
return TRUE;
}