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