Helpviewer/DownloadDialog.py

changeset 553
5af61623ae3c
parent 538
7f1a56e80124
child 564
b3d966393ba9
equal deleted inserted replaced
551:e1074b63ff08 553:5af61623ae3c
125 if not self.__toDownload: 125 if not self.__toDownload:
126 res = E5MessageBox.question(self, 126 res = E5MessageBox.question(self,
127 self.trUtf8("Downloading"), 127 self.trUtf8("Downloading"),
128 self.trUtf8("""<p>You are about to download the file <b>{0}</b>.</p>""" 128 self.trUtf8("""<p>You are about to download the file <b>{0}</b>.</p>"""
129 """<p>What do you want to do?</p>""").format(fileName), 129 """<p>What do you want to do?</p>""").format(fileName),
130 QMessageBox.StandardButtons(\ 130 E5MessageBox.StandardButtons(\
131 QMessageBox.Open | \ 131 E5MessageBox.Open | \
132 QMessageBox.Save | \ 132 E5MessageBox.Save | \
133 QMessageBox.Cancel)) 133 E5MessageBox.Cancel))
134 if res == QMessageBox.Cancel: 134 if res == E5MessageBox.Cancel:
135 self.__stop() 135 self.__stop()
136 self.close() 136 self.close()
137 return False 137 return False
138 138
139 self.__autoOpen = res == QMessageBox.Open 139 self.__autoOpen = res == E5MessageBox.Open
140 fileName = QDesktopServices.storageLocation(QDesktopServices.TempLocation) + \ 140 fileName = QDesktopServices.storageLocation(QDesktopServices.TempLocation) + \
141 '/' + QFileInfo(fileName).completeBaseName() 141 '/' + QFileInfo(fileName).completeBaseName()
142 142
143 if not self.__autoOpen and self.__requestFilename: 143 if not self.__autoOpen and self.__requestFilename:
144 fileName = QFileDialog.getSaveFileName( 144 fileName = QFileDialog.getSaveFileName(

eric ide

mercurial