nonmodla FT request dialog

This commit is contained in:
Dimitur Kirov 2006-04-08 17:02:55 +00:00
parent 481c08560f
commit 0c9ceace11
2 changed files with 11 additions and 2 deletions

View File

@ -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=''):

View File

@ -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'''