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

Ajay Garg ajay at activitycentral.com
Tue Jul 24 05:43:49 EDT 2012


Hi all.

I have been investigating the following piece of code, from
"src/jarabe/journal/listview.py" ::

####################################################################################
    def __favorite_set_data_cb(self, column, cell, tree_model, tree_iter):
        favorite = tree_model[tree_iter][ListModel.COLUMN_FAVORITE]

        if favorite:
            client = gconf.client_get_default()
            color = XoColor(client.get_string('/desktop/sugar/user/color'))
            cell.props.xo_color = color
        else:
            cell.props.xo_color = None
####################################################################################



This piece of code works as expected, and the toggling-UI-effect takes
place as soon as the star/favorite-icon is clicked (that is, the
mouse-pointer need not be hovered away).
But note that, there is listview-refresh involved after each toggling of
the star/favorite-icon.

If the listview-refresh is inhibited, the toggling-UI-effect does take
place, but ONLY AFTER the mouse-pointer is hovered away from the
star/favorite-icon.
This becomes all the more important, since the listview-refresh is
inhibited in multi-select mode (as part of the feature being
proposed/discussed at
http://lists.sugarlabs.org/archive/sugar-devel/2012-July/038558.html).

The same observations stand true, for the checkbox icon (as part of
multi-select feature).


So,

*      Is it feasible to have the toggling-UI-effect takes place, without
the need for hovering the mouse-pointer away from the star/favorite-icon,
when listview-refresh is inhibited?*



I will be grateful for any ideas.



Thanks and Regards,
Ajay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120724/6d6709df/attachment.html>


More information about the Sugar-devel mailing list