Page MenuHomePhabricator

elm_fileselector: support expandable items
ClosedPublic

Authored by bu5hm4n on Apr 29 2020, 6:36 AM.

Details

Summary

the fileselector can store exactly 1 model and monitor that for changes,
which works normally just well. However, when we expand a items, another
model comes into play, which is not monitored, and no additional
reference is taken. Which means, _process_last will simply delete it,
and elements that did not come into play at the _populate call are never
displayed.

With this commit, we check that we do not have a parent item, and
explictly wait for the model to publish all its items, before we call
_process_last.

Additionally, that showed that the tracking of the list/grid item is
ultimatly buggy, as there is no assertion that the parent model is
really the parent directoy. Hence we need to hand pass the parent item
here, as a fallback option to set the correct parent item.

fixes T8689

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bu5hm4n created this revision.Apr 29 2020, 6:36 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

bu5hm4n requested review of this revision.Apr 29 2020, 6:36 AM
zmike added a subscriber: zmike.Apr 29 2020, 6:46 AM

I recall seeing a TODO comment about monitoring for subitems which is probably addressed by this patch. Can you remove that to avoid future confusion?

No - monitoring is not addressed by that patch, this just ensures that we publish the items that are "known" after the first cycle of children,count updates.

zmike added a comment.Apr 29 2020, 7:11 AM

Sure, but by successfully changing the model now it seems like that covers the case that the comment was mentioning, doesn't it?

As long as you mean the comment in line 191: No - the monitoring of subitems is not changed by this patch at all. The problem that only one model can be monitored is still present, and not changed...

zmike accepted this revision.Apr 29 2020, 8:22 AM

I guess my interpretation of that comment was that it acknowledged the problem that was happening without this patch where the model monitoring/processing was screwed up, but maybe I was just reading too much into it.

This revision is now accepted and ready to land.Apr 29 2020, 8:22 AM
Closed by commit rEFLf21df93595f1: elm_fileselector: support expandable items (authored by Marcel Hollerbach <mail@marcel-hollerbach.de>, committed by zmike). · Explain WhyApr 29 2020, 8:47 AM
This revision was automatically updated to reflect the committed changes.