Skip to content

Commit

Permalink
Feat(wx/books): Add menu command Save
Browse files Browse the repository at this point in the history
Work around a problem the grid closes up the download button.
  • Loading branch information
phdru committed Feb 5, 2024
1 parent 682b34d commit 2b4fe65
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions m_librarian/wx/ListBooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,15 @@ class ListBooksWindow(GridWindow):
session_config_section_name = 'list_books'
window_title = u"m_Librarian: Список книг"
GridPanelClass = ListBooksPanel

def InitMenu(self):
GridWindow.InitMenu(self)

download_menu = wx.Menu()
download = download_menu.Append(wx.ID_SAVE,
u"&Скачать", u"Скачать")
self.Bind(wx.EVT_MENU, self.OnDownload, download)
self.GetMenuBar().Append(download_menu, u"&Скачать")

def OnDownload(self, event):
self.panel.Download(None)

0 comments on commit 2b4fe65

Please sign in to comment.