fix tab count
This commit is contained in:
parent
bd4358dd19
commit
dfb8889248
|
@ -1975,12 +1975,13 @@ tab_item_new(Tabs *tabs, Term_Container *child)
|
||||||
{
|
{
|
||||||
Elm_Object_Item *toolbar_item;
|
Elm_Object_Item *toolbar_item;
|
||||||
Tab_Item *tab_item;
|
Tab_Item *tab_item;
|
||||||
|
char buf[32];
|
||||||
|
int n;
|
||||||
|
|
||||||
tab_item = calloc(1, sizeof(Tab_Item));
|
tab_item = calloc(1, sizeof(Tab_Item));
|
||||||
tab_item->tc = child;
|
tab_item->tc = child;
|
||||||
assert(child != NULL);
|
assert(child != NULL);
|
||||||
|
|
||||||
|
|
||||||
toolbar_item = elm_toolbar_item_append(tabs->tabbar,
|
toolbar_item = elm_toolbar_item_append(tabs->tabbar,
|
||||||
NULL, "Terminology",
|
NULL, "Terminology",
|
||||||
_tab_selected, tab_item);
|
_tab_selected, tab_item);
|
||||||
|
@ -1994,6 +1995,10 @@ tab_item_new(Tabs *tabs, Term_Container *child)
|
||||||
|
|
||||||
tabs->current = tab_item;
|
tabs->current = tab_item;
|
||||||
|
|
||||||
|
n = eina_list_count(tabs->tabs);
|
||||||
|
snprintf(buf, sizeof(buf), "%i", n);
|
||||||
|
edje_object_part_text_set(tabs->base, "terminology.tabcount.label", buf);
|
||||||
|
|
||||||
return tab_item;
|
return tab_item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue