- Clarify when a service type is supposed to be full/network, and when it's supposed

to be a short one.  Activities should _never_ be exposed to the full/network stype
    since that's an implementation detail of the PresenceService
- Make everything having to do with service objects non-unicode (?) to stop the madness.
    Ideally we want everything to be UTF-8 eventually.
- Fix up PS to deal with service types of short/long variety
- Remove a hack from the Start Page that gets all service advertisements, will fix soon
This commit is contained in:
Dan Williams
2006-06-16 15:27:50 -04:00
parent 38565321d5
commit b31a2176ba
3 changed files with 102 additions and 82 deletions
+1 -8
View File
@@ -20,7 +20,7 @@ class ActivitiesModel(gtk.ListStore):
self.append([ title, address, None, None ])
def add_activity(self, buddy, service):
(uid, stype) = service.get_activity_uid()
uid = service.get_activity_uid()
title = urllib.unquote(service.get_one_property('Title'))
address = urllib.unquote(service.get_one_property('URI'))
subtitle = 'Shared by %s' % buddy.get_nick_name()
@@ -75,7 +75,6 @@ class StartPage(gtk.HBox):
self._pservice = PresenceService.get_instance()
self._pservice.connect("activity-announced", self._on_activity_announced_cb)
self._pservice.connect("new-service-adv", self._on_new_service_adv_cb)
self._pservice.start()
self._pservice.track_service_type(BrowserActivity._BROWSER_ACTIVITY_TYPE)
@@ -115,12 +114,6 @@ class StartPage(gtk.HBox):
self.pack_start(sw)
sw.show()
def _on_new_service_adv_cb(self, pservice, uid, stype):
if uid is not None:
real_stype = Service.compose_service_type(stype, uid)
print "Will ask to track uid=%s, stype=%s" % (uid, stype)
self._pservice.track_service_type(real_stype)
def _on_activity_announced_cb(self, pservice, service, buddy):
self._activities.get_model().add_activity(buddy, service)