[Sugar-devel] How to have "CellRenderer.props" take effect, without a UI refresh?

Sascha Silbe silbe at activitycentral.com
Mon Jul 30 14:32:58 EDT 2012


Ajay Garg <ajay at activitycentral.com> writes:

>> [adding short-circuit logic to
>> jarabe.journal.listview.BaseListView.refresh()]
[...]
>> What we should do is enhancing the logic to
>>
>> a) just redraw instead of querying the back-end again for changes we
>>    triggered ourselves and / or
>> b) update our model based on the change notifications rather than
>>    throwing away our state.
>>
>
> Well, that's exactly what I did, via the patch
> http://git.sugarlabs.org/dextrose/mainline/commit/ad3897946e013f1ff4020aeab35375ccb122758b

Not really AFAICT. You're still inhibiting the refresh completely,
without doing a redraw. You're also doing a gratuitous data store query
for each favourite star. I'm expecting that to have considerable impact
on performance.


> I guess, if we could somehow cause the mouse to PROGRAMMATICALLY
> hover-away/disappear-momentarily when the star/favorite-icon is clicked, we
> could be done.
> However, I am not able to find a way to do this via pygtk.

Fortunately. :-P

As discussed on IRC, the way to _trigger_ _a_ _redraw_ (not: move the
pointer) is something like this:

    x_, y_, width, height = self.allocation
    area = (0, 0, width, height)
    self.window.invalidate_rect(area, False)


Sascha
-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120730/ee1d4ff5/attachment.pgp>


More information about the Sugar-devel mailing list