dabo Commit
Revision 6885
Date: 2011-10-04 14:42:25 -0700 (Tue, 04 Oct 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6885

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

Log:
Added a dropped file handler for the shell.

Diff:
Modified: trunk/dabo/ui/uiwx/dShell.py
===================================================================
--- trunk/dabo/ui/uiwx/dShell.py        2011-10-04 19:40:03 UTC (rev 6884)
+++ trunk/dabo/ui/uiwx/dShell.py        2011-10-04 21:42:25 UTC (rev 6885)
@@ -400,7 +400,7 @@
                self.pgCode.Caption = _("Code")
                cp.Sizer.append1x(pgf)
 
-               self.shell = _Shell(self.pgShell)
+               self.shell = _Shell(self.pgShell, DroppedTextHandler=self, 
DroppedFileHandler=self)
                self.pgShell.Sizer.append1x(self.shell, border=4)
                # Configure the shell's behavior
                self.shell.AutoCompSetIgnoreCase(True)
@@ -524,7 +524,10 @@
                """
                if len(filelist) > 1:
                        dabo.ui.exclaim(_("Only one file can be dropped at a 
time"))
-               self.edtCode.Value = file(filelist[0]).read()
+               if self.pgfCodeShell.SelectedPage == self.pgShell:
+                       self.shell.AddText(filelist[0])
+               else:
+                       self.edtCode.Value = file(filelist[0]).read()
 
 
        def processDroppedText(self, txt):



_______________________________________________
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