From 9a75587d3421156e3d190558bd68e98ca92186c8 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Sun, 15 Feb 2015 13:45:38 +0100 Subject: [PATCH] bring --split option back to life --- src/bin/main.c | 13 ++++++------- src/bin/win.c | 12 ++++++------ src/bin/win.h | 2 ++ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/bin/main.c b/src/bin/main.c index fbfc855d..49bde510 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -875,28 +875,28 @@ remote: evas_object_show(win); if (startup_split) { - /* TODO: bring it back to life */ -#if 0 unsigned int i = 0; void *pch = NULL; Term *next = term; - for (i=0; iwn->win, next->term, pch); + main_split_v(win_evas_object_get(term_win_get(next)), + main_term_evas_object_get(next), pch); cmds_list = eina_list_remove(cmds_list, pch); } else if (startup_split[i] == 'h') { pch = eina_list_nth(cmds_list, 1); - main_split_h(next->wn->win, next->term, pch); + main_split_h(win_evas_object_get(term_win_get(next)), + main_term_evas_object_get(next), pch); cmds_list = eina_list_remove(cmds_list, pch); } else if (startup_split[i] == '-') - next = _term_next_get(next); + next = term_next_get(next); else { ERR(_("invalid argument found for option -S/--split. See --help.")); @@ -904,7 +904,6 @@ remote: } } if (cmds_list) eina_list_free(cmds_list); -#endif } if (pos_set) { diff --git a/src/bin/win.c b/src/bin/win.c index 0a18597b..6de4db8c 100644 --- a/src/bin/win.c +++ b/src/bin/win.c @@ -1247,8 +1247,8 @@ _split_flatten(Split *sp) return flat; } -static Term * -_term_next_get(Term *termin) +Term * +term_next_get(Term *termin) { Split *sp; Eina_List *flat, *l; @@ -1278,8 +1278,8 @@ _term_next_get(Term *termin) return sp->term; } -static Term * -_term_prev_get(Term *termin) +Term * +term_prev_get(Term *termin) { Split *sp; Eina_List *flat, *l; @@ -1448,7 +1448,7 @@ term_prev(Term *term) Term *term2 = NULL; Config *config = termio_config_get(term->term); - if (term->focused) term2 = _term_prev_get(term); + if (term->focused) term2 = term_prev_get(term); if ((term2 != NULL) && (term2 != term)) { Split *sp, *sp0; @@ -1476,7 +1476,7 @@ term_next(Term *term) Term *term2 = NULL; Config *config = termio_config_get(term->term); - if (term->focused) term2 = _term_next_get(term); + if (term->focused) term2 = term_next_get(term); if ((term2 != NULL) && (term2 != term)) { Split *sp, *sp0; diff --git a/src/bin/win.h b/src/bin/win.h index a25c739d..fc2b0b18 100644 --- a/src/bin/win.h +++ b/src/bin/win.h @@ -40,6 +40,8 @@ void win_term_swallow(Win *wn, Term *term); void win_add_split(Win *wn, Term *term); void win_sizing_handle(Win *wn); +Term *term_next_get(Term *term); +Term *term_prev_get(Term *term); void term_next(Term *term); void term_prev(Term *term); Win * term_win_get(Term *term);