[Maranda] ignore directory category of type server, if an identity with server category is present. Fixes #7499
This commit is contained in:
parent
eb11474c2d
commit
152ca3ca6e
10
src/disco.py
10
src/disco.py
|
@ -948,8 +948,16 @@ class AgentBrowser:
|
||||||
Set the window title based on agent info
|
Set the window title based on agent info
|
||||||
"""
|
"""
|
||||||
# Set the banner and window title
|
# Set the banner and window title
|
||||||
if 'name' in identities[0]:
|
if len(identities) > 1:
|
||||||
|
# Check if an identity with server category is present
|
||||||
|
for i, _identity in enumerate(identities):
|
||||||
|
if _identity['category'] == 'server' and 'name' in _identity:
|
||||||
|
name = _identity['name']
|
||||||
|
break
|
||||||
|
elif 'name' in identities[0]:
|
||||||
name = identities[0]['name']
|
name = identities[0]['name']
|
||||||
|
|
||||||
|
if name:
|
||||||
self.window._set_window_banner_text(self._get_agent_address(), name)
|
self.window._set_window_banner_text(self._get_agent_address(), name)
|
||||||
|
|
||||||
# Add an icon to the banner.
|
# Add an icon to the banner.
|
||||||
|
|
Loading…
Reference in New Issue