efl.pack_table: inherit efl.pack instead of efl.pack_linear

Summary:
>>! In T5301#110572, @jpeg wrote:
> Quick recap before I leave.
> ...
> ...
>  - Pack interfaces - T5328
>
> Table does not need to inherit from "linear" (1d) layout: this brings unnecessary complexity, for a dubious use case.

We don't have linear layout policy of table(2d) layout. furthermore, i don't
think it will be clearly defined. it is enough for Efl.Pack_Table to support
`efl_pack` which work the same as `efl_pack_end`.

ref T5719, T5328

Test Plan:
- make
- elementary_test -to 'efl.ui.table'
- elementary_test -to 'efl.ui.table(linear api)'

Reviewers: zmike, woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, jpeg, #committers

Tags: #efl

Maniphest Tasks: T5719, T5328

Differential Revision: https://phab.enlightenment.org/D8420
This commit is contained in:
Yeongjong Lee 2019-03-20 12:45:00 +01:00 committed by Xavi Artigas
parent 0860c4f1d7
commit 37c703437a
4 changed files with 3 additions and 11 deletions

View File

@ -545,7 +545,7 @@ append_cb(void *data, const Efl_Event *ev EINA_UNUSED)
efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE);
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
elm_object_tooltip_text_set(o, "Click to unpack");
efl_pack_end(table, o);
efl_pack(table, o);
efl_gfx_entity_visible_set(o, 1);
}

View File

@ -1,6 +1,6 @@
import efl_ui_direction;
interface @beta Efl.Pack_Table extends Efl.Pack_Linear
interface @beta Efl.Pack_Table extends Efl.Pack
{
[[2D containers aligned on a table with rows and columns]]
eo_prefix: efl_pack;

View File

@ -719,14 +719,7 @@ _efl_ui_table_efl_pack_table_table_rows_get(const Eo *obj EINA_UNUSED, Efl_Ui_Ta
}
EOLIAN static Eina_Bool
_efl_ui_table_efl_pack_pack(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED, Efl_Gfx_Entity *subobj)
{
/* this is just an alias */
return efl_pack_end(obj, subobj);
}
EOLIAN static Eina_Bool
_efl_ui_table_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Gfx_Entity *subobj)
_efl_ui_table_efl_pack_pack(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Gfx_Entity *subobj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(subobj, EINA_FALSE);

View File

@ -38,7 +38,6 @@ class @beta Efl.Ui.Table extends Efl.Ui.Widget implements Efl.Pack_Table, Efl.Pa
Efl.Pack_Table.table_columns { get; set; }
Efl.Pack_Table.table_rows { get; set; }
Efl.Pack_Table.table_direction { get; set; }
Efl.Pack_Linear.pack_end;
Efl.Pack_Layout.layout_update;
Efl.Pack_Layout.layout_request;
}