[hdf-compass] 165/295: Add 'Online manual' menu item to 'Help' menu

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun May 8 10:35:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository hdf-compass.

commit 4d36bc470c051079a5b1bea8c9b66061923134bd
Author: giumas <giumas at yahoo.it>
Date:   Tue Oct 20 21:12:35 2015 +0200

    Add 'Online manual' menu item to 'Help' menu
---
 README.md                           | 3 +++
 hdf_compass/compass_viewer/frame.py | 9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index a8c0b5f..019a095 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,9 @@
 HDF Compass
 ===========
 
+[![Documentation Status](https://readthedocs.org/projects/hdf-compass/badge/?version=stable)](http://hdf-compass.readthedocs.org/en/stable/?badge=stable)
+[![Documentation Status](https://readthedocs.org/projects/hdf-compass/badge/?version=latest)](http://hdf-compass.readthedocs.org/en/latest/?badge=latest)
+
 Welcome to the project!  HDF Compass is an experimental viewer program for
 HDF5 and related formats, designed to complement other more complex
 applications like HDFView.  Strong emphasis is placed on clean minimal design,
diff --git a/hdf_compass/compass_viewer/frame.py b/hdf_compass/compass_viewer/frame.py
index c5b758f..ea5d505 100644
--- a/hdf_compass/compass_viewer/frame.py
+++ b/hdf_compass/compass_viewer/frame.py
@@ -105,7 +105,8 @@ class BaseFrame(wx.Frame):
         # Help menu; note that on the Mac, the About entry is automatically
         # moved to the main application menu by wxPython.
         help_menu = wx.Menu()
-        help_menu.Append(wx.ID_ABOUT, "&About HDFCompass"," Information about this program")
+        help_menu.Append(wx.ID_HELP, "Online &Manual", "Open online documentation")
+        help_menu.Append(wx.ID_ABOUT, "&About HDFCompass", "Information about this program")
         menubar.Append(help_menu, "&Help")
 
         self.SetMenuBar(menubar)
@@ -113,6 +114,7 @@ class BaseFrame(wx.Frame):
         self.Bind(wx.EVT_MENU, self.on_window_close, id=wx.ID_CLOSE)
         self.Bind(wx.EVT_MENU, self.on_file_open, id=wx.ID_OPEN)
         self.Bind(wx.EVT_MENU, self.on_resource_open, id=ID_OPEN_RESOURCE)
+        self.Bind(wx.EVT_MENU, self.on_manual, id=wx.ID_HELP)
         self.Bind(wx.EVT_MENU, self.on_about, id=wx.ID_ABOUT)
         self.Bind(wx.EVT_MENU, self.on_exit, id=wx.ID_EXIT)
         self.Bind(wx.EVT_MENU_RANGE, self.on_url_history, id=wx.ID_FILE1, id2=wx.ID_FILE9)
@@ -121,6 +123,11 @@ class BaseFrame(wx.Frame):
         """ Called on "exit" event from the menu """
         wx.GetApp().Exit()
 
+    def on_manual(self, evt):
+        """ Open the url with the online documentation """
+        import webbrowser
+        webbrowser.open('http://hdf-compass.readthedocs.org/en/stable/')
+
     def on_about(self, evt):
         """ Display an "About" dialog """
         info = wx.AboutDialogInfo()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/hdf-compass.git



More information about the debian-science-commits mailing list