[Idle-dev] CVS: idle EditorWindow.py,1.22,1.23

Stephen M. Gava elguavas@users.sourceforge.net
Sun, 21 Apr 2002 17:38:28 -0700


Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv3482

Modified Files:
	EditorWindow.py 
Log Message:
tracking python idle changes:
Patch #540583: Open MS Help Docs if available.



Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** EditorWindow.py	27 Mar 2002 08:40:46 -0000	1.22
--- EditorWindow.py	22 Apr 2002 00:38:26 -0000	1.23
***************
*** 326,337 ****
      if sys.platform[:3] == "win":
          fn = os.path.dirname(__file__)
!         fn = os.path.join(fn, os.pardir, os.pardir, "Doc", "index.html")
          fn = os.path.normpath(fn)
          if os.path.isfile(fn):
              help_url = fn
          del fn
! 
!     def python_docs(self, event=None):
!         self.display_docs(self.help_url)
  
      def display_docs(self, url):
--- 326,345 ----
      if sys.platform[:3] == "win":
          fn = os.path.dirname(__file__)
!         fn = os.path.join(fn, os.pardir, os.pardir, "pythlp.chm")
          fn = os.path.normpath(fn)
          if os.path.isfile(fn):
              help_url = fn
+         else:
+             fn = os.path.dirname(__file__)
+             fn = os.path.join(fn, os.pardir, os.pardir, "Doc", "index.html")
+             fn = os.path.normpath(fn)
+             if os.path.isfile(fn):
+                 help_url = fn
          del fn
!         def python_docs(self, event=None):
!             os.startfile(self.help_url)
!     else:
!         def python_docs(self, event=None):
!             self.display_docs(self.help_url)
  
      def display_docs(self, url):