Helpviewer/GreaseMonkey/GreaseMonkeyAddScriptDialog.py

changeset 2192
61b3849df76d
parent 1953
26aa6fd94dc2
child 2302
f29e9405c851
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyAddScriptDialog.py	Sun Nov 04 17:39:08 2012 +0100
+++ b/Helpviewer/GreaseMonkey/GreaseMonkeyAddScriptDialog.py	Mon Nov 05 16:55:16 2012 +0100
@@ -20,6 +20,7 @@
 from QScintilla.MiniEditor import MiniEditor
 
 from Helpviewer import HelpUtilities
+import Helpviewer.HelpWindow
 
 import UI.PixmapCache
 
@@ -82,9 +83,17 @@
         if self.__manager.addScript(self.__script):
             msg = self.trUtf8("<p><b>{0}</b> installed successfully.</p>").format(
                 self.__script.name())
+            success = True
         else:
             msg = self.trUtf8("<p>Cannot install script.</p>")
+            success = False
         
-        E5MessageBox.information(self,
-            self.trUtf8("GreaseMonkey Script Installation"),
-            msg)
+        if success and Helpviewer.HelpWindow.HelpWindow.notificationsEnabled():
+            Helpviewer.HelpWindow.HelpWindow.showNotification(
+                UI.PixmapCache.getPixmap("greaseMonkey48.png"),
+                self.trUtf8("GreaseMonkey Script Installation"),
+                msg)
+        else:
+            E5MessageBox.information(self,
+                self.trUtf8("GreaseMonkey Script Installation"),
+                msg)

eric ide

mercurial