Revert [8446]

This commit is contained in:
Stephan Erb 2007-08-01 15:01:43 +00:00
parent 97bb683e08
commit 4233db9459
2 changed files with 8 additions and 21 deletions

View File

@ -277,10 +277,6 @@ class Contacts:
for account in accounts:
our_jid = common.gajim.get_jid_from_account(account)
for jid in self.get_jid_list(account):
if self.has_brother(account, jid) and not \
self.is_big_brother(account, jid):
# count metacontacts only once
continue
if jid == our_jid:
continue
if common.gajim.jid_is_transport(jid) and not \
@ -374,17 +370,6 @@ class Contacts:
return True
return False
def is_big_brother(self, account, jid):
tag = self.get_metacontacts_tag(account, jid)
if tag:
family = self.get_metacontacts_family(account, jid)
bb_data = self.get_metacontacts_big_brother(family)
bb_jid = bb_data['jid']
bb_account = bb_data['account']
if bb_jid == jid and bb_account == account:
return True
return False
def get_metacontacts_jids(self, tag):
'''Returns all jid for the given tag in the form {acct: [jid1, jid2],.}'''
answers = {}

View File

@ -4713,7 +4713,6 @@ class RosterWindow:
# remove the source row
self.remove_contact(c_source, account_source)
# brother inherite big brother groups
old_groups = c_source.groups
c_source.groups = []
for g in c_dest.groups:
c_source.groups.append(g)
@ -4734,10 +4733,7 @@ class RosterWindow:
self.draw_contact(_jid, _account)
self.add_contact_to_roster(c_source.jid, account_source)
self.draw_contact(c_dest.jid, account_dest)
# FIXME: Why do groups have to be redrawn by hand?
for g in old_groups:
self.draw_group(g, account_source)
context.finish(True, True, etime)
confirm_metacontacts = gajim.config.get('confirm_metacontacts')
@ -4929,7 +4925,13 @@ class RosterWindow:
return
# Is the contact we drag a meta contact?
is_big_brother = gajim.contacts.is_big_brother(account_source, jid_source)
is_meta_contact = False
is_big_brother = False
tag = gajim.contacts.get_metacontacts_tag(account_source, jid_source)
if tag:
is_meta_contact = True
if model.iter_has_child(iter_source):
is_big_brother = True
# Contact drop on group row or between two contacts
if type_dest == 'group' or position == gtk.TREE_VIEW_DROP_BEFORE or \