Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1267)

Unified Diff: scripts/newbitmaps/lib/pixcontrol.py

Issue 6588139: Add "File->Save snapshot" menu item to export the displayed screen. (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git@master
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/newbitmaps/lib/bmpblock.py ('k') | scripts/newbitmaps/lib/pixdisplay.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/newbitmaps/lib/pixcontrol.py
diff --git a/scripts/newbitmaps/lib/pixcontrol.py b/scripts/newbitmaps/lib/pixcontrol.py
index 1f46558e8b6aca65c066d5c38eb26d034967b0d5..5d806df5096b93bc2eb287efa46e7af921cff6fa 100755
--- a/scripts/newbitmaps/lib/pixcontrol.py
+++ b/scripts/newbitmaps/lib/pixcontrol.py
@@ -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():
« no previous file with comments | « scripts/newbitmaps/lib/bmpblock.py ('k') | scripts/newbitmaps/lib/pixdisplay.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698