eric6/Project/ProjectResourcesBrowser.py

changeset 7955
567f2ec958c3
parent 7923
91e843545d9a
child 7959
44e15eda6506
--- a/eric6/Project/ProjectResourcesBrowser.py	Mon Jan 04 16:39:09 2021 +0100
+++ b/eric6/Project/ProjectResourcesBrowser.py	Mon Jan 04 16:39:37 2021 +0100
@@ -606,18 +606,11 @@
                         f.write(line + "\n")
                 if self.compiledFile not in self.project.pdata["SOURCES"]:
                     self.project.appendFile(ofn)
-                if not self.noDialog and not ui.notificationsEnabled():
-                    E5MessageBox.information(
-                        self,
-                        self.tr("Resource Compilation"),
-                        self.tr("The compilation of the resource file"
-                                " was successful."))
-                else:
-                    ui.showNotification(
-                        UI.PixmapCache.getPixmap("resourcesCompiler48"),
-                        self.tr("Resource Compilation"),
-                        self.tr("The compilation of the resource file"
-                                " was successful."))
+                ui.showNotification(
+                    UI.PixmapCache.getPixmap("resourcesCompiler48"),
+                    self.tr("Resource Compilation"),
+                    self.tr("The compilation of the resource file"
+                            " was successful."))
             except OSError as msg:
                 if not self.noDialog:
                     E5MessageBox.information(
@@ -627,18 +620,12 @@
                             "<p>The compilation of the resource file"
                             " failed.</p><p>Reason: {0}</p>").format(str(msg)))
         else:
-            if not self.noDialog:
-                E5MessageBox.information(
-                    self,
-                    self.tr("Resource Compilation"),
-                    self.tr(
-                        "The compilation of the resource file failed."))
-            else:
-                ui.showNotification(
-                    UI.PixmapCache.getPixmap("resourcesCompiler48"),
-                    self.tr("Resource Compilation"),
-                    self.tr(
-                        "The compilation of the resource file failed."))
+            ui.showNotification(
+                UI.PixmapCache.getPixmap("resourcesCompiler48"),
+                self.tr("Resource Compilation"),
+                self.tr(
+                    "The compilation of the resource file failed."),
+                timeout=0)
         self.compileProc = None
         
     def __compileQRC(self, fn, noDialog=False, progress=None):

eric ide

mercurial