[Bugs] #1742 UNSP: after adding a friend the palette doesn't change
Sugar Labs Bugs
bugtracker-noreply at sugarlabs.org
Sun Jul 11 07:02:09 EDT 2010
#1742: after adding a friend the palette doesn't change
------------------------------------------+---------------------------------
Reporter: sascha_silbe | Owner: tomeu
Type: defect | Status: new
Priority: Unspecified by Maintainer | Milestone: 0.88
Component: sugar | Version: Git as of bugdate
Severity: Minor | Keywords: sugar-love
Distribution: | Status_field: New
------------------------------------------+---------------------------------
Changes (by timclicks):
* cc: timclicks (added)
Comment:
Looking at `jarabe.view.buddymenu.BuddyMenu`, there is already a check to
see whether the person is a current friend. If the method is checking for
the state every time and doesn't have its own list of buddies, does it
need to listen to signals also?
This seems to be the relevant method:
{{{
#!python
def _add_buddy_items(self):
if friends.get_model().has_buddy(self._buddy):
menu_item = MenuItem(_('Remove friend'), 'list-remove')
menu_item.connect('activate', self._remove_friend_cb)
else:
menu_item = MenuItem(_('Make friend'), 'list-add')
menu_item.connect('activate', self._make_friend_cb)
}}}
If this check isn't working, it could mean that
`jarabe.model.friends.get_model` isn't working properly... I don't see a
`__call__()` method in `jarabe.model.friends.Friends`, but I don't know
enough about `gobject.GObject` to know if this is a problem.
{{{
#!python
_model = None
def get_model():
global _model
if _model is None:
_model = Friends()
return _model
}}}
--
Ticket URL: <http://bugs.sugarlabs.org/ticket/1742#comment:4>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list