[commit-gajim] r11207 - trunk/src
asterix at gajim.org
asterix at gajim.org
Tue Apr 7 13:08:12 CEST 2009
Author: asterix
Date: 2009-04-07 13:08:12 +0200 (Tue, 07 Apr 2009)
New Revision: 11207
Modified:
trunk/src/groupchat_control.py
Log:
don't show "file-send-real-jid-is-known-warning" dialog when contact is known. see #3948
Modified: trunk/src/groupchat_control.py
===================================================================
--- trunk/src/groupchat_control.py 2009-04-06 21:42:09 UTC (rev 11206)
+++ trunk/src/groupchat_control.py 2009-04-07 11:08:12 UTC (rev 11207)
@@ -1010,15 +1010,18 @@
self_contact = gajim.contacts.get_gc_contact(self.account, self.room_jid,
self.nick)
if self.is_anonymous and gc_contact.affiliation not in ['admin', 'owner']\
- and self_contact.affiliation in ['admin', 'owner']:
- prim_text = _('Really send file?')
- sec_text = _('If you send a file to %s, he/she will know your real '
- 'Jabber ID.') % gc_contact.name
- dialog = dialogs.NonModalConfirmationDialog(prim_text, sec_text,
- on_response_ok = (_on_send_files, gc_contact))
- dialog.popup()
- else:
- _on_send_files(gc_contact)
+ and self_contact.affiliation in ['admin', 'owner'] and \
+ gc_contact.jid not in gajim.contacts.get_jid_list(self.account):
+ contact = gajim.contacts.get_contact(self.account, gc_contact.jid)
+ if not contact or contact.sub not in ('both', 'to'):
+ prim_text = _('Really send file?')
+ sec_text = _('If you send a file to %s, he/she will know your real '
+ 'Jabber ID.') % gc_contact.name
+ dialog = dialogs.NonModalConfirmationDialog(prim_text, sec_text,
+ on_response_ok = (_on_send_files, gc_contact))
+ dialog.popup()
+ return
+ _on_send_files(gc_contact)
def draw_contact(self, nick, selected=False, focus=False):
iter_ = self.get_contact_iter(nick)
More information about the Commits
mailing list