Commit 34bef2b0 authored by Dan Pascu's avatar Dan Pascu

Simplified bonjour contact layout

parent e99740bf
...@@ -995,12 +995,22 @@ class Contact(object): ...@@ -995,12 +995,22 @@ class Contact(object):
return self.settings.name return self.settings.name
@property @property
def uris(self): def location(self):
return self.settings.uris if isinstance(self.settings, BonjourNeighbour):
return self.settings.hostname
else:
return None
@property @property
def info(self): def info(self):
return self.note or self.uri if isinstance(self.settings, BonjourNeighbour):
return self.note or '@' + self.uri.host
else:
return self.note or self.uri
@property
def uris(self):
return self.settings.uris
@property @property
def uri(self): def uri(self):
...@@ -1125,12 +1135,22 @@ class ContactDetail(object): ...@@ -1125,12 +1135,22 @@ class ContactDetail(object):
return self.settings.name return self.settings.name
@property @property
def uris(self): def location(self):
return self.settings.uris if isinstance(self.settings, BonjourNeighbour):
return self.settings.hostname
else:
return None
@property @property
def info(self): def info(self):
return self.note or self.uri if isinstance(self.settings, BonjourNeighbour):
return self.note or '@' + self.uri.host
else:
return self.note or self.uri
@property
def uris(self):
return self.settings.uris
@property @property
def uri(self): def uri(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment