Project/ProjectResourcesBrowser.py

changeset 536
6d8d39753c82
parent 501
5c615a85241a
child 537
72b32daeb8d6
equal deleted inserted replaced
535:4b00d7336e19 536:6d8d39753c82
11 11
12 from PyQt4.QtCore import * 12 from PyQt4.QtCore import *
13 from PyQt4.QtGui import * 13 from PyQt4.QtGui import *
14 14
15 from E5Gui.E5Application import e5App 15 from E5Gui.E5Application import e5App
16 from E5Gui import E5MessageBox
16 17
17 from .ProjectBrowserModel import ProjectBrowserFileItem, \ 18 from .ProjectBrowserModel import ProjectBrowserFileItem, \
18 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \ 19 ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \
19 ProjectBrowserResourceType 20 ProjectBrowserResourceType
20 from .ProjectBaseBrowser import ProjectBaseBrowser 21 from .ProjectBaseBrowser import ProjectBaseBrowser
519 f.write(line + "\n") 520 f.write(line + "\n")
520 f.close() 521 f.close()
521 if self.compiledFile not in self.project.pdata["SOURCES"]: 522 if self.compiledFile not in self.project.pdata["SOURCES"]:
522 self.project.appendFile(ofn) 523 self.project.appendFile(ofn)
523 if not self.noDialog: 524 if not self.noDialog:
524 QMessageBox.information(None, 525 E5MessageBox.information(self,
525 self.trUtf8("Resource Compilation"), 526 self.trUtf8("Resource Compilation"),
526 self.trUtf8("The compilation of the resource file" 527 self.trUtf8("The compilation of the resource file"
527 " was successful.")) 528 " was successful."))
528 except IOError as msg: 529 except IOError as msg:
529 if not self.noDialog: 530 if not self.noDialog:
530 QMessageBox.information(None, 531 E5MessageBox.information(self,
531 self.trUtf8("Resource Compilation"), 532 self.trUtf8("Resource Compilation"),
532 self.trUtf8("<p>The compilation of the resource file failed.</p>" 533 self.trUtf8("<p>The compilation of the resource file failed.</p>"
533 "<p>Reason: {0}</p>").format(str(msg))) 534 "<p>Reason: {0}</p>").format(str(msg)))
534 else: 535 else:
535 if not self.noDialog: 536 if not self.noDialog:
536 QMessageBox.information(None, 537 E5MessageBox.information(self,
537 self.trUtf8("Resource Compilation"), 538 self.trUtf8("Resource Compilation"),
538 self.trUtf8("The compilation of the resource file failed.")) 539 self.trUtf8("The compilation of the resource file failed."))
539 self.compileProc = None 540 self.compileProc = None
540 541
541 def __compileQRC(self, fn, noDialog = False, progress = None): 542 def __compileQRC(self, fn, noDialog = False, progress = None):

eric ide

mercurial