summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-02-15 13:45:38 +0100
committerBoris Faure <billiob@gmail.com>2015-02-15 13:45:38 +0100
commit9a75587d3421156e3d190558bd68e98ca92186c8 (patch)
treeb09bdf1e98c62bf10682c74b7213ce9a7e91cc40 /src
parenta31d982338b5c6749c9ba45b14d1b93c88261ab9 (diff)
bring --split option back to life
Diffstat (limited to 'src')
-rw-r--r--src/bin/main.c13
-rw-r--r--src/bin/win.c12
-rw-r--r--src/bin/win.h2
3 files changed, 14 insertions, 13 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index fbfc855..49bde51 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -875,28 +875,28 @@ remote:
875 evas_object_show(win); 875 evas_object_show(win);
876 if (startup_split) 876 if (startup_split)
877 { 877 {
878 /* TODO: bring it back to life */
879#if 0
880 unsigned int i = 0; 878 unsigned int i = 0;
881 void *pch = NULL; 879 void *pch = NULL;
882 Term *next = term; 880 Term *next = term;
883 881
884 for (i=0; i<strlen(startup_split); i++) 882 for (i = 0; i < strlen(startup_split); i++)
885 { 883 {
886 if (startup_split[i] == 'v') 884 if (startup_split[i] == 'v')
887 { 885 {
888 pch = eina_list_nth(cmds_list, 1); 886 pch = eina_list_nth(cmds_list, 1);
889 main_split_v(next->wn->win, next->term, pch); 887 main_split_v(win_evas_object_get(term_win_get(next)),
888 main_term_evas_object_get(next), pch);
890 cmds_list = eina_list_remove(cmds_list, pch); 889 cmds_list = eina_list_remove(cmds_list, pch);
891 } 890 }
892 else if (startup_split[i] == 'h') 891 else if (startup_split[i] == 'h')
893 { 892 {
894 pch = eina_list_nth(cmds_list, 1); 893 pch = eina_list_nth(cmds_list, 1);
895 main_split_h(next->wn->win, next->term, pch); 894 main_split_h(win_evas_object_get(term_win_get(next)),
895 main_term_evas_object_get(next), pch);
896 cmds_list = eina_list_remove(cmds_list, pch); 896 cmds_list = eina_list_remove(cmds_list, pch);
897 } 897 }
898 else if (startup_split[i] == '-') 898 else if (startup_split[i] == '-')
899 next = _term_next_get(next); 899 next = term_next_get(next);
900 else 900 else
901 { 901 {
902 ERR(_("invalid argument found for option -S/--split. See --help.")); 902 ERR(_("invalid argument found for option -S/--split. See --help."));
@@ -904,7 +904,6 @@ remote:
904 } 904 }
905 } 905 }
906 if (cmds_list) eina_list_free(cmds_list); 906 if (cmds_list) eina_list_free(cmds_list);
907#endif
908 } 907 }
909 if (pos_set) 908 if (pos_set)
910 { 909 {
diff --git a/src/bin/win.c b/src/bin/win.c
index 0a18597..6de4db8 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -1247,8 +1247,8 @@ _split_flatten(Split *sp)
1247 return flat; 1247 return flat;
1248} 1248}
1249 1249
1250static Term * 1250Term *
1251_term_next_get(Term *termin) 1251term_next_get(Term *termin)
1252{ 1252{
1253 Split *sp; 1253 Split *sp;
1254 Eina_List *flat, *l; 1254 Eina_List *flat, *l;
@@ -1278,8 +1278,8 @@ _term_next_get(Term *termin)
1278 return sp->term; 1278 return sp->term;
1279} 1279}
1280 1280
1281static Term * 1281Term *
1282_term_prev_get(Term *termin) 1282term_prev_get(Term *termin)
1283{ 1283{
1284 Split *sp; 1284 Split *sp;
1285 Eina_List *flat, *l; 1285 Eina_List *flat, *l;
@@ -1448,7 +1448,7 @@ term_prev(Term *term)
1448 Term *term2 = NULL; 1448 Term *term2 = NULL;
1449 Config *config = termio_config_get(term->term); 1449 Config *config = termio_config_get(term->term);
1450 1450
1451 if (term->focused) term2 = _term_prev_get(term); 1451 if (term->focused) term2 = term_prev_get(term);
1452 if ((term2 != NULL) && (term2 != term)) 1452 if ((term2 != NULL) && (term2 != term))
1453 { 1453 {
1454 Split *sp, *sp0; 1454 Split *sp, *sp0;
@@ -1476,7 +1476,7 @@ term_next(Term *term)
1476 Term *term2 = NULL; 1476 Term *term2 = NULL;
1477 Config *config = termio_config_get(term->term); 1477 Config *config = termio_config_get(term->term);
1478 1478
1479 if (term->focused) term2 = _term_next_get(term); 1479 if (term->focused) term2 = term_next_get(term);
1480 if ((term2 != NULL) && (term2 != term)) 1480 if ((term2 != NULL) && (term2 != term))
1481 { 1481 {
1482 Split *sp, *sp0; 1482 Split *sp, *sp0;
diff --git a/src/bin/win.h b/src/bin/win.h
index a25c739..fc2b0b1 100644
--- a/src/bin/win.h
+++ b/src/bin/win.h
@@ -40,6 +40,8 @@ void win_term_swallow(Win *wn, Term *term);
40void win_add_split(Win *wn, Term *term); 40void win_add_split(Win *wn, Term *term);
41void win_sizing_handle(Win *wn); 41void win_sizing_handle(Win *wn);
42 42
43Term *term_next_get(Term *term);
44Term *term_prev_get(Term *term);
43void term_next(Term *term); 45void term_next(Term *term);
44void term_prev(Term *term); 46void term_prev(Term *term);
45Win * term_win_get(Term *term); 47Win * term_win_get(Term *term);