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

Simplified bonjour contact layout

parent e99740bf
......@@ -995,13 +995,23 @@ class Contact(object):
return self.settings.name
@property
def uris(self):
return self.settings.uris
def location(self):
if isinstance(self.settings, BonjourNeighbour):
return self.settings.hostname
else:
return None
@property
def info(self):
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
def uri(self):
if self.settings.uris.default is not None:
......@@ -1125,13 +1135,23 @@ class ContactDetail(object):
return self.settings.name
@property
def uris(self):
return self.settings.uris
def location(self):
if isinstance(self.settings, BonjourNeighbour):
return self.settings.hostname
else:
return None
@property
def info(self):
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
def uri(self):
if self.settings.uris.default is not None:
......
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