forked from enlightenment/terminology
add (ugly) cross to close tabs
This commit is contained in:
parent
414b5547f1
commit
88c4ce46b0
|
@ -0,0 +1,11 @@
|
||||||
|
=================
|
||||||
|
Terminology 0.9.1
|
||||||
|
=================
|
||||||
|
|
||||||
|
Changes since 0.9.1:
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
* In group "terminology/background", add signal "tab,close" with emitter set
|
||||||
|
to "terminology" to close the current tab
|
||||||
|
* In group "terminology/tabbar_back", add signal "tab,close" with emitter
|
||||||
|
set to "terminology" to close a tab in the background
|
|
@ -226,6 +226,7 @@ collections {
|
||||||
image: "tab_shad_r1.png" COMP;
|
image: "tab_shad_r1.png" COMP;
|
||||||
image: "media_busy_knob.png" COMP;
|
image: "media_busy_knob.png" COMP;
|
||||||
image: "media_busy_spinner.png" COMP;
|
image: "media_busy_spinner.png" COMP;
|
||||||
|
image: "tab_close.png" COMP;
|
||||||
}
|
}
|
||||||
set { name: "bg_shadow";
|
set { name: "bg_shadow";
|
||||||
image { image: "bg_shadow.png" COMP; size: 0 0 200 150; }
|
image { image: "bg_shadow.png" COMP; size: 0 0 200 150; }
|
||||||
|
@ -1016,6 +1017,7 @@ collections {
|
||||||
target: "tab_bevel_shad3";
|
target: "tab_bevel_shad3";
|
||||||
target: "tab_bevel_shad4";
|
target: "tab_bevel_shad4";
|
||||||
target: "tabtitle";
|
target: "tabtitle";
|
||||||
|
target: "tabclose";
|
||||||
}
|
}
|
||||||
program {
|
program {
|
||||||
signal: "tabbar,off"; source: "terminology";
|
signal: "tabbar,off"; source: "terminology";
|
||||||
|
@ -1041,6 +1043,7 @@ collections {
|
||||||
target: "tab_bevel_shad3";
|
target: "tab_bevel_shad3";
|
||||||
target: "tab_bevel_shad4";
|
target: "tab_bevel_shad4";
|
||||||
target: "tabtitle";
|
target: "tabtitle";
|
||||||
|
target: "tabclose";
|
||||||
}
|
}
|
||||||
|
|
||||||
part { name: "terminology.tab"; type: SWALLOW;
|
part { name: "terminology.tab"; type: SWALLOW;
|
||||||
|
@ -1055,7 +1058,7 @@ collections {
|
||||||
fixed: 1 1;
|
fixed: 1 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// some slot for dragable parts to stayt in along top edge of bg
|
// some slot for dragable parts to stay in along top edge of bg
|
||||||
part { name: "tabdrag"; type: SPACER;
|
part { name: "tabdrag"; type: SPACER;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
rel2.relative: 1.0 0.0;
|
rel2.relative: 1.0 0.0;
|
||||||
|
@ -1185,6 +1188,32 @@ collections {
|
||||||
visible: 1;
|
visible: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
part { name: "tabclose"; type: IMAGE;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
image {
|
||||||
|
normal: "tab_close.png";
|
||||||
|
};
|
||||||
|
rel1 {
|
||||||
|
to: "tabmiddle";
|
||||||
|
relative: 1.0 0.5;
|
||||||
|
offset: -20 -8;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to: "tabmiddle";
|
||||||
|
relative: 1.0 0.5;
|
||||||
|
offset: -2 8;
|
||||||
|
}
|
||||||
|
visible: 0;
|
||||||
|
}
|
||||||
|
description { state: "tab" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
visible: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
signal: "mouse,clicked,1"; source: "tabclose";
|
||||||
|
action: SIGNAL_EMIT "tab,close" "terminology";
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// visual bell - spinning red siren light
|
// visual bell - spinning red siren light
|
||||||
|
@ -1709,6 +1738,7 @@ collections {
|
||||||
image: "tab_other_r.png" COMP;
|
image: "tab_other_r.png" COMP;
|
||||||
image: "tab_shad_l2.png" COMP;
|
image: "tab_shad_l2.png" COMP;
|
||||||
image: "tab_shad_r2.png" COMP;
|
image: "tab_shad_r2.png" COMP;
|
||||||
|
image: "tab_close.png" COMP;
|
||||||
}
|
}
|
||||||
parts {
|
parts {
|
||||||
part { name: "tab_bevel_shad1";
|
part { name: "tab_bevel_shad1";
|
||||||
|
@ -1822,6 +1852,27 @@ collections {
|
||||||
rel2.to: "tab_bevel_top2";
|
rel2.to: "tab_bevel_top2";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
part { name: "tabclose"; type: IMAGE;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
image {
|
||||||
|
normal: "tab_close.png";
|
||||||
|
};
|
||||||
|
rel1 {
|
||||||
|
to: "tab_bevel_top2";
|
||||||
|
relative: 1.0 0.5;
|
||||||
|
offset: -20 -8;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
to: "tab_bevel_top2";
|
||||||
|
relative: 1.0 0.5;
|
||||||
|
offset: -2 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
signal: "mouse,clicked,1"; source: "tabclose";
|
||||||
|
action: SIGNAL_EMIT "tab,close" "terminology";
|
||||||
|
}
|
||||||
part { name: "clip"; type: RECT;
|
part { name: "clip"; type: RECT;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
rel2.offset: -1 -2;
|
rel2.offset: -1 -2;
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 214 B |
|
@ -1648,6 +1648,17 @@ _cb_tab_activate(void *data, Evas_Object *obj EINA_UNUSED,
|
||||||
_term_focus(term);
|
_term_focus(term);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
static void
|
||||||
_tabbar_fill(Tabs *tabs)
|
_tabbar_fill(Tabs *tabs)
|
||||||
{
|
{
|
||||||
|
@ -1718,6 +1729,8 @@ _tabbar_fill(Tabs *tabs)
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
edje_object_signal_callback_add(o, "tab,activate", "terminology",
|
edje_object_signal_callback_add(o, "tab,activate", "terminology",
|
||||||
_cb_tab_activate, tab_item);
|
_cb_tab_activate, tab_item);
|
||||||
|
edje_object_signal_callback_add(o, "tab,close", "terminology",
|
||||||
|
_cb_tab_close, term);
|
||||||
}
|
}
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
@ -3776,6 +3789,8 @@ _term_bg_config(Term *term)
|
||||||
_cb_tabcount_prev, term);
|
_cb_tabcount_prev, term);
|
||||||
edje_object_signal_callback_add(term->bg, "tabcount,next", "terminology",
|
edje_object_signal_callback_add(term->bg, "tabcount,next", "terminology",
|
||||||
_cb_tabcount_next, term);
|
_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->base, "terminology.content", term->termio);
|
||||||
edje_object_part_swallow(term->bg, "terminology.content", term->base);
|
edje_object_part_swallow(term->bg, "terminology.content", term->base);
|
||||||
edje_object_part_swallow(term->bg, "terminology.miniview", term->miniview);
|
edje_object_part_swallow(term->bg, "terminology.miniview", term->miniview);
|
||||||
|
|
Loading…
Reference in New Issue