Page MenuHomePhabricator

radio: inherit from elm check

Authored by singh.amitesh on Mar 1 2016, 7:53 PM.



Radio inherits from Check now and remove the duplicate codes

Diff Detail

rELM core/elementary
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
singh.amitesh retitled this revision from to radio: inherit from elm check.
singh.amitesh updated this object.
singh.amitesh edited the test plan for this revision. (Show Details)

actually we need _icon_signal_emit() :(

remove sizing eval

call elm check parent instead in some cases.

singh.amitesh added a comment.EditedMar 2 2016, 12:58 AM

two questions:

  1. Should we reuse "changed" event of elm check in radio and define a macro

but then it would be written in <widget>.c file. the same thing
which we were doing earlier. :/
Can eolian generate it? ;)

  1. In _elm_radio_eo_base_constructor()
should i change obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
to obj = eo_do_super_ret(obj, ELM_CHECK_CLASS, obj, eo_constructor()); ?

i think this is not required since this call actually makes the eo hierarchy so we should not break it.

raster edited edge metadata.Mar 2 2016, 4:59 AM

aaaah. ok. changed. reality is this is a common event among so many widgets. this should have some interface to share - radios change, checks change, n state value things change, flipselectors change, spinners change, sliders change...

so what you are seeing now is one of those design things we'll hit as we go.

so this -> share interface in efl likely.

tasn edited edge metadata.Mar 2 2016, 6:24 AM

You can't really have a "changed" interface, because the changed should/would have different event info depending on what has changed. This is an example of a took generic naming that won't work any more. We would need to rename it to "state,changed" or whatever.

raster added a comment.Mar 2 2016, 2:51 PM

in all the changed events we have - there is no event info at all. it just says something changed - query the object for its current state to see what it is, so i'd disagree here. it is generic.

raster accepted this revision.Mar 2 2016, 10:26 PM
raster edited edge metadata.

go ahead and land it :) shared event, etc. in later patches.

This revision is now accepted and ready to land.Mar 2 2016, 10:26 PM
This revision was automatically updated to reflect the committed changes.
singh.amitesh edited edge metadata.Mar 10 2016, 4:36 AM
singh.amitesh added a subscriber: saurabhbunty.