fix #2555
This commit is contained in:
parent
345ab7846d
commit
a8c0bbe7c1
|
@ -186,7 +186,7 @@ class Zeroconf:
|
|||
def entrygroup_state_changed_callback(self, state, error):
|
||||
# the name is already present, so recreate
|
||||
if state == avahi.ENTRY_GROUP_COLLISION:
|
||||
self.service_add_fail_callback('Local name collision, recreating.')
|
||||
self.service_add_fail_callback('Local name collision')
|
||||
elif state == avahi.ENTRY_GROUP_FAILURE:
|
||||
print 'zeroconf.py: ENTRY_GROUP_FAILURE reached(that should not happen)'
|
||||
|
||||
|
|
|
@ -2532,6 +2532,8 @@ class ManageBookmarksWindow:
|
|||
for account in gajim.connections:
|
||||
if gajim.connections[account].connected <= 1:
|
||||
continue
|
||||
if gajim.connections[account].is_zeroconf:
|
||||
continue
|
||||
iter = self.treestore.append(None, [None, account,None,
|
||||
None, None, None, None])
|
||||
|
||||
|
|
|
@ -784,7 +784,9 @@ class RosterWindow:
|
|||
if gajim.connections[account].connected <= 1:
|
||||
# if offline or connecting
|
||||
continue
|
||||
|
||||
if gajim.config.get_per('accounts', account, 'is_zeroconf'):
|
||||
continue
|
||||
|
||||
# join gc
|
||||
label = gtk.Label()
|
||||
label.set_markup('<u>' + account.upper() +'</u>')
|
||||
|
@ -853,7 +855,8 @@ class RosterWindow:
|
|||
|
||||
break # No other account connected
|
||||
|
||||
if connected_accounts == 0:
|
||||
if connected_accounts == 0 or (connected_accounts == 1 and
|
||||
gajim.connections[gajim.connections.keys()[0]].is_zeroconf):
|
||||
# no connected accounts, make the menuitems insensitive
|
||||
new_chat_menuitem.set_sensitive(False)
|
||||
join_gc_menuitem.set_sensitive(False)
|
||||
|
|
|
@ -158,7 +158,8 @@ class Systray:
|
|||
sub_menu.append(item)
|
||||
item.connect('activate', self.on_show_menuitem_activate, 'offline')
|
||||
|
||||
iskey = connected_accounts > 0
|
||||
iskey = connected_accounts > 0 and not (connected_accounts == 1 and
|
||||
gajim.connections[gajim.connections.keys()[0]].is_zeroconf)
|
||||
chat_with_menuitem.set_sensitive(iskey)
|
||||
single_message_menuitem.set_sensitive(iskey)
|
||||
join_gc_menuitem.set_sensitive(iskey)
|
||||
|
@ -176,6 +177,8 @@ class Systray:
|
|||
accounts_list = gajim.contacts.get_accounts()
|
||||
accounts_list.sort()
|
||||
for account in accounts_list:
|
||||
if gajim.connections[account].is_zeroconf:
|
||||
continue
|
||||
if gajim.connections[account].connected > 1:
|
||||
#for chat_with
|
||||
item = gtk.MenuItem(_('using account %s') % account)
|
||||
|
|
Loading…
Reference in New Issue