From: Oleg Broytman Date: Sun, 17 Dec 2023 17:21:04 +0000 (+0300) Subject: Feat(wx): Add dialig "About" X-Git-Tag: 0.3.0~9^2~40 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=62c3d011985f444f1200aa1fecfc9d0175caea59;p=m_librarian.git Feat(wx): Add dialig "About" [skip ci] --- diff --git a/m_librarian/wx/Application.py b/m_librarian/wx/Application.py index 35575c3..308d65d 100644 --- a/m_librarian/wx/Application.py +++ b/m_librarian/wx/Application.py @@ -1,6 +1,7 @@ # coding: utf-8 -import wx +import wx, wx.adv +from ..__version__ import __version__ class MainWindow(wx.Frame): @@ -14,9 +15,27 @@ class MainWindow(wx.Frame): self.Bind(wx.EVT_MENU, self.OnQuit, exit) MenuBar.Append(file_menu, u"&Файл") + about_menu = wx.Menu() + about = about_menu.Append(wx.ID_ABOUT, + u"&О m_Librarian", u"О m_Librarian") + self.Bind(wx.EVT_MENU, self.OnAbout, about) + MenuBar.Append(about_menu, u"&О программе") + def OnQuit(self, event): self.Close(True) + def OnAbout(self, event): + aboutInfo = wx.adv.AboutDialogInfo() + aboutInfo.SetName(u'm_Librarian') + aboutInfo.SetVersion(__version__) + aboutInfo.SetDescription( + u'Библиотекарь для библиотек LibRusEc/Flibusta') + aboutInfo.AddDeveloper(u'Олег Бройтман') + aboutInfo.SetWebSite(u'https://phdru.name/Software/Python/m_librarian/') + aboutInfo.SetCopyright(u'(C) 2023 Олег Бройтман') + aboutInfo.SetLicense(u'GPL') + wx.adv.AboutBox(aboutInfo) + class Application(wx.App):