aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/win.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-10-10 19:39:16 +0200
committerBoris Faure <billiob@gmail.com>2015-11-07 15:59:55 +0100
commit88c4ce46b04459a0fb849b8123fc844010d5aad5 (patch)
treee42400373a1d2b0ee4fca3dd96fca03e1c94c636 /src/bin/win.c
parentTheme smyck: Fix blue and white. (diff)
downloadterminology-88c4ce46b04459a0fb849b8123fc844010d5aad5.tar.gz
add (ugly) cross to close tabs
Diffstat (limited to 'src/bin/win.c')
-rw-r--r--src/bin/win.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index 2642961..6bae019 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -1649,6 +1649,17 @@ _cb_tab_activate(void *data, Evas_Object *obj EINA_UNUSED,
}
static void
+_cb_tab_close(void *data, Evas_Object *obj EINA_UNUSED,
+ const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
+{
+ Term *term = data;
+ Win *wn = term->wn;
+ Evas_Object *win = win_evas_object_get(wn);
+
+ main_close(win, term->termio);
+}
+
+static void
_tabbar_fill(Tabs *tabs)
{
Eina_List *l;
@@ -1718,6 +1729,8 @@ _tabbar_fill(Tabs *tabs)
evas_object_show(o);
edje_object_signal_callback_add(o, "tab,activate", "terminology",
_cb_tab_activate, tab_item);
+ edje_object_signal_callback_add(o, "tab,close", "terminology",
+ _cb_tab_close, term);
}
j++;
}
@@ -3776,6 +3789,8 @@ _term_bg_config(Term *term)
_cb_tabcount_prev, term);
edje_object_signal_callback_add(term->bg, "tabcount,next", "terminology",
_cb_tabcount_next, term);
+ edje_object_signal_callback_add(term->bg, "tab,close", "terminology",
+ _cb_tab_close, term);
edje_object_part_swallow(term->base, "terminology.content", term->termio);
edje_object_part_swallow(term->bg, "terminology.content", term->base);
edje_object_part_swallow(term->bg, "terminology.miniview", term->miniview);