mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 18:25:10 +00:00
Add "File->Save snapshot" menu item to export the displayed screen.
Change-Id: Ia0e14a768d6ba6dadd520cd7c3961759771dab08 BUG=chromium-os:12643 TEST=none Review URL: http://codereview.chromium.org/6588139
This commit is contained in:
@@ -15,6 +15,7 @@ class Frame(wx.Frame):
|
||||
m_about = menuFile.Append(wx.ID_ANY, "About...\tCtrl+A")
|
||||
menuFile.AppendSeparator()
|
||||
m_reload = menuFile.Append(wx.ID_ANY, "Reload\tCtrl+R")
|
||||
m_snapshot = menuFile.Append(wx.ID_ANY, "Save snapshot")
|
||||
m_quit = menuFile.Append(wx.ID_ANY, "Quit\tCtrl+Q")
|
||||
menuBar = wx.MenuBar()
|
||||
menuBar.Append(menuFile, "&File")
|
||||
@@ -22,6 +23,7 @@ class Frame(wx.Frame):
|
||||
self.CreateStatusBar()
|
||||
self.Bind(wx.EVT_MENU, self.OnAbout, m_about)
|
||||
self.Bind(wx.EVT_MENU, self.OnReload, m_reload)
|
||||
self.Bind(wx.EVT_MENU, self.OnSaveit, m_snapshot)
|
||||
self.Bind(wx.EVT_MENU, self.OnQuit, m_quit)
|
||||
self.Bind(wx.EVT_CLOSE, self.OnQuit)
|
||||
|
||||
@@ -78,6 +80,10 @@ class Frame(wx.Frame):
|
||||
self.do_update = True;
|
||||
self.UpdateControls()
|
||||
|
||||
def OnSaveit(self, event):
|
||||
"""Tell the model object to save the view that the user sees."""
|
||||
self.bmpblock.Saveit()
|
||||
|
||||
def OnSelected(self, event):
|
||||
"""User may have picked one of the pulldowns."""
|
||||
if event.IsSelection():
|
||||
|
||||
Reference in New Issue
Block a user