win: double click on tab title to change it. Closes T3143

This commit is contained in:
Boris Faure 2017-02-17 21:47:10 +01:00
parent 6c5c7d486c
commit 74c1ceffd8
2 changed files with 23 additions and 1 deletions

View File

@ -1137,7 +1137,10 @@ collections {
fixed: 1 1;
}
}
part { name: "tabtitle"; type: TEXT; mouse_events: 0;
part {
name: "tabtitle";
type: TEXT;
mouse_events: 0;
scale: 1;
effect: SOFT_SHADOW BOTTOM;
description { state: "default" 0.0;
@ -1239,6 +1242,10 @@ collections {
visible: 1;
}
}
program {
signal: "mouse,down,1,double"; source: "tabmiddle";
action: SIGNAL_EMIT "tab,title" "terminology";
}
program {
signal: "mouse,clicked,1"; source: "tabclose";
action: SIGNAL_EMIT "tab,close" "terminology";

View File

@ -1717,6 +1717,17 @@ _cb_tab_close(void *data,
term_close(win, term->termio, EINA_FALSE);
}
static void
_cb_tab_title(void *data,
Evas_Object *_obj EINA_UNUSED,
const char *_sig EINA_UNUSED,
const char *_src EINA_UNUSED)
{
Term *term = data;
term_set_title(term);
}
static void
_tabbar_fill(Tabs *tabs)
{
@ -1797,6 +1808,8 @@ _tabbar_fill(Tabs *tabs)
_cb_tab_activate, tab_item);
edje_object_signal_callback_add(o, "tab,close", "terminology",
_cb_tab_close, term);
edje_object_signal_callback_add(o, "tab,title", "terminology",
_cb_tab_title, term);
}
j++;
}
@ -4025,6 +4038,8 @@ _term_bg_config(Term *term)
_cb_tabcount_next, term);
edje_object_signal_callback_add(term->bg, "tab,close", "terminology",
_cb_tab_close, term);
edje_object_signal_callback_add(term->bg, "tab,title", "terminology",
_cb_tab_title, 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);