fix E2E / GPG information dialog and another information dialog transient_for property. Fixes #7185

This commit is contained in:
Yann Leboulanger 2013-09-09 17:36:21 +02:00
parent 0df292620b
commit fa6d3c16dd
3 changed files with 7 additions and 5 deletions

View File

@ -2349,9 +2349,9 @@ class ChatControl(ChatControlBase):
def _on_authentication_button_clicked(self, widget):
if self.gpg_is_active:
dialogs.GPGInfoWindow(self)
dialogs.GPGInfoWindow(self, self.parent_win.window)
elif self.session and self.session.enable_encryption:
dialogs.ESessionInfoWindow(self.session)
dialogs.ESessionInfoWindow(self.session, self.parent_win.window)
def send_message(self, message, keyID='', chatstate=None, xhtml=None,
process_commands=True, attention=False):

View File

@ -5147,7 +5147,7 @@ class ESessionInfoWindow:
"""
Class for displaying information about a XEP-0116 encrypted session
"""
def __init__(self, session):
def __init__(self, session, transient_for=None):
self.session = session
self.xml = gtkgui_helpers.get_gtk_builder('esession_info_window.ui')
@ -5158,7 +5158,7 @@ class ESessionInfoWindow:
self.button_label = self.xml.get_object('button_label')
self.window = self.xml.get_object('esession_info_window')
self.update_info()
self.window.set_transient_for(transient_for)
self.window.show_all()
@ -5269,6 +5269,7 @@ class GPGInfoWindow:
path = gtkgui_helpers.get_icon_path(image, 32)
security_image.set_from_file(path)
self.window.set_transient_for(transient_for)
xml.connect_signals(self)
self.window.show_all()

View File

@ -221,7 +221,8 @@ class MessageWindow(object):
dialogs.YesNoDialog(
_('You are going to close several tabs'),
_('Do you really want to close them all?'),
checktext=_('_Do not ask me again'), on_response_yes=on_yes1)
checktext=_('_Do not ask me again'), on_response_yes=on_yes1,
transient_for=self.window)
return True
def on_yes(ctrl):