forked from enlightenment/efl
efl_ui_tab_bar: remove update event
Summary: before the previous commit this was used to update the tab_bar icon. However, this is not needed anymore, as the item stuff can directly be updated. So I do not see a reason for this event anymore. Reviewers: zmike, segfaultxavi, cedric, woohyun, bowonryu Reviewed By: woohyun Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9727
This commit is contained in:
parent
784de4d471
commit
3c4a870910
|
@ -57,26 +57,6 @@ static char *tab_icon_get()
|
|||
return tab_icons[tab_icon_count++];
|
||||
}
|
||||
|
||||
static void
|
||||
_tab_changed_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||
{
|
||||
Efl_Ui_Tab_Page_Tab_Changed_Event *ev = event->info;
|
||||
|
||||
switch (ev->changed_info)
|
||||
{
|
||||
case EFL_UI_TAB_PAGE_TAB_CHANGED_LABEL:
|
||||
printf("[%p] tab label changed\n", event->object);
|
||||
break;
|
||||
|
||||
case EFL_UI_TAB_PAGE_TAB_CHANGED_ICON:
|
||||
printf("[%p] tab icon changed\n", event->object);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Eo *
|
||||
content_add(Eo *parent, char *text)
|
||||
{
|
||||
|
@ -110,8 +90,6 @@ tab_page_add(Eo *parent)
|
|||
efl_text_set(efl_part(tab_page, "tab"), label);
|
||||
efl_ui_tab_page_part_tab_icon_set(efl_part(tab_page, "tab"), icon);
|
||||
|
||||
efl_event_callback_add(tab_page, EFL_UI_TAB_PAGE_EVENT_TAB_CHANGED, _tab_changed_cb, NULL);
|
||||
|
||||
return tab_page;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,11 +111,6 @@ _efl_ui_tab_page_part_tab_icon_set(Eo *obj, void *_pd EINA_UNUSED, const char *p
|
|||
|
||||
eina_stringshare_replace(&sd->tab_icon, path);
|
||||
efl_ui_tab_bar_default_item_icon_set(sd->tab_bar_icon, sd->tab_icon);
|
||||
|
||||
Efl_Ui_Tab_Page_Tab_Changed_Event event;
|
||||
event.changed_info = EFL_UI_TAB_PAGE_TAB_CHANGED_ICON;
|
||||
|
||||
efl_event_callback_call(pd->obj, EFL_UI_TAB_PAGE_EVENT_TAB_CHANGED, &event);
|
||||
}
|
||||
|
||||
EOLIAN static const char *
|
||||
|
@ -135,11 +130,6 @@ _efl_ui_tab_page_part_tab_efl_text_text_set(Eo *obj, void *_pd EINA_UNUSED, cons
|
|||
|
||||
eina_stringshare_replace(&sd->tab_label, text);
|
||||
efl_text_set(sd->tab_bar_icon, sd->tab_label);
|
||||
|
||||
Efl_Ui_Tab_Page_Tab_Changed_Event event;
|
||||
event.changed_info = EFL_UI_TAB_PAGE_TAB_CHANGED_LABEL;
|
||||
|
||||
efl_event_callback_call(pd->obj, EFL_UI_TAB_PAGE_EVENT_TAB_CHANGED, &event);
|
||||
}
|
||||
|
||||
EOLIAN static const char *
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
enum @beta Efl.Ui.Tab_Page_Tab_Changed {
|
||||
[[Which part of the tab has changed.]]
|
||||
label = 0, [[Label has changed.]]
|
||||
icon [[Icon has changed.]]
|
||||
}
|
||||
|
||||
struct @beta Efl.Ui.Tab_Page_Tab_Changed_Event {
|
||||
[[Information of changed event.]]
|
||||
changed_info: Efl.Ui.Tab_Page_Tab_Changed; [[Which part of the tab has changed.]]
|
||||
}
|
||||
|
||||
class @beta Efl.Ui.Tab_Page extends Efl.Ui.Layout_Base implements Efl.Content
|
||||
{
|
||||
[[Tab Page class]]
|
||||
|
@ -37,7 +26,4 @@ class @beta Efl.Ui.Tab_Page extends Efl.Ui.Layout_Base implements Efl.Content
|
|||
Efl.Content.content_unset;
|
||||
Efl.Part.part_get;
|
||||
}
|
||||
events {
|
||||
tab,changed: Efl.Ui.Tab_Page_Tab_Changed_Event; [[Called when tab changed]]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue