summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-05-27 14:10:37 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-05-27 14:10:37 (GMT)
commit31fa845c013a4fe607bf44c60a9576d994e02f5f (patch)
treecafed770730900c4e123aa423d23dc34111115a3
parent68dcd34c0a71d3b2a792d6b69a096de49de7cfd2 (diff)
downloadcpython-31fa845c013a4fe607bf44c60a9576d994e02f5f.zip
cpython-31fa845c013a4fe607bf44c60a9576d994e02f5f.tar.gz
cpython-31fa845c013a4fe607bf44c60a9576d994e02f5f.tar.bz2
Added Help menu. Fixes #731635
-rwxr-xr-xMac/Tools/IDE/PackageManager.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/Mac/Tools/IDE/PackageManager.py b/Mac/Tools/IDE/PackageManager.py
index 1bd9d85..46e7be8 100755
--- a/Mac/Tools/IDE/PackageManager.py
+++ b/Mac/Tools/IDE/PackageManager.py
@@ -110,11 +110,23 @@ class PackageManagerMain(Wapplication.Application):
self.openwindowsmenu = Wapplication.Menu(self.menubar, 'Windows')
self.makeopenwindowsmenu()
+ self.makehelpmenu()
self._menustocheck = [closeitem,
undoitem, cutitem, copyitem, pasteitem,
selallitem,
runitem, homepageitem]
+ def makehelpmenu(self):
+ python_app = os.path.join(sys.prefix, 'Resources/Python.app')
+ help_source = os.path.join(python_app, 'Contents/Resources/English.lproj/Documentation')
+ hashelp = os.path.isdir(help_source)
+
+ self.helpmenu = m = self.gethelpmenu()
+ helpitem1 = FrameWork.MenuItem(m, "PackageManager Help", None, self.domenu_packmanhelp)
+ helpitem1.enable(hashelp)
+ helpitem2 = FrameWork.MenuItem(m, "MacPython Help", None, self.domenu_pythonhelp)
+ helpitem2.enable(hashelp)
+
def quitevent(self, theAppleEvent, theReply):
self._quit()
@@ -198,6 +210,14 @@ class PackageManagerMain(Wapplication.Application):
def domenu_save(self, *args):
print "Save"
+ def domenu_pythonhelp(self, *args):
+ from Carbon import AH
+ AH.AHGotoPage("MacPython Help", None, None)
+
+ def domenu_packmanhelp(self, *args):
+ from Carbon import AH
+ AH.AHGotoPage("MacPython Help", "packman.html", None)
+
def _quit(self):
## import PyConsole, PyEdit
for window in self._windows.values():