diff --git a/src/common/zeroconf/zeroconf.py b/src/common/zeroconf/zeroconf.py index f8c4da099fa84340d2957a36378f879f42423fb6..a487f66c4a92768ec884118e25cd16bef179510c 100755 --- a/src/common/zeroconf/zeroconf.py +++ b/src/common/zeroconf/zeroconf.py @@ -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)' diff --git a/src/config.py b/src/config.py index b0bf35674850e8d2a8e71856f7af34b40aa8a118..10268a63b3dda77ffe0161c66f656cee3a828d0d 100644 --- a/src/config.py +++ b/src/config.py @@ -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]) diff --git a/src/roster_window.py b/src/roster_window.py index fbe5f790c09fa46e6c86b8db2a3e6afca9f7583b..d2e2fa0aaa027378beb3886dc71ea578a1eef3bc 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -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) diff --git a/src/systray.py b/src/systray.py index 607739756d10c9af47b5bff4f6ad37dbc57c5947..5134d5053b8300ee07ec0ee14823e791f5eaf63c 100644 --- a/src/systray.py +++ b/src/systray.py @@ -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)