From d3e6e221662eb9724e8f853d913e9e66c2e02ae3 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 30 Nov 2013 10:33:04 +0100 Subject: [PATCH] [Dicson] Do not display dialog confirm_metacontacts when using Make CONTACT first contact. Fixes #7576 --- src/roster_window.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 4bf166e76..c5475f5aa 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -4571,8 +4571,12 @@ class RosterWindow: self.draw_account(account_source) context.finish(True, True, etime) + dest_family = gajim.contacts.get_metacontacts_family(account_dest, + c_dest.jid) + source_family = gajim.contacts.get_metacontacts_family(account_source, + c_source.jid) confirm_metacontacts = gajim.config.get('confirm_metacontacts') - if confirm_metacontacts == 'no': + if confirm_metacontacts == 'no' or dest_family == source_family: merge_contacts() return pritext = _('You are about to create a metacontact. Are you sure you ' @@ -4846,8 +4850,9 @@ class RosterWindow: # c_dest is None if jid_dest doesn't belong to account return menu = Gtk.Menu() - item = Gtk.MenuItem(_('Send %s to %s') % (c_source.get_shown_name(), - c_dest.get_shown_name())) + item = Gtk.MenuItem(_('Send %s to %s') % ( + c_source.get_shown_name(), c_dest.get_shown_name()), + use_underline=False) item.connect('activate', self.on_drop_rosterx, account_source, c_source, account_dest, c_dest, is_big_brother, context, etime) menu.append(item) @@ -4858,10 +4863,11 @@ class RosterWindow: account_source, c_source.jid) if dest_family == source_family and dest_family: item = Gtk.MenuItem(_('Make %s first contact') % ( - c_source.get_shown_name())) + c_source.get_shown_name()), use_underline=False) else: item = Gtk.MenuItem(_('Make %s and %s metacontacts') % ( - c_source.get_shown_name(), c_dest.get_shown_name())) + c_source.get_shown_name(), c_dest.get_shown_name()), + use_underline=False) item.connect('activate', self.on_drop_in_contact, account_source, c_source, account_dest, c_dest, is_big_brother, context, etime)