Revert "only show tabselector if tabcount > 1"

This reverts commit a85dc5be9d.
This commit is contained in:
Carsten Haitzler 2014-12-03 08:42:34 +09:00
parent 4192a1fc3e
commit fbb21059e1
2 changed files with 28 additions and 50 deletions

View File

@ -2447,23 +2447,10 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
rel2.to: "content";
}
}
part { name: "tabcount_clip"; type: RECT;
description { state: "default" 0.0;
color: 255 255 255 0;
visible: 0;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
rel1.to: "content";
rel2.to: "content";
}
}
part { name: "terminology.tabmissed.label"; type: TEXT; mouse_events: 0;
effect: GLOW;
scale: 1;
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "terminology.tabcount.label";
@ -2489,7 +2476,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "terminology.tabmissed.ev"; type: RECT; repeat_events: 1;
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "terminology.tabmissed.label";
@ -2500,7 +2487,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
part { name: "terminology.tabcount.label"; type: TEXT; mouse_events: 0;
effect: GLOW;
scale: 1;
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "terminology.tabselector.spacer";
@ -2525,7 +2512,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "terminology.tabcount.ev"; type: RECT; repeat_events: 1;
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "terminology.tabcount.label";
@ -2534,7 +2521,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "tabselector_glow_r0";
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
rel1.to: "tabselector_r0";
rel2.to: "tabselector_r0";
@ -2552,7 +2539,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "tabselector_glow_r1";
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
rel1.to: "tabselector_r1";
rel2.to: "tabselector_r1";
@ -2570,7 +2557,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "tabselector_glow_r2";
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
rel1.to: "tabselector_r2";
rel2.to: "tabselector_r2";
@ -2588,7 +2575,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "tabselector_glow_r3";
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
rel1.to: "tabselector_r3";
rel2.to: "tabselector_r3";
@ -2606,7 +2593,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "tabselector_r0"; type: RECT;
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
rel1.to: "terminology.tabselector.spacer";
rel2.to: "terminology.tabselector.spacer";
@ -2620,7 +2607,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "tabselector_r1"; type: RECT;
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
rel1.to: "terminology.tabselector.spacer";
rel2.to: "terminology.tabselector.spacer";
@ -2634,7 +2621,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "tabselector_r2"; type: RECT;
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
rel1.to: "terminology.tabselector.spacer";
rel2.to: "terminology.tabselector.spacer";
@ -2648,7 +2635,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "tabselector_r3"; type: RECT;
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
rel1.to: "terminology.tabselector.spacer";
rel2.to: "terminology.tabselector.spacer";
@ -2662,7 +2649,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "terminology.tabselector.spacer"; type: SWALLOW;
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "terminology.tabbar.spacer";
@ -2674,7 +2661,7 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
}
}
part { name: "tabselector_ev"; type: RECT; repeat_events: 1;
clip_to: "tabcount_clip";
clip_to: "tabcontrols_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "terminology.tabselector.spacer";
@ -2878,17 +2865,25 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; target: "3.clip"; target:
target: "tabcontrols_clip";
}
program {
signal: "tabcount,off"; source: "terminology";
signal: "tabmissed,off"; source: "terminology";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.5;
target: "tabcount_clip";
target: "terminology.tabmissed.label";
}
program {
signal: "tabcount,on"; source: "terminology";
action: STATE_SET "on" 0.0;
transition: DECELERATE 0.5;
target: "tabcount_clip";
signal: "tabmissed,on"; source: "terminology";
action: STATE_SET "over" 0.0;
transition: DECELERATE 0.2;
target: "terminology.tabmissed.label";
after: "tabmissed2";
}
program { name: "tabmissed2";
signal: "tabmissed,on"; source: "terminology";
action: STATE_SET "default" 0.0;
transition: DECELERATE 3.0;
target: "terminology.tabmissed.label";
}
}
}

View File

@ -84,7 +84,6 @@ struct _Tabs {
Evas_Object *selector_spacer;
Eina_List *tabs;
Tab_Item *current;
unsigned char tabbar_shown : 1;
};
struct _Split
@ -2430,9 +2429,6 @@ _tabs_close(Term_Container *tc, Term_Container *child,
count--;
snprintf(buf, sizeof(buf), "%i", count);
edje_object_part_text_set(tabs->base, "terminology.tabcount.label", buf);
if (eina_list_count(tabs->tabs) == 1 && !tabs->tabbar_shown)
edje_object_signal_emit(tabs->base, "tabcount,off", "terminology");
}
}
@ -2638,9 +2634,6 @@ _tab_new_cb(void *data,
tab_item_new(tabs, tc_new);
tc_new->focus(tc_new, tc_parent);
if (!tabs->tabbar_shown)
edje_object_signal_emit(tabs->base, "tabcount,on", "terminology");
}
static void
@ -2650,11 +2643,9 @@ _cb_tabbar_show(void *data, Evas_Object *obj EINA_UNUSED,
Tabs *tabs = data;
DBG("show");
tabs->tabbar_shown = EINA_TRUE;
edje_object_signal_emit(tabs->base, "tabbar,on", "terminology");
edje_object_signal_emit(tabs->base, "tabcontrols,off", "terminology");
edje_object_signal_emit(tabs->base, "tabcount,off", "terminology");
edje_object_part_swallow(tabs->base, "terminology.tabbar", tabs->box);
evas_object_show(tabs->box);
}
@ -2706,14 +2697,8 @@ _tabs_hide_cb(void *data,
edje_object_signal_emit(tabs->base, "tabbar,off", "terminology");
edje_object_signal_emit(tabs->base, "tabcontrols,on", "terminology");
if (eina_list_count(tabs->tabs) > 1)
edje_object_signal_emit(tabs->base, "tabcount,on", "terminology");
else
edje_object_signal_emit(tabs->base, "tabcount,off", "terminology");
edje_object_part_unswallow(tabs->base, tabs->box);
evas_object_hide(tabs->box);
tabs->tabbar_shown = EINA_FALSE;
}
static void
@ -2928,8 +2913,6 @@ _tabs_new(Term_Container *child, Term_Container *parent)
edje_object_signal_callback_add(tabs->base, "tabselector,show", "terminology",
_cb_tab_selector_show, tabs);
tabs->tabbar_shown = EINA_TRUE;
if (((parent->type == TERM_CONTAINER_TYPE_WIN) &&
wn->config->hide_top_tabbar) ||
(parent->type != TERM_CONTAINER_TYPE_WIN))