billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=cd0f61dd267041e2a43cad63c68feb6119049972
commit cd0f61dd267041e2a43cad63c68feb6119049972 Author: Boris Faure <[email protected]> Date: Sun May 22 20:45:13 2016 +0200 keybindings: fix binding to close focused term --- src/bin/keyin.c | 6 +++--- src/bin/win.c | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/bin/keyin.c b/src/bin/keyin.c index d08ac5b..d2b62fc 100644 --- a/src/bin/keyin.c +++ b/src/bin/keyin.c @@ -458,9 +458,9 @@ cb_tab_new(Evas_Object *termio_obj) } static Eina_Bool -cb_exited(Evas_Object *termio_obj) +cb_close(Evas_Object *termio_obj) { - evas_object_smart_callback_call(termio_obj, "exited", NULL); + evas_object_smart_callback_call(termio_obj, "close", NULL); return EINA_TRUE; } @@ -624,7 +624,7 @@ static Shortcut_Action _actions[] = {"split_h", gettext_noop("Split horizontally (new below)"), cb_split_h}, {"split_v", gettext_noop("Split vertically (new on right)"), cb_split_v}, {"tab_new", gettext_noop("Create a new \"tab\""), cb_tab_new}, - {"exited", gettext_noop("Close the focused terminal"), cb_exited}, + {"exited", gettext_noop("Close the focused terminal"), cb_close}, {"tab_select", gettext_noop("Bring up \"tab\" switcher"), cb_tab_select}, {"tab_1", gettext_noop("Switch to terminal tab 1"), cb_tab_1}, {"tab_2", gettext_noop("Switch to terminal tab 2"), cb_tab_2}, diff --git a/src/bin/win.c b/src/bin/win.c index ce22153..3f6ba9c 100644 --- a/src/bin/win.c +++ b/src/bin/win.c @@ -2405,6 +2405,15 @@ _cb_new(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) _solo_tabs_new(tc); } +static void +_cb_close(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) +{ + Term *term = data; + Term_Container *tc = term->container; + + term_close(tc->wn->win, term->termio, EINA_FALSE); +} + void main_new(Evas_Object *win EINA_UNUSED, Evas_Object *term) { @@ -4200,6 +4209,7 @@ term_new(Win *wn, Config *config, const char *cmd, evas_object_smart_callback_add(o, "prev", _cb_prev, term); evas_object_smart_callback_add(o, "next", _cb_next, term); evas_object_smart_callback_add(o, "new", _cb_new, term); + evas_object_smart_callback_add(o, "close", _cb_close, term); evas_object_smart_callback_add(o, "select", _cb_select, term); evas_object_smart_callback_add(o, "split,h", _cb_split_h, term); evas_object_smart_callback_add(o, "split,v", _cb_split_v, term); --
