Page MenuHomePhabricator

elementary: only apply text when the object is not invalidated and dying.
AcceptedPublic

Authored by cedric on Thu, Mar 14, 2:29 PM.

Details

Diff Detail

Repository
rEFL core/efl
Branch
devs/cedric/fileselector
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 10515
cedric created this revision.Thu, Mar 14, 2:29 PM
cedric requested review of this revision.Thu, Mar 14, 2:29 PM

Would be nice if the commit message explained WHY this is needed (what is the problem being fixed). Otherwise, reviewers will have a hard time figuring out how to check this. That's the reason for the "Test plan" section.

cedric updated this revision to Diff 20651.Fri, Mar 15, 5:01 PM
cedric added a reviewer: YOhoho.

Rebase.

bu5hm4n requested changes to this revision.Sat, Mar 16, 12:51 PM

I am nearly 100% sure that this breaks behavior. We use elm_layout_text_set before finalize is called, but the theme is maybe already set, so we want to call elm_layout_text_set on it...

This revision now requires changes to proceed.Sat, Mar 16, 12:51 PM

I am nearly 100% sure that this breaks behavior. We use elm_layout_text_set before finalize is called, but the theme is maybe already set, so we want to call elm_layout_text_set on it...

It is my understanding that it is not safe to call text_set while the object is not finalized and it is also a bad idea to call it when it is invalidating. So I am not sure what kind of break you are thinking about?

Tbh. i am confused *when* its legal and *when* its not. Because right now, this function is always executed at a time where the layout object is *not* finalized. (Check _efl_ui_progressbar_efl_ui_widget_theme_apply for example) So this would break that right now AFAICS.

Tbh. i am confused *when* its legal and *when* its not. Because right now, this function is always executed at a time where the layout object is *not* finalized. (Check _efl_ui_progressbar_efl_ui_widget_theme_apply for example) So this would break that right now AFAICS.

Hum, indeed. That was not supposed to work :-D Fun if it is, will have to look and understand why. Will do that next week. I don't have much time today and none until Wednesday.

I think you are right. It seems that for legacy we should be able to apply text before finalize. Going to be fun! Will adjust patch to be only for invalidating and after.

cedric planned changes to this revision.Wed, Mar 20, 10:58 AM
cedric updated this revision to Diff 20814.Wed, Mar 20, 11:36 AM
cedric retitled this revision from elementary: only apply text when the object is still alive. to elementary: only apply text when the object is not invalidated and dying..
cedric edited the summary of this revision. (Show Details)

Rebase and correct.

bu5hm4n accepted this revision.Thu, Mar 21, 2:37 AM

I wait for the day we get a bug report "But i wanted to set text while the object was beeing deleted! I used that to safe a string Plz fix!"

This revision is now accepted and ready to land.Thu, Mar 21, 2:37 AM