bigboard r7247 - in trunk/bigboard: . stocks/people
- From: otaylor svn gnome org
- To: svn-commits-list gnome org
- Subject: bigboard r7247 - in trunk/bigboard: . stocks/people
- Date: Fri, 1 Feb 2008 16:59:01 +0000 (GMT)
Author: otaylor
Date: Fri Feb 1 16:59:01 2008
New Revision: 7247
URL: http://svn.gnome.org/viewvc/bigboard?rev=7247&view=rev
Log:
- Prefer user name to contact name for display_name, since we have bad
contact names in database.
- Fixing resorting in browser
Modified:
trunk/bigboard/people_tracker.py
trunk/bigboard/stocks/people/peoplebrowser.py
Modified: trunk/bigboard/people_tracker.py
==============================================================================
--- trunk/bigboard/people_tracker.py (original)
+++ trunk/bigboard/people_tracker.py Fri Feb 1 16:59:01 2008
@@ -195,10 +195,15 @@
def __update_name(self):
name = None
- if self.contact:
- name = getattr(self.contact, 'name', None)
+ # We prefer the name in the user to the name in the contact, because
+ # a lot of our contacts in the database have bad (email-derived)
+ # names. If we add the ability to override the name chosen by
+ # a Mugshot user, then we'll need to remove those bad contact
+ # names, and then reverse this.
if not name and self.user:
name = getattr(self.user, 'name', None)
+ if not name and self.contact:
+ name = getattr(self.contact, 'name', None)
if not name:
for buddy in self.aim_buddies:
name = getattr(buddy, 'alias', None)
@@ -567,7 +572,7 @@
return self.__items.values().__str__()
def __iter__(self):
- return self.__items.itervalues()
+ return self.__items.iterkeys()
class PeopleTracker(Singleton):
"""Singleton object for tracking available users and contacts
Modified: trunk/bigboard/stocks/people/peoplebrowser.py
==============================================================================
--- trunk/bigboard/stocks/people/peoplebrowser.py (original)
+++ trunk/bigboard/stocks/people/peoplebrowser.py Fri Feb 1 16:59:01 2008
@@ -63,8 +63,9 @@
self.remove(item)
self.add_column_item(section, item, lambda a,b: sort_people(a.person, b.person))
- person.connect('display-name-changed', resort)
person.connect('status-changed', resort)
+ person.connect('online-changed', resort)
+ person.connect('display-name-changed', resort)
self.__update_visibility(section, item)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]