dabo Commit
Revision 6790
Date: 2011-08-20 10:13:12 -0700 (Sat, 20 Aug 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6790

Changed:
U   trunk/dabo/dEvents.py
U   trunk/dabo/ui/uiwx/dShell.py

Log:
Added the ShellCommandRun event, which is raised whenever dShell executes a 
command in its interpreter.


Diff:
Modified: trunk/dabo/dEvents.py
===================================================================
--- trunk/dabo/dEvents.py       2011-08-19 22:38:34 UTC (rev 6789)
+++ trunk/dabo/dEvents.py       2011-08-20 17:13:12 UTC (rev 6790)
@@ -1020,3 +1020,8 @@
 class MediaStateChanged(MediaEvent):
        """Occurs when the playback status has changed from one state to 
another."""
        pass
+
+
+class ShellCommandRun(dEvent):
+       """Occurs when the dShell interpreter executes a command."""
+       pass
\ No newline at end of file

Modified: trunk/dabo/ui/uiwx/dShell.py
===================================================================
--- trunk/dabo/ui/uiwx/dShell.py        2011-08-19 22:38:34 UTC (rev 6789)
+++ trunk/dabo/ui/uiwx/dShell.py        2011-08-20 17:13:12 UTC (rev 6790)
@@ -182,6 +182,14 @@
                                # Not running in dShell
                                pass
 
+
+       def push(self, command, silent=False):
+               """Need to raise an event when the interpreter executes a 
command."""
+               super(_Shell, self).push(command, silent=silent)
+               if not self.more:
+                       self.raiseEvent(dEvents.ShellCommandRun)
+
+
        def getAutoCompleteList(self, cmd):
                return self.interp.getAutoCompleteList(cmd,
                                includeMagic=self.autoCompleteIncludeMagic,



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to