Added changelog to the help menu

This commit is contained in:
Manuel Cortez 2016-04-04 11:18:42 -05:00
parent 438a748f33
commit eda0b406c8
2 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import os
import wx
import utils
import widgetUtils
@ -6,6 +7,7 @@ import messages
import buffers
import player
import posts
import webbrowser
from pubsub import pub
from mysc.repeating_timer import RepeatingTimer
from mysc.thread_utils import call_threaded
@ -80,6 +82,7 @@ class Controller(object):
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.search_audios, menuitem=self.window.search_audios)
widgetUtils.connect_event(self.window, widgetUtils.MENU,self.remove_buffer, menuitem=self.window.remove_buffer_)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.get_more_items, menuitem=self.window.load_previous_items)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.changelog, menuitem=self.window.changelog)
def disconnect_events(self):
pub.unsubscribe(self.in_post, "posted")
@ -170,3 +173,8 @@ class Controller(object):
self.window.remove_buffer(buff)
self.buffers.remove(buffer)
del buffer
def changelog(self, *args, **kwargs):
os.chdir("documentation")
webbrowser.open("changelog.html")
os.chdir("../")

View File

@ -11,13 +11,12 @@ class mainWindow(wx.Frame):
buffer.AppendMenu(wx.NewId(), _(u"New buffer"), self.new_buffer)
self.update_buffer = buffer.Append(wx.NewId(), _(u"Update current buffer"))
self.load_previous_items = buffer.Append(wx.NewId(), _(u"Load previous items"))
self.remove_buffer_ = buffer.Append(wx.NewId(), _(u"&Remove buffer"))
mb.Append(buffer, _(u"Buffer"))
help_ = wx.Menu()
self.about = help_.Append(wx.NewId(), _(u"About {0}").format(application.name,))
self.check_for_updates = help_.Append(wx.NewId(), _(u"Check for updates"))
self.changelog = help_.Append(wx.NewId(), _(u"Chan&gelog"))
mb.Append(help_, _(u"Help"))
self.SetMenuBar(mb)