do not use a second loop to print dialogs (do not use run)
This commit is contained in:
parent
b592f60c45
commit
6ed0c6d097
|
@ -489,33 +489,39 @@ class confirm_dialog:
|
||||||
|
|
||||||
class warning_dialog:
|
class warning_dialog:
|
||||||
"""Class for warning dialog"""
|
"""Class for warning dialog"""
|
||||||
|
def on_response(self, dialog, response_id):
|
||||||
|
dialog.destroy()
|
||||||
|
|
||||||
def __init__(self, label):
|
def __init__(self, label):
|
||||||
dialog = gtk.MessageDialog(None,\
|
dialog = gtk.MessageDialog(None,\
|
||||||
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,\
|
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,\
|
||||||
gtk.MESSAGE_WARNING, gtk.BUTTONS_CLOSE, label)
|
gtk.MESSAGE_WARNING, gtk.BUTTONS_CLOSE, label)
|
||||||
|
dialog.connect('response', self.on_response)
|
||||||
dialog.run()
|
dialog.show()
|
||||||
dialog.destroy()
|
|
||||||
|
|
||||||
class information_dialog:
|
class information_dialog:
|
||||||
"""Class for information dialog"""
|
"""Class for information dialog"""
|
||||||
|
def on_response(self, dialog, response_id):
|
||||||
|
dialog.destroy()
|
||||||
|
|
||||||
def __init__(self, label):
|
def __init__(self, label):
|
||||||
dialog = gtk.MessageDialog(None,\
|
dialog = gtk.MessageDialog(None,\
|
||||||
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,\
|
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,\
|
||||||
gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, label)
|
gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, label)
|
||||||
|
dialog.connect('response', self.on_response)
|
||||||
dialog.run()
|
dialog.show()
|
||||||
dialog.destroy()
|
|
||||||
|
|
||||||
class error_dialog:
|
class error_dialog:
|
||||||
"""Class for error dialog"""
|
"""Class for error dialog"""
|
||||||
|
def on_response(self, dialog, response_id):
|
||||||
|
dialog.destroy()
|
||||||
|
|
||||||
def __init__(self, label):
|
def __init__(self, label):
|
||||||
dialog = gtk.MessageDialog(None,\
|
dialog = gtk.MessageDialog(None,\
|
||||||
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,\
|
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,\
|
||||||
gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, label)
|
gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, label)
|
||||||
|
dialog.connect('response', self.on_response)
|
||||||
dialog.run()
|
dialog.show()
|
||||||
dialog.destroy()
|
|
||||||
|
|
||||||
class subscription_request_window:
|
class subscription_request_window:
|
||||||
"""Class for authorization window :
|
"""Class for authorization window :
|
||||||
|
|
Loading…
Reference in New Issue