[Python-checkins] python/dist/src/Mac/Tools/IDE PyConsole.py,1.15,1.16 PyEdit.py,1.39,1.40 PythonIDEMain.py,1.34,1.35 Wapplication.py,1.21,1.22
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Tue, 06 May 2003 07:28:35 -0700
Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE
In directory sc8-pr-cvs1:/tmp/cvs-serv28244
Modified Files:
PyConsole.py PyEdit.py PythonIDEMain.py Wapplication.py
Log Message:
Fix for #731643: allow "lookup in documentation" to also work if the
interactive window is frontmost.
Index: PyConsole.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PyConsole.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** PyConsole.py 6 Feb 2003 22:32:35 -0000 1.15
--- PyConsole.py 6 May 2003 14:28:30 -0000 1.16
***************
*** 237,241 ****
prefs.save()
!
class OutputTextWidget(W.EditText):
--- 237,243 ----
prefs.save()
! def getselectedtext(self):
! return self.consoletext.getselectedtext()
!
class OutputTextWidget(W.EditText):
Index: PyEdit.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PyEdit.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** PyEdit.py 25 Feb 2003 15:08:01 -0000 1.39
--- PyEdit.py 6 May 2003 14:28:31 -0000 1.40
***************
*** 169,172 ****
--- 169,175 ----
def setselection(self, selstart, selend):
self.editgroup.editor.setselection(selstart, selend)
+
+ def getselectedtext(self):
+ return self.editgroup.editor.getselectedtext()
def getfilename(self):
Index: PythonIDEMain.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PythonIDEMain.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** PythonIDEMain.py 2 May 2003 23:40:29 -0000 1.34
--- PythonIDEMain.py 6 May 2003 14:28:31 -0000 1.35
***************
*** 415,422 ****
def _getsearchstring(self):
! import PyEdit
! editor = PyEdit.findeditor(None, fromtop=1)
! if editor:
! text = editor.getselectedtext()
if text:
return text
--- 415,422 ----
def _getsearchstring(self):
! # First we get the frontmost window
! front = self.getfrontwindow()
! if front and hasattr(front, 'getselectedtext'):
! text = front.getselectedtext()
if text:
return text
Index: Wapplication.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/Wapplication.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Wapplication.py 6 Feb 2003 22:32:35 -0000 1.21
--- Wapplication.py 6 May 2003 14:28:31 -0000 1.22
***************
*** 132,135 ****
--- 132,141 ----
apply(handler, args)
return 1
+
+ def getfrontwindow(self):
+ wid = MyFrontWindow()
+ if wid and self._windows.has_key(wid):
+ return self._windows[wid]
+ return None
def appendwindow(self, wid, window):