From 0c9ceace11799a557fa05633fcb83cd2ef2126ee Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Sat, 8 Apr 2006 17:02:55 +0000 Subject: [PATCH] nonmodla FT request dialog --- src/dialogs.py | 9 +++++++++ src/filetransfers_window.py | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/dialogs.py b/src/dialogs.py index fc3ea64b3..2880197df 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -666,6 +666,15 @@ class ConfirmationDialog(HigDialog): gtk.MESSAGE_QUESTION, gtk.BUTTONS_OK_CANCEL, pritext, sectext, on_response_ok, on_response_cancel) self.popup() + +class NonModalConfirmationDialog(HigDialog): + '''HIG compliant non modal confirmation dialog.''' + def __init__(self, pritext, sectext='', on_response_ok = None, + on_response_cancel = None): + HigDialog.__init__(self, None, + gtk.MESSAGE_QUESTION, gtk.BUTTONS_OK_CANCEL, pritext, sectext, + on_response_ok, on_response_cancel) + self.set_modal(False) class WarningDialog(HigDialog): def __init__(self, pritext, sectext=''): diff --git a/src/filetransfers_window.py b/src/filetransfers_window.py index 738b44df7..bf22349d3 100644 --- a/src/filetransfers_window.py +++ b/src/filetransfers_window.py @@ -374,10 +374,10 @@ _('Connection with peer cannot be established.')) self.dialog.destroy() gajim.connections[account].send_file_rejection(file_props) - self.dialog = dialogs.ConfirmationDialog(prim_text, sec_text, + self.dialog = dialogs.NonModalConfirmationDialog(prim_text, sec_text, on_response_ok = (on_response_ok, account, contact, file_props), on_response_cancel = (on_response_cancel, account, file_props)) - self.dialog.run() + self.dialog.popup() def set_images(self): ''' create pixbufs for status images in transfer rows'''