From: <bi...@us...> - 2008-09-23 21:52:00
|
Revision: 10514 http://amsn.svn.sourceforge.net/amsn/?rev=10514&view=rev Author: billiob Date: 2008-09-23 21:51:51 +0000 (Tue, 23 Sep 2008) Log Message: ----------- s/topCLUpdated/myInfoUpdated/ + remove some trailing spaces Modified Paths: -------------- trunk/amsn2/amsn2/core/contact_manager.py trunk/amsn2/amsn2/gui/base/contact_list.py trunk/amsn2/amsn2/gui/front_ends/efl/contact_list.py Modified: trunk/amsn2/amsn2/core/contact_manager.py =================================================================== --- trunk/amsn2/amsn2/core/contact_manager.py 2008-09-23 21:09:50 UTC (rev 10513) +++ trunk/amsn2/amsn2/core/contact_manager.py 2008-09-23 21:51:51 UTC (rev 10514) @@ -29,26 +29,26 @@ contacts = address_book.contacts.search_by_groups(group) groupV = self.buildGroupView(group, 0, len(contacts)) groupV.contacts = [] - + for contact in contacts: contactV = self.buildContactView(contact) groupV.contacts.append(contactV) - + for l in self._cl_listeners: l.groupAdded(groupV) groupV = self.buildGroupView(None, 0, 0) groupV.contacts = [] - + contacts = address_book.contacts.search_by_memberships(pymsn.Membership.FORWARD) for contact in contacts: if len(contact.groups) == 0: contactV = self.buildContactView(contact) groupV.contacts.append(contactV) - + if len(groupV.contacts) > 0: groupV = self.buildGroupView(None, 0, len(groupV.contacts)) - + for l in self._cl_listeners: l.groupAdded(groupV) @@ -59,9 +59,9 @@ groupV.name = StringView() # TODO : default color from skin/settings groupV.name.appendText(group.name if group else "No Group") # TODO : parse or translation groupV.name.appendText("(" + str(active) + "/" + str(total) + ")") - + return groupV - + def buildContactView(self, contact): contactV = ContactView.getContact(contact.id) contactV.icon = self._core._gui.gui.Image(self._core, self._core._main) @@ -86,4 +86,4 @@ contactV.name.closeTag("psm") contactV.pymsn_contact = contact return contactV - + Modified: trunk/amsn2/amsn2/gui/base/contact_list.py =================================================================== --- trunk/amsn2/amsn2/gui/base/contact_list.py 2008-09-23 21:09:50 UTC (rev 10513) +++ trunk/amsn2/amsn2/gui/base/contact_list.py 2008-09-23 21:51:51 UTC (rev 10514) @@ -11,7 +11,7 @@ """ This interface represents the main Contact List Window self._clwiget is an aMSNContactListWidget """ - + def __init__(self, amsn_core, parent): raise NotImplementedError @@ -28,16 +28,17 @@ @text : a string """ raise NotImplementedError - + def setMenu(self, menu): """ This will allow the core to change the current window's main menu @menu : a MenuView """ raise NotImplementedError - def topCLUpdated(self, contactView): - """ This will allow the core to change the top of the CL - @contactView: the contactView of the user (contains DP, nick, psm, + def myInfoUpdated(self, view): + """ This will allow the core to change pieces of information about + ourself, such as DP, nick, psm, the current media being played,... + @view: the contactView of the ourself (contains DP, nick, psm, currentMedia,...)""" raise NotImplementedError @@ -65,7 +66,7 @@ the contact list which will contain the list of ContactViews for all the contacts to show in the group.""" raise NotImplementedError - + def groupUpdated(self, groupView): """ This method will be called to notify the contact list that a group has been updated. @@ -75,7 +76,7 @@ A contact can also be added or removed from a group using this method """ raise NotImplementedError - + def contactUpdated(self, contactView): """ This method will be called to notify the contact list that a contact has been updated. @@ -87,7 +88,7 @@ in the affects groups. """ raise NotImplementedError - + def setContactCallback(self, cb): """ Set the callback when a contact is clicked or double clicked (choice is given to the front-end developer) @@ -96,7 +97,7 @@ cid is the contact id of the contact actionned """ raise NotImplementedError - + def setContactContextMenu(self, cb): """ Set the callback when a context menu for a contact should be displayed (choice is given to the front-end developer, usually on right @@ -107,7 +108,7 @@ That function must return a MenuView """ raise NotImplementedError - + def setGroupCallback(self, cb): """ Set the callback when a group is clicked or double clicked (choice is given to the front-end developer) Modified: trunk/amsn2/amsn2/gui/front_ends/efl/contact_list.py =================================================================== --- trunk/amsn2/amsn2/gui/front_ends/efl/contact_list.py 2008-09-23 21:09:50 UTC (rev 10513) +++ trunk/amsn2/amsn2/gui/front_ends/efl/contact_list.py 2008-09-23 21:51:51 UTC (rev 10514) @@ -21,7 +21,7 @@ def show(self): self._clwidget.show() - + def hide(self): self._clwidget.hide() @@ -31,7 +31,7 @@ def setMenu(self, menu): self._parent.setMenu(menu) - def topCLUpdated(self, contactView): + def myInfoUpdated(self, view): pass #TODO @@ -50,17 +50,17 @@ except edje.EdjeLoadError, e: raise SystemExit("error loading %s: %s" % (THEME_FILE, e)) - + self.group_holder = GroupHolder(self._evas, self) self.group_items = {} - + self._etk_evas_object.evas_object = self._edje self.add_with_viewport(self._etk_evas_object) self._edje.part_swallow("groups", self.group_holder); - + self._edje.focus = True - + self._edje.show() self._etk_evas_object.show() @@ -73,7 +73,7 @@ def groupUpdated(self, group): raise NotImplementedError - + def groupAdded(self, group): gi = self.group_holder.add_group(group) self.group_items[group.uid] = gi @@ -115,7 +115,7 @@ #TODO : clean :) self.contacts[contact.uid].\ part_text_set("contact_data", contact.name.toString()) - + if DP_IN_CL: # add the dp # Remove the current dp @@ -148,7 +148,7 @@ new_contact.data["view"] = contact self.contacts[contact.uid] = new_contact self.contact_updated(contact) - + self.member_add(new_contact) if self._callback is not None: @@ -159,7 +159,7 @@ new_contact.show() return new_contact - + def clip_set(self, obj): for i in self.contacts: self.contacts[i].clip_set(obj) @@ -171,7 +171,7 @@ def show(self): for i in self.contacts: self.contacts[i].show() - + def hide(self): for i in self.contacts: self.contacts[i].hide() @@ -191,7 +191,7 @@ self.contacts[i].move(x, y) self.contacts[i].size = (w, item_height) y += item_height + spacing - + def num_contacts(self): return len(self.contacts) @@ -205,8 +205,8 @@ c.on_mouse_down_add(cb_) else: c.on_mouse_down_del() - + class GroupItem(edje.Edje): def __init__(self, parent, evas_obj, group, ccb = None): self.evas_obj = evas_obj @@ -237,12 +237,12 @@ return 0 else: return self.contact_holder.num_contacts() - + # Private methods def __update_parent(self): self._parent.update_widget(self._parent.size[0], self._parent.size[1]) - + def __expanded_cb(self, edje_obj, signal, source): self.expanded = True self.__update_parent() @@ -275,7 +275,7 @@ self.member_add(new_group) self.update_widget(self.size[0], self.size[1]) return new_group - + def setContactCallback(self, ccb): self._ccb = ccb for gi in self.group_items: @@ -290,7 +290,7 @@ self.clip_set(self._parent._edje.clip_get()) for g in self.group_items: g.show() - + def hide(self): for g in self.group_items: g.hide() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |