##// END OF EJS Templates
Fix picking.
walter.doerwald -
Show More
@@ -420,10 +420,10 b' class IGridGrid(wx.grid.Grid):'
420 elif keycode == ord("C") and sh:
420 elif keycode == ord("C") and sh:
421 col = self.GetGridCursorCol()
421 col = self.GetGridCursorCol()
422 attr = self.table._displayattrs[col]
422 attr = self.table._displayattrs[col]
423 returnobj = []
423 result = []
424 for i in xrange(self.GetNumberRows()):
424 for i in xrange(self.GetNumberRows()):
425 returnobj.append(self.table._displayattrs[col].value(self.table.items[i]))
425 result.append(self.table._displayattrs[col].value(self.table.items[i]))
426 self.quit(returnobj)
426 self.quit(result)
427 elif keycode in (wx.WXK_ESCAPE, ord("Q")) and not (ctrl or sh):
427 elif keycode in (wx.WXK_ESCAPE, ord("Q")) and not (ctrl or sh):
428 self.quit()
428 self.quit()
429 elif keycode == ord("<"):
429 elif keycode == ord("<"):
@@ -568,14 +568,14 b' class IGridGrid(wx.grid.Grid):'
568 attrs = [ipipe.AttributeDetail(item, attr) for attr in ipipe.xattrs(item, "detail")]
568 attrs = [ipipe.AttributeDetail(item, attr) for attr in ipipe.xattrs(item, "detail")]
569 self._doenter(attrs)
569 self._doenter(attrs)
570
570
571 def quit(self, returnobj=None):
571 def quit(self, result=None):
572 """
572 """
573 quit
573 quit
574 """
574 """
575 frame = self.GetParent().GetParent().GetParent()
575 frame = self.GetParent().GetParent().GetParent()
576 if frame.helpdialog:
576 if frame.helpdialog:
577 frame.helpdialog.Destroy()
577 frame.helpdialog.Destroy()
578 frame.parent.returnobj = returnobj
578 frame.parent.result = result
579 frame.Close()
579 frame.Close()
580 frame.Destroy()
580 frame.Destroy()
581
581
@@ -783,6 +783,7 b' class IGridFrame(wx.Frame):'
783 class App(wx.App):
783 class App(wx.App):
784 def __init__(self, input):
784 def __init__(self, input):
785 self.input = input
785 self.input = input
786 self.result = None # Result to be returned to IPython. Set by quit().
786 wx.App.__init__(self)
787 wx.App.__init__(self)
787
788
788 def OnInit(self):
789 def OnInit(self):
@@ -799,7 +800,6 b' class igrid(ipipe.Display):'
799 (which is curses-based) or ``idump`` (which simply does a print).
800 (which is curses-based) or ``idump`` (which simply does a print).
800 """
801 """
801 def display(self):
802 def display(self):
802 self.returnobj = None
803 app = App(self.input)
803 app = App(self.input)
804 app.MainLoop()
804 app.MainLoop()
805 return self.returnobj
805 return app.result
@@ -1,3 +1,7 b''
1 2007-03-24 Walter Doerwald <walter@livinglogic.de>
2
3 * IPython/Extensions/igrid.py: Fix picking.
4
1 2007-03-23 Walter Doerwald <walter@livinglogic.de>
5 2007-03-23 Walter Doerwald <walter@livinglogic.de>
2
6
3 * IPython/Extensions/path.py: Updated to version 2.2.
7 * IPython/Extensions/path.py: Updated to version 2.2.
General Comments 0
You need to be logged in to leave comments. Login now