From: <bi...@us...> - 2008-09-29 08:30:29
|
Revision: 10528 http://amsn.svn.sourceforge.net/amsn/?rev=10528&view=rev Author: billiob Date: 2008-09-29 08:30:17 +0000 (Mon, 29 Sep 2008) Log Message: ----------- Reverting commits 10523:10527 Modified Paths: -------------- trunk/amsn2/amsn2/core/amsn.py trunk/amsn2/amsn2/core/contact_manager.py trunk/amsn2/amsn2/core/conversation_manager.py trunk/amsn2/amsn2/core/views/__init__.py trunk/amsn2/amsn2/core/views/contactview.py trunk/amsn2/amsn2/core/views/stringview.py trunk/amsn2/amsn2/core/views/tooltipview.py trunk/amsn2/amsn2/gui/base/splash.py trunk/amsn2/amsn2/gui/front_ends/efl/__init__.py trunk/amsn2/amsn2/gui/front_ends/efl/contact_list.py trunk/amsn2/amsn2/gui/front_ends/efl/image.py trunk/amsn2/amsn2/gui/front_ends/efl/skins.py trunk/amsn2/amsn2/gui/front_ends/efl/splash.py trunk/amsn2/amsn2/protocol/contact.py trunk/amsn2/amsn2/protocol/conversation.py Added Paths: ----------- trunk/amsn2/amsn2/gui/base/image.py Removed Paths: ------------- trunk/amsn2/amsn2/core/views/imageview.py Modified: trunk/amsn2/amsn2/core/amsn.py =================================================================== --- trunk/amsn2/amsn2/core/amsn.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/core/amsn.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -6,7 +6,7 @@ from views import * from contact_manager import * from conversation_manager import * - + class aMSNCore(object): def __init__(self, options): """ @@ -46,24 +46,24 @@ def run(self): self._main.show(); self._loop.run(); + - def mainWindowShown(self): # TODO : load the profiles from disk and all settings # then show the login window if autoconnect is disabled - + self._main.setTitle("aMSN 2 - Loading") - + splash = self._gui.gui.aMSNSplashScreen(self, self._main) - image = ImageView() - image.load(ImageView.ResourceType.FILE,"/path/to/image/here") - + image = self._gui.gui.Image(self, self._main) + image.load("File","/path/to/image/here") + splash.setImage(image) splash.setText("Loading...") splash.show() - + login = self._gui.gui.aMSNLoginWindow(self, self._main) - + profile = None if self._options.account is not None: if self._profile_manager.profileExists(self._options.account): @@ -83,20 +83,20 @@ if profile is None: profile = self._profile_manager.addProfile("") profile.password = "" - + login.switch_to_profile(profile) - + splash.hide() self._main.setTitle("aMSN 2 - Login") login.show() - + menu = self.createMainMenuView() self._main.setMenu(menu) def getMainWindow(self): return self._main + - def addProfile(self, account): return self._profile_manager.addProfile(account) @@ -136,7 +136,8 @@ self._conversation_manager.newConversation([contact]) clwin._clwidget.setContactCallback(startConversation_cb) - self._contact_manager.register(clwin._clwidget) + #TODO: use a method for that in aMSNContactManager + self._contact_manager._cl_listeners.append(clwin._clwidget) self._contact_manager.onCLDownloaded(profile.client.address_book) @@ -157,7 +158,7 @@ = self.quit) mainMenu = MenuItemView(MenuItemView.CASCADE_MENU, label="Main") mainMenu.addItem(quitMenuItem) - + menu.addItem(mainMenu) return menu Modified: trunk/amsn2/amsn2/core/contact_manager.py =================================================================== --- trunk/amsn2/amsn2/core/contact_manager.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/core/contact_manager.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -7,7 +7,7 @@ def __init__(self, core): self._core = core - #TODO: listeners should be a priority weakref list or smthg like that + #TODO: cl_listeners should be a weakref list """ Listeners are objects with the following methods: - groupAdded(groupView) @@ -15,33 +15,26 @@ TODO: listeners should return the views they were given (so they change it, useful for plugins...) """ - self._listeners = [] + self._cl_listeners = [] #Events - def onContactPresenceChanged(self, c): - #Maybe we need to change the name of the groupView - for l in self._listeners: + def onContactPresenceChanged(self, contact): + c = self.buildContactView(contact) + for l in self._cl_listeners: l.contactUpdated(c) def onCLDownloaded(self, address_book): - #contacts are new. Need to fill the ContactView - contact_updated = (ContactView.Updated.ACCOUNT - | ContactView.Updated.STATUS - | ContactView.Updated.NICKNAME - | ContactView.Updated.PSM - | ContactView.Updated.CURRENT_MEDIA) for group in address_book.groups: contacts = address_book.contacts.search_by_groups(group) groupV = self.buildGroupView(group, 0, len(contacts)) groupV.contacts = [] for contact in contacts: - contactV = ContactView.getContact(self._core, contact.id, - contact, contact_updated) + contactV = self.buildContactView(contact) groupV.contacts.append(contactV) - for l in self._listeners: + for l in self._cl_listeners: l.groupAdded(groupV) groupV = self.buildGroupView(None, 0, 0) @@ -50,25 +43,16 @@ contacts = address_book.contacts.search_by_memberships(pymsn.Membership.FORWARD) for contact in contacts: if len(contact.groups) == 0: - contactV = ContactView.getContact(self._core, contact.id, - contact, contact_updated) + 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._listeners: + for l in self._cl_listeners: l.groupAdded(groupV) - def register(self, obj, priority = 0): - #TODO: priority - self._listeners.append(obj) - def unregister(self, obj): - if obj in self._listeners: - self._listeners.remove(obj) - - def buildGroupView(self, group, active, total): groupV = GroupView.getGroup(group.id if group else 0) groupV.icon = None # TODO : expanded/collapsed icon @@ -78,3 +62,28 @@ return groupV + def buildContactView(self, contact): + contactV = ContactView.getContact(contact.id) + contactV.icon = self._core._gui.gui.Image(self._core, self._core._main) + contactV.icon.load("Skin","buddy_" + self._core.p2s[contact.presence]) + contactV.dp = self._core._gui.gui.Image(self._core, self._core._main) + contactV.dp.load("Skin","default_dp") + contactV.name = StringView() # TODO : default colors + contactV.name.openTag("nickname") + contactV.name.appendText(contact.display_name) # TODO parse + contactV.name.closeTag("nickname") + contactV.name.appendText(" ") + contactV.name.openTag("status") + contactV.name.appendText("(") + contactV.name.appendText(self._core.p2s[contact.presence]) + contactV.name.appendText(")") + contactV.name.closeTag("status") + contactV.name.appendText(" ") + contactV.name.openTag("psm") + contactV.name.setItalic() + contactV.name.appendText(contact.personal_message) + contactV.name.unsetItalic() + contactV.name.closeTag("psm") + contactV.pymsn_contact = contact + return contactV + Modified: trunk/amsn2/amsn2/core/conversation_manager.py =================================================================== --- trunk/amsn2/amsn2/core/conversation_manager.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/core/conversation_manager.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -9,8 +9,8 @@ def onInviteConversation(self, conversation): print "new conv" - contacts = [ContactView.getContact(self._core, c.id, c) for c in - conversation.participants] + contacts_id = [c.id for c in conversation.participants] + contacts = [ContactView.getContact(cid) for cid in contacts_id] #TODO: What if the contact_manager has not build a view for that contact? c = aMSNConversation(self._core, self, conversation, contacts) self._convs.append(c) Modified: trunk/amsn2/amsn2/core/views/__init__.py =================================================================== --- trunk/amsn2/amsn2/core/views/__init__.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/core/views/__init__.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -5,4 +5,3 @@ from menuview import * from stringview import * from tooltipview import * -from imageview import * Modified: trunk/amsn2/amsn2/core/views/contactview.py =================================================================== --- trunk/amsn2/amsn2/core/views/contactview.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/core/views/contactview.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -1,107 +1,18 @@ from base import BaseUIView -from stringview import StringView -from imageview import ImageView class ContactView (BaseUIView): - class Updated: - NONE = 0 - ICON = 1 - DP = 2 - EMBLEM = 4 - STATUS = 8 - ACCOUNT = 16 - NICKNAME = 32 - FRIENDLY_NAME = 64 - PSM = 128 - CURRENT_MEDIA = 512 - HAS_SPACE = 1024 - NAME = 2048 - - - def __init__(self, core, uid): + def __init__(self, uid): BaseUIView.__init__(self, uid) - self.icon = ImageView() - self.dp = ImageView(ImageView.ResourceType.SKIN,"default_dp") - self.emblem = ImageView() - self.status = None - self.account = None - self.nickname = StringView() - self.friendly_name = StringView() - self.psm = StringView() - self.current_media = None - self.has_space = None - self.name = StringView() + self.icon = None + self.dp = None + self.emblem = None + self.name = None self.pymsn_contact = None - self.updated = ContactView.Updated.NONE @staticmethod - def getContact(core, uid, pymsn_contact = None, updated = 0): + def getContact(uid): contact = BaseUIView.getView(uid) if contact is None: - r = ContactView(core, uid) + return ContactView(uid) else: - r = contact - if pymsn_contact is not None: - r.__updateView(core, pymsn_contact, updated) - return r - - - def __updateView(self, core, pymsn_contact, updated = 0): - - self.updated = updated - #check if the status is changed - if self.updated & ContactView.Updated.STATUS: - self.status = core.p2s[pymsn_contact.presence] - #icon - self.icon.load("Skin","buddy_" + core.p2s[pymsn_contact.presence]) - self.updated |= ContactView.Updated.ICON - #emblem - self.emblem.load("Skin","emblem_" + core.p2s[pymsn_contact.presence]) - self.updated |= ContactView.Updated.EMBLEM - - if self.updated & ContactView.Updated.DP: - pass - - if self.updated & ContactView.Updated.ACCOUNT: - self.account = pymsn_contact.account - - if self.updated & ContactView.Updated.NICKNAME: - #TODO: parse... - self.nickname.reset() - self.nickname.appendText(pymsn_contact.display_name) - - if self.updated & ContactView.Updated.PSM: - #TODO: parse... - self.psm.reset() - self.psm.appendText(pymsn_contact.personal_message) - - if self.updated & ContactView.Updated.CURRENT_MEDIA: - self.current_media = pymsn_contact.current_media - - if self.updated & ( ContactView.Updated.NICKNAME - | ContactView.Updated.STATUS - | ContactView.Updated.PSM ): - self.updated |= ContactView.Updated.NAME - self.name.reset() # TODO : default colors - self.name.openTag("nickname") - self.name.appendStringView(self.nickname) - self.name.closeTag("nickname") - self.name.appendText(" ") - self.name.openTag("status") - self.name.appendText("(") - self.name.appendText(self.status) - self.name.appendText(")") - self.name.closeTag("status") - self.name.appendText(" ") - self.name.openTag("psm") - self.name.setItalic() - self.name.appendStringView(self.psm) - self.name.unsetItalic() - self.name.closeTag("psm") - - self.pymsn_contact = pymsn_contact - - def __repr__(self): - template = "<ContactView uid='%s' name='%s' account='%s'>" - return template % (self.uid, self.name.toString(), self.account) - + return contact Deleted: trunk/amsn2/amsn2/core/views/imageview.py =================================================================== --- trunk/amsn2/amsn2/core/views/imageview.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/core/views/imageview.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -1,19 +0,0 @@ -class ImageView(object): - class ResourceType: - UNKNOWN = "unknown" #Should not be used - FILE = "File" - SKIN = "Skin" - - def __init__(self, resource_type=None, value=None): - self.imgs = [] - if resource_type is not None and value is not None: - self.load(resource_type, value) - - def load(self, resource_type, value): - self.imgs = [(resource_type, value)] - - def append(self, resource_type, value): - self.imgs.append((resource_type, value)) - - def prepend(self, resource_type, value): - self.imgs.insert(0, (resource_type, value)) Modified: trunk/amsn2/amsn2/core/views/stringview.py =================================================================== --- trunk/amsn2/amsn2/core/views/stringview.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/core/views/stringview.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -54,14 +54,14 @@ class UnderlineElement(StringElement): def __init__(self, underline): StringView.StringElement.__init__(self, StringView.UNDERLINE_ELEMENT, underline) - + def __init__(self, default_background_color = None, default_color = None, default_font = None): self._elements = [] self._default_background_color = default_background_color self._default_color = default_color self._default_font = default_font - + if default_color is not None: self.resetColor() if default_background_color is not None: @@ -86,7 +86,7 @@ self._elements.append(StringView.OpenTagElement(tag)) def closeTag(self, tag): self._elements.append(StringView.CloseTagElement(tag)) - + def setBold(self): self._elements.append(StringView.BoldElement(True)) def unsetBold(self): @@ -99,9 +99,7 @@ self._elements.append(StringView.UnderlineElement(True)) def unsetUnderline(self): self._elements.append(StringView.UnderlineElement(False)) - - def reset(self): - self._elements = [] + def resetColor(self): self.setColor(self._default_color) def resetBackgroundColor(self): @@ -109,16 +107,12 @@ def resetFont(self): self.setFont(self._default_font) - def appendStringView(self, strv): - #TODO: default (bg)color - self._elements.extend(strv._elements) - def toString(self): out = "" for x in self._elements: if x.getType() == StringView.TEXT_ELEMENT: out += x.getValue() - + return out def __str__(self): @@ -128,7 +122,7 @@ out = "{" for x in self._elements: out += "[" + x.getType() + "=" + str(x.getValue()) + "]" - + out += "}" return out - + Modified: trunk/amsn2/amsn2/core/views/tooltipview.py =================================================================== --- trunk/amsn2/amsn2/core/views/tooltipview.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/core/views/tooltipview.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -4,3 +4,4 @@ self.name = None self.icon = None + Copied: trunk/amsn2/amsn2/gui/base/image.py (from rev 10525, trunk/amsn2/amsn2/gui/base/image.py) =================================================================== --- trunk/amsn2/amsn2/gui/base/image.py (rev 0) +++ trunk/amsn2/amsn2/gui/base/image.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -0,0 +1,27 @@ + +class Image(object): + """ This interface will represent an image to be used by the UI""" + def __init__(self, amsn_core, parent): + """Initialize the interface. You should store the reference to the core in here """ + raise NotImplementedError + + def load(self, resource_name, value): + """ This method is used to load an image using the name of a resource and a value for that resource + resource_name can be : + - 'File', value is the filename + - 'Skin', value is the skin key + - some more :) + """ + raise NotImplementedError + + def append(self, resource_name, value): + """ This method is used to overlap an image on the current image + Have a look at the documentation of the 'load' method for the meanings of 'resource_name' and 'value' + """ + raise NotImplementedError + + def prepend(self, resource_name, value): + """ This method is used to underlap an image under the current image + Have a look at the documentation of the 'load' method for the meanings of 'resource_name' and 'value' + """ + raise NotImplementedError Modified: trunk/amsn2/amsn2/gui/base/splash.py =================================================================== --- trunk/amsn2/amsn2/gui/base/splash.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/gui/base/splash.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -10,17 +10,17 @@ def show(self): """ Draw the splashscreen """ raise NotImplementedError - + def hide(self): """ Hide the splashscreen """ raise NotImplementedError - + def setText(self, text): """ Shows a different text inside the splashscreen """ raise NotImplementedError - + def setImage(self, image): - """ Set the image to show in the splashscreen. This is an ImageView object """ + """ Set the image to show in the splashscreen. This is a gui.Image object """ raise NotImplementedError Modified: trunk/amsn2/amsn2/gui/front_ends/efl/__init__.py =================================================================== --- trunk/amsn2/amsn2/gui/front_ends/efl/__init__.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/gui/front_ends/efl/__init__.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -23,7 +23,7 @@ imp.find_module("etk") gui.GUIManager.registerFrontEnd("efl", sys.modules[__name__]) - + except ImportError: pass - + Modified: trunk/amsn2/amsn2/gui/front_ends/efl/contact_list.py =================================================================== --- trunk/amsn2/amsn2/gui/front_ends/efl/contact_list.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/gui/front_ends/efl/contact_list.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -1,6 +1,5 @@ from constants import * -from image import * import evas import edje import ecore @@ -13,10 +12,9 @@ class aMSNContactListWindow(base.aMSNContactListWindow): def __init__(self, amsn_core, parent): - self._core = amsn_core + self._amsn_core = amsn_core self._evas = parent._evas self._parent = parent - self._skin = amsn_core._skin_manager.skin self._clwidget = aMSNContactListWidget(amsn_core, self) parent.setChild(self._clwidget) self._clwidget.show() @@ -39,9 +37,8 @@ class aMSNContactListWidget(etk.ScrolledView, base.aMSNContactListWidget): def __init__(self, amsn_core, parent): - self._core = amsn_core + self._amsn_core = amsn_core self._evas = parent._evas - self._skin = parent._skin self._etk_evas_object = etk.EvasObject() etk.ScrolledView.__init__(self) @@ -112,7 +109,6 @@ self.evas_obj = ecanvas self.contacts = {} self._parent = parent - self._skin = parent._skin self._callback = cb def contact_updated(self, contact): @@ -128,11 +124,12 @@ if obj_swallowed is not None: # Delete ? obj_swallowed.hide() - dp = Image(self._skin, self.evas_obj, contact.dp) #add emblem on dp - dp.appendView(contact.emblem) + #shouldn't be done there, but in the core... + contact.dp.append("Skin","emblem_busy") #yeah, everyone is busy!! + contact.dp.repeat_events = True self.contacts[contact.uid].\ - part_swallow("buddy_icon", dp) + part_swallow("buddy_icon", contact.dp) else: # add the buddy icon # Remove the current icon @@ -141,9 +138,8 @@ if obj_swallowed is not None: # Delete ? obj_swallowed.hide() - icon = Image(self._skin, self.evas_obj, contact.icon) self.contacts[contact.uid].\ - part_swallow("buddy_icon", icon) + part_swallow("buddy_icon", contact.icon) def add_contact(self, contact): @@ -215,7 +211,6 @@ def __init__(self, parent, evas_obj, group, ccb = None): self.evas_obj = evas_obj self._parent = parent - self._skin = parent._skin self.expanded = True self.group = group self._edje = edje.Edje.__init__(self, self.evas_obj, file=THEME_FILE, group="group_item") @@ -271,7 +266,6 @@ self.evas_obj = ecanvas self.group_items = [] self._parent = parent - self._skin = parent._skin self._ccb = ccb def add_group(self, group): Modified: trunk/amsn2/amsn2/gui/front_ends/efl/image.py =================================================================== --- trunk/amsn2/amsn2/gui/front_ends/efl/image.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/gui/front_ends/efl/image.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -1,3 +1,4 @@ + import evas import ecore import ecore.evas @@ -2,70 +3,57 @@ -from amsn2.core.views import imageview +from amsn2.gui import base -class Image(evas.SmartObject): - def __init__(self, skin, canvas, view=None): - self._evas = canvas +class Image(evas.SmartObject, base.Image): + def __init__(self, amsn_core, window): + self._amsn_core = amsn_core + self._amsn_gui = self._amsn_core.getMainWindow() + self._evas = self._amsn_gui._evas evas.SmartObject.__init__(self, self._evas) - self._skin = skin + + self._skin = self._amsn_core._skin_manager.skin self._imgs = [] self.propagate_events = True - if view is not None: - self.load(view) - ####################################################### #Public methods - def load(self, view): + def load(self, resource_type, value): for img in self._imgs: self.member_del(img) - self._imgs = [] + self._imgs = [ self._evas.Image() ] + self.member_add(self._imgs[0]) + try: + loadMethod = getattr(self, "_loadFrom%s" % resource_type) + except AttributeError, e: + print "From load in efl/image.py:\n\t(resource_type, value) = (%s, %s)\n\tAttributeError: %s" % (resource_type, value, e) + else: + loadMethod(value) + + def append(self, resource_type, value): + img = self._evas.Image() + self.member_add(img) + self._imgs.append(img) + try: + loadMethod = getattr(self, "_loadFrom%s" % resource_type) + except AttributeError, e: + print "From append in efl/image.py:\n\t(resource_type, value) = (%s, %s)\n\tAttributeError: %s" % (resource_type, value, e) + else: + loadMethod(value, pos=-1) - for (resource_type, value) in view.imgs: - self._imgs.append(self._evas.Image()) - self.member_add(self._imgs[-1]) - try: - loadMethod = getattr(self, "_loadFrom%s" % resource_type) - except AttributeError, e: - print "From load in efl/image.py:\n\t(resource_type, value) = (%s, %s)\n\tAttributeError: %s" % (resource_type, value, e) - else: - loadMethod(value, -1) + def prepend(self, resource_type, value): + img = self._evas.Image() + self.member_add(img) + self._imgs.insert(0, img) + try: + loadMethod = getattr(self, "_loadFrom%s" % resource_type) + except AttributeError, e: + print "From prepend in efl/image.py:\n\t(resource_type, value) = (%s, %s)\n\tAttributeError: %s" % (resource_type, value, e) + else: + loadMethod(value, pos=0) - def appendView(self, view): - for (resource_type, value) in view.imgs: - img = self._evas.Image() - self.member_add(img) - self._imgs.append(img) - try: - loadMethod = getattr(self, "_loadFrom%s" % resource_type) - except AttributeError, e: - print "From append in efl/image.py:\n\t(resource_type, value) = (%s, %s)\n\tAttributeError: %s" % (resource_type, value, e) - else: - loadMethod(value, pos=-1) - def appendImage(self, image): - for i in image._imgs: - self._imgs.append(i) - self.member_add(i) - def prependView(self, resource_type, value): - for (resource_type, value) in view.imgs.reverse(): - img = self._evas.Image() - self.member_add(img) - self._imgs.insert(0, img) - try: - loadMethod = getattr(self, "_loadFrom%s" % resource_type) - except AttributeError, e: - print "From prepend in efl/image.py:\n\t(resource_type, value) = (%s, %s)\n\tAttributeError: %s" % (resource_type, value, e) - else: - loadMethod(value, pos=0) - - def prependImage(self, image): - for i in image._imgs.reverse(): - self._imgs.insert(0,i) - self.member_add(i) - def _loadFromFile(self, filename, pos=0): @@ -92,8 +80,8 @@ print "From _loadFromSkin in efl/image.py:\n\t(type, value) = (%s, %s)\n\tAttributeError: %s" % (type, value, e) else: loadMethod(value, pos) + - #TODO: append, prepend :s ####################################################### # Need to overwritre some evas.SmartObject methods: Modified: trunk/amsn2/amsn2/gui/front_ends/efl/skins.py =================================================================== --- trunk/amsn2/amsn2/gui/front_ends/efl/skins.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/gui/front_ends/efl/skins.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -23,13 +23,13 @@ self.setKey("emblem_busy", ("File", "amsn2/themes/default/images/contact_list/busy_emblem.png")) - + def getKey(self, key, default = None): try: return self._dict[key] except KeyError: return default - + def setKey(self, key, value): self._dict[key] = value Modified: trunk/amsn2/amsn2/gui/front_ends/efl/splash.py =================================================================== --- trunk/amsn2/amsn2/gui/front_ends/efl/splash.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/gui/front_ends/efl/splash.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -7,12 +7,12 @@ def show(self): pass - + def hide(self): pass - + def setText(self, text): pass - + def setImage(self, image): pass Modified: trunk/amsn2/amsn2/protocol/contact.py =================================================================== --- trunk/amsn2/amsn2/protocol/contact.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/protocol/contact.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -1,6 +1,4 @@ -from amsn2.core.views import * - import pymsn import pymsn.event @@ -9,9 +7,7 @@ def __init__(self, client, contact_manager): self._contact_manager = contact_manager pymsn.event.ContactEventInterface.__init__(self, client) - + def on_contact_presence_changed(self, contact): - c = ContactView.getContact(self._contact_manager._core, contact.id, - contact, ContactView.Updated.STATUS) - self._contact_manager.onContactPresenceChanged(c) + self._contact_manager.onContactPresenceChanged(contact) Modified: trunk/amsn2/amsn2/protocol/conversation.py =================================================================== --- trunk/amsn2/amsn2/protocol/conversation.py 2008-09-28 15:52:01 UTC (rev 10527) +++ trunk/amsn2/amsn2/protocol/conversation.py 2008-09-29 08:30:17 UTC (rev 10528) @@ -16,24 +16,24 @@ self._amsn_conversation.onError(type, error) def on_conversation_user_joined(self, contact): - c = ContactView.getContact(self._amsn_conversation._core, contact.id, contact) + c = ContactView.getContact(contact.id) self._amsn_conversation.onUserJoined(c) def on_conversation_user_left(self, contact): - c = ContactView.getContact(self._amsn_conversation._core, contact.id, contact) + c = ContactView.getContact(contact.id) self._amsn_conversation.onUserLeft(c) def on_conversation_user_typing(self, contact): - c = ContactView.getContact(self._amsn_conversation._core, contact.id, contact) + c = ContactView.getContact(contact.id) self._amsn_conversation.onUserTyping(c) def on_conversation_message_received(self, sender, message): - c = ContactView.getContact(self._amsn_conversation._core, sender.id, sender) + c = ContactView.getContact(sender.id) str = StringView() str.appendText(message.content) self._amsn_conversation.onMessageReceived(c, str) def on_conversation_nudge_received(self, sender): - c = ContactView.getContact(self._amsn_conversation._core, sender.id, sender) + c = ContactView.getContact(sender.id) self._amsn_conversation.onNudgeReceived(c) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |