mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 20:53:13 -06:00
enable documentation in the help menu
This commit is contained in:
parent
9cab1d2afc
commit
49c3eb37cb
@ -35,6 +35,8 @@ import pygeocoder
|
||||
from pygeolib import GeocoderError
|
||||
import logging
|
||||
import webbrowser
|
||||
from mysc import localization
|
||||
import os
|
||||
|
||||
log = logging.getLogger("mainController")
|
||||
|
||||
@ -165,6 +167,7 @@ class Controller(object):
|
||||
if widgetUtils.toolkit == "wx":
|
||||
widgetUtils.connect_event(self.view.nb, widgetUtils.NOTEBOOK_PAGE_CHANGED, self.buffer_changed)
|
||||
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.report_error, self.view.reportError)
|
||||
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.view_documentation, self.view.doc)
|
||||
|
||||
def set_systray_icon(self):
|
||||
self.systrayIcon = sysTrayIcon.SysTrayIcon()
|
||||
@ -1315,5 +1318,11 @@ class Controller(object):
|
||||
buffer.session.settings["other_buffers"]["muted_buffers"].remove(buffer.name)
|
||||
output.speak(_(u"Buffer mute off"), True)
|
||||
|
||||
def view_documentation(self, *args, **kwargs):
|
||||
lang = localization.get("documentation")
|
||||
os.chdir("documentation/%s" % (lang,))
|
||||
webbrowser.open("manual.html")
|
||||
os.chdir("../../")
|
||||
|
||||
def __del__(self):
|
||||
config.app.write()
|
||||
|
@ -61,7 +61,6 @@ class mainFrame(wx.Frame):
|
||||
# Help Menu
|
||||
help = wx.Menu()
|
||||
self.doc = help.Append(-1, _(u"&Documentation"))
|
||||
self.doc.Enable(False)
|
||||
self.sounds_tutorial = help.Append(wx.NewId(), _(u"Sounds &tutorial"))
|
||||
self.changelog = help.Append(wx.NewId(), _(u"&What's new in this version?"))
|
||||
self.changelog.Enable(False)
|
||||
|
Loading…
Reference in New Issue
Block a user