src/eric7/Project/ProjectFormsBrowser.py

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9473
3f23dbf37dbe
child 9512
6e29913ba7b6
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
20 from eric7.EricGui import EricPixmapCache 20 from eric7.EricGui import EricPixmapCache
21 from eric7.EricWidgets import EricFileDialog, EricMessageBox 21 from eric7.EricWidgets import EricFileDialog, EricMessageBox
22 from eric7.EricWidgets.EricApplication import ericApp 22 from eric7.EricWidgets.EricApplication import ericApp
23 from eric7.EricWidgets.EricProgressDialog import EricProgressDialog 23 from eric7.EricWidgets.EricProgressDialog import EricProgressDialog
24 from eric7.Globals import getConfig 24 from eric7.Globals import getConfig
25 from eric7.UI.DeleteFilesConfirmationDialog import DeleteFilesConfirmationDialog
25 from eric7.UI.NotificationWidget import NotificationTypes 26 from eric7.UI.NotificationWidget import NotificationTypes
26 27
27 from .ProjectBaseBrowser import ProjectBaseBrowser 28 from .ProjectBaseBrowser import ProjectBaseBrowser
28 from .ProjectBrowserModel import ( 29 from .ProjectBrowserModel import (
29 ProjectBrowserDirectoryItem, 30 ProjectBrowserDirectoryItem,
661 fn2 = itm.fileName() 662 fn2 = itm.fileName()
662 fullNames.append(fn2) 663 fullNames.append(fn2)
663 fn = self.project.getRelativePath(fn2) 664 fn = self.project.getRelativePath(fn2)
664 files.append(fn) 665 files.append(fn)
665 666
666 from eric7.UI.DeleteFilesConfirmationDialog import DeleteFilesConfirmationDialog
667
668 dlg = DeleteFilesConfirmationDialog( 667 dlg = DeleteFilesConfirmationDialog(
669 self.parent(), 668 self.parent(),
670 self.tr("Delete forms"), 669 self.tr("Delete forms"),
671 self.tr("Do you really want to delete these forms from the project?"), 670 self.tr("Do you really want to delete these forms from the project?"),
672 files, 671 files,
896 fn = itm.fileName() 895 fn = itm.fileName()
897 896
898 if self.hooks["generateDialogCode"] is not None: 897 if self.hooks["generateDialogCode"] is not None:
899 self.hooks["generateDialogCode"](fn) 898 self.hooks["generateDialogCode"](fn)
900 else: 899 else:
901 from .CreateDialogCodeDialog import CreateDialogCodeDialog 900 from .CreateDialogCodeDialog import ( # __IGNORE_WARNING_I101__
901 CreateDialogCodeDialog,
902 )
902 903
903 # change environment 904 # change environment
904 sys.path.insert(0, self.project.getProjectPath()) 905 sys.path.insert(0, self.project.getProjectPath())
905 cwd = os.getcwd() 906 cwd = os.getcwd()
906 os.chdir(os.path.dirname(os.path.abspath(fn))) 907 os.chdir(os.path.dirname(os.path.abspath(fn)))

eric ide

mercurial