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

Ajay Garg ajay at activitycentral.com
Wed Jul 25 01:48:33 EDT 2012


On Tue, Jul 24, 2012 at 7:12 PM, Sascha Silbe <silbe at activitycentral.com>wrote:

> Ajay Garg <ajay at activitycentral.com> writes:
>
> [toggling favourite star causes a "listview-refresh"]
> >> What exactly do you mean by "listview-refresh"? Do you mean a) a redraw
> >> of the current content or b) some operation that causes us to query the
> >> data store (or file system)?
> >
> > By refresh, I mean to say that the data store is re-queried.
>
> OK. We should try to avoid that; see below.
>
>
> > More clearly, I changed the code (in src/jarabe/journal/listview) from ::
> [adding short-circuit logic to
> jarabe.journal.listview.BaseListView.refresh()]
>
> Well, if you inhibit our current way of refreshing the view, it's kind
> of expected that it doesn't work anymore. ;)
>
> 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

Herein, while in multi-select, the refresh is inhibited (as already stated
before).
So, as a result, the favorite-status IS updated by clicking the
star/favorite-icon (without needing the refresh).

However, this causes our original issue: the favorite-status is updated
(graphically), only when the mouse is hovered away from the
star/favorite-icon.

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.


Regards,
Ajay



>
> Sascha
> --
> http://sascha.silbe.org/
> http://www.infra-silbe.de/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120725/3d14fee7/attachment-0001.html>


More information about the Sugar-devel mailing list