4
(DOWNLOAD_FINISHED, CREATE_FINISHED) =range(2)
7
def ShowInfo(self, text = '', parentWindow= None):
8
dlg = gtk.MessageDialog(parentWindow, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, text)
14
def ShowError(self, text = '', parentWindow= None):
15
dlg= gtk.MessageDialog(parentWindow, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, text)
21
def ShowQuestionOkCancel(self,text, parentWindow= None):
22
dlg = gtk.MessageDialog (parentWindow, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK_CANCEL, text)
27
return (response == gtk.RESPONSE_OK)
29
def ShowQuestion(self,text, parentWindow= None):
30
dlg = gtk.MessageDialog (parentWindow, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, text)
35
return (response == gtk.RESPONSE_YES)
37
def ShowFinished(self,gladeFile,filePath):
38
a = BurnCreateMsg(gladeFile,filePath)
40
return result, a.checked()
43
def __init__(self, gladeFileName,filepath =''):
44
self.formName = "frmDownloadFinished"
45
self.filepath = filepath
46
self.gladeFile = gtk.glade.XML(gladeFileName, self.formName)
47
self.__checked = False
53
"""This function will show the aboutDialog"""
54
#Get the actual dialog widget
55
frmMsg = self.gladeFile.get_widget(self.formName)
56
frmMsg.set_position(gtk.WIN_POS_CENTER)
57
frmMsg.set_modal(True)
59
self.lblMsg = self.gladeFile.get_widget("lblMsg")
60
self.ckboxRemoveTemp = self.gladeFile.get_widget("ckboxRemoveTemp")
62
self.lblMsg.set_markup(msg.MESSAGE_0068 % self.filepath)
64
#run the dialog and store the response
67
self.__checked = self.ckboxRemoveTemp.get_active()
68
#we are done with the dialog, destory it
b'\\ No newline at end of file'