diff options
author | Stefan Bethge <stefan@lanpartei.de> | 2006-10-12 07:22:57 +0400 |
---|---|---|
committer | Stefan Bethge <stefan@lanpartei.de> | 2006-10-12 07:22:57 +0400 |
commit | a8c0bbe7c1cc1516bfef617723d70a1e838f9a30 (patch) | |
tree | c564b1dbc60245cb0429faf00983b7e44cb8b291 /src | |
parent | 345ab7846dd36ece66b149563f3720b49eb85e80 (diff) |
fix #2555
Diffstat (limited to 'src')
-rwxr-xr-x | src/common/zeroconf/zeroconf.py | 2 | ||||
-rw-r--r-- | src/config.py | 2 | ||||
-rw-r--r-- | src/roster_window.py | 7 | ||||
-rw-r--r-- | src/systray.py | 5 |
4 files changed, 12 insertions, 4 deletions
diff --git a/src/common/zeroconf/zeroconf.py b/src/common/zeroconf/zeroconf.py index f8c4da099..a487f66c4 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 b0bf35674..10268a63b 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 fbe5f790c..d2e2fa0aa 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 607739756..5134d5053 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) |