nonmodla FT request dialog
This commit is contained in:
parent
481c08560f
commit
0c9ceace11
|
@ -666,6 +666,15 @@ class ConfirmationDialog(HigDialog):
|
||||||
gtk.MESSAGE_QUESTION, gtk.BUTTONS_OK_CANCEL, pritext, sectext,
|
gtk.MESSAGE_QUESTION, gtk.BUTTONS_OK_CANCEL, pritext, sectext,
|
||||||
on_response_ok, on_response_cancel)
|
on_response_ok, on_response_cancel)
|
||||||
self.popup()
|
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):
|
class WarningDialog(HigDialog):
|
||||||
def __init__(self, pritext, sectext=''):
|
def __init__(self, pritext, sectext=''):
|
||||||
|
|
|
@ -374,10 +374,10 @@ _('Connection with peer cannot be established.'))
|
||||||
self.dialog.destroy()
|
self.dialog.destroy()
|
||||||
gajim.connections[account].send_file_rejection(file_props)
|
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_ok = (on_response_ok, account, contact, file_props),
|
||||||
on_response_cancel = (on_response_cancel, account, file_props))
|
on_response_cancel = (on_response_cancel, account, file_props))
|
||||||
self.dialog.run()
|
self.dialog.popup()
|
||||||
|
|
||||||
def set_images(self):
|
def set_images(self):
|
||||||
''' create pixbufs for status images in transfer rows'''
|
''' create pixbufs for status images in transfer rows'''
|
||||||
|
|
Loading…
Reference in New Issue