Added about dialog with some information

This commit is contained in:
Manuel Cortez 2016-03-23 08:38:18 -06:00
parent 4d7021f5cf
commit 4eebec68ab
2 changed files with 13 additions and 2 deletions

View File

@ -67,6 +67,7 @@ class Controller(object):
widgetUtils.connect_event(self.window, widgetUtils.CLOSE_EVENT, self.exit) widgetUtils.connect_event(self.window, widgetUtils.CLOSE_EVENT, self.exit)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.update_buffer, menuitem=self.window.update_buffer) widgetUtils.connect_event(self.window, widgetUtils.MENU, self.update_buffer, menuitem=self.window.update_buffer)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.check_for_updates, menuitem=self.window.check_for_updates) widgetUtils.connect_event(self.window, widgetUtils.MENU, self.check_for_updates, menuitem=self.window.check_for_updates)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.window.about_dialog, menuitem=self.window.about)
def disconnect_events(self): def disconnect_events(self):
pub.unsubscribe(self.in_post, "posted") pub.unsubscribe(self.in_post, "posted")

View File

@ -12,7 +12,6 @@ class mainWindow(wx.Frame):
mb.Append(buffer, _(u"Buffer")) mb.Append(buffer, _(u"Buffer"))
help_ = wx.Menu() help_ = wx.Menu()
self.about = help_.Append(wx.NewId(), _(u"About {0}").format(application.name,)) self.about = help_.Append(wx.NewId(), _(u"About {0}").format(application.name,))
self.about.Enable(False)
self.check_for_updates = help_.Append(wx.NewId(), _(u"Check for updates")) self.check_for_updates = help_.Append(wx.NewId(), _(u"Check for updates"))
mb.Append(help_, _(u"Help")) mb.Append(help_, _(u"Help"))
@ -78,6 +77,17 @@ class mainWindow(wx.Frame):
info.SetDescription(application.description) info.SetDescription(application.description)
info.SetCopyright(application.copyright) info.SetCopyright(application.copyright)
# info.SetTranslators(application.translators) # info.SetTranslators(application.translators)
# info.SetLicence(application.licence)
info.AddDeveloper(application.author)
wx.AboutBox(info)
def about_dialog(self, *args, **kwargs):
info = wx.AboutDialogInfo()
info.SetName(application.name)
info.SetVersion(application.version)
info.SetDescription(application.description)
info.SetCopyright(application.copyright)
# info.SetTranslators(application.translators)
# info.SetLicence(application.licence) # info.SetLicence(application.licence)
info.AddDeveloper(application.author) info.AddDeveloper(application.author)
wx.AboutBox(info) wx.AboutBox(info)