--- a/eric7/UI/Browser.py Sat May 22 17:01:51 2021 +0200 +++ b/eric7/UI/Browser.py Sat May 22 18:51:46 2021 +0200 @@ -20,8 +20,8 @@ QLineEdit, QDialog ) -from E5Gui.E5Application import e5App -from E5Gui import E5FileDialog, E5MessageBox +from E5Gui.EricApplication import ericApp +from E5Gui import EricFileDialog, EricMessageBox from Project.ProjectBrowserModel import ProjectBrowserSimpleDirectoryItem from .BrowserModel import ( @@ -444,7 +444,7 @@ """ Protected slot to handle the selection of the goto menu. - @param act reference to the action (E5Action) + @param act reference to the action (EricAction) """ fileName, lineno = act.data() self.sourceFile[str, int].emit(fileName, lineno) @@ -529,7 +529,7 @@ if itmList: mimetype = Utilities.MimeTypes.mimeType(itmList[0].fileName()) if mimetype is None: - E5MessageBox.warning( + EricMessageBox.warning( self, QCoreApplication.translate('Browser', "Show Mime-Type"), QCoreApplication.translate( @@ -537,7 +537,7 @@ """The mime type of the file could not be""" """ determined.""")) elif mimetype.split("/")[0] == "text": - E5MessageBox.information( + EricMessageBox.information( self, QCoreApplication.translate('Browser', "Show Mime-Type"), QCoreApplication.translate( @@ -547,7 +547,7 @@ else: textMimeTypesList = Preferences.getUI("TextMimeTypes") if mimetype in textMimeTypesList: - E5MessageBox.information( + EricMessageBox.information( self, QCoreApplication.translate( 'Browser', "Show Mime-Type"), @@ -556,7 +556,7 @@ """The file has the mime type <b>{0}</b>.""") .format(mimetype)) else: - ok = E5MessageBox.yesNo( + ok = EricMessageBox.yesNo( self, QCoreApplication.translate( 'Browser', "Show Mime-Type"), @@ -644,11 +644,11 @@ """ Private slot to handle the New toplevel directory popup menu entry. """ - dname = E5FileDialog.getExistingDirectory( + dname = EricFileDialog.getExistingDirectory( None, QCoreApplication.translate('Browser', "New toplevel directory"), "", - E5FileDialog.ShowDirsOnly) + EricFileDialog.ShowDirsOnly) if dname: dname = os.path.abspath(Utilities.toNativeSeparators(dname)) self.__model.addTopLevelDir(dname) @@ -684,7 +684,7 @@ index = self.currentIndex() searchDir = self.model().item(index).dirName() - e5App().getObject("UserInterface").showFindFilesDialog( + ericApp().getObject("UserInterface").showFindFilesDialog( searchDir=searchDir) def __replaceInDirectory(self): @@ -694,7 +694,7 @@ index = self.currentIndex() searchDir = self.model().item(index).dirName() - e5App().getObject("UserInterface").showReplaceFilesDialog( + ericApp().getObject("UserInterface").showReplaceFilesDialog( searchDir=searchDir) def handleProgramChange(self, fn): @@ -870,7 +870,7 @@ if ok and bool(newName): dirpath = os.path.join(dname, newName) if os.path.exists(dirpath): - E5MessageBox.warning( + EricMessageBox.warning( self, self.tr("New Directory"), self.tr("A file or directory named <b>{0}</b> exists" @@ -880,7 +880,7 @@ try: os.mkdir(dirpath, mode=0o751) except OSError as err: - E5MessageBox.critical( + EricMessageBox.critical( self, self.tr("New Directory"), self.tr("<p>The directory <b>{0}</b> could not be" @@ -903,7 +903,7 @@ if ok and bool(fname): filepath = os.path.join(dname, fname) if os.path.exists(filepath): - E5MessageBox.warning( + EricMessageBox.warning( self, self.tr("New File"), self.tr("A file or directory named <b>{0}</b> exists" @@ -914,7 +914,7 @@ with open(filepath, "w"): pass except OSError as err: - E5MessageBox.critical( + EricMessageBox.critical( self, self.tr("New File"), self.tr("<p>The file <b>{0}</b> could not be" @@ -961,7 +961,7 @@ try: s2t(fn) except OSError as err: - E5MessageBox.critical( + EricMessageBox.critical( self.ui, self.tr("Delete File"), self.tr( @@ -1001,7 +1001,7 @@ else: shutil.rmtree(dn, True) except OSError as err: - E5MessageBox.critical( + EricMessageBox.critical( self.ui, self.tr("Delete Directory"), self.tr( @@ -1044,7 +1044,7 @@ try: s2t(fn) except OSError as err: - E5MessageBox.critical( + EricMessageBox.critical( self.ui, self.tr("Delete File"), self.tr(