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

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

Issue 6873120: Add option to bitmap_viewer to save all snapshots at once. (Closed) Base URL: ssh://gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 9 years, 8 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 | « no previous file | no next file » | 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 5d806df5096b93bc2eb287efa46e7af921cff6fa..d24e4eac1872939c7833ddfe09039d258ddcbe40 100755
--- a/scripts/newbitmaps/lib/pixcontrol.py
+++ b/scripts/newbitmaps/lib/pixcontrol.py
@@ -16,6 +16,7 @@ class Frame(wx.Frame):
menuFile.AppendSeparator()
m_reload = menuFile.Append(wx.ID_ANY, "Reload\tCtrl+R")
m_snapshot = menuFile.Append(wx.ID_ANY, "Save snapshot")
+ m_snapshotall = menuFile.Append(wx.ID_ANY, "Save snapshot of all screens")
m_quit = menuFile.Append(wx.ID_ANY, "Quit\tCtrl+Q")
menuBar = wx.MenuBar()
menuBar.Append(menuFile, "&File")
@@ -24,6 +25,7 @@ class Frame(wx.Frame):
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.OnSaveAll, m_snapshotall)
self.Bind(wx.EVT_MENU, self.OnQuit, m_quit)
self.Bind(wx.EVT_CLOSE, self.OnQuit)
@@ -106,3 +108,14 @@ class Frame(wx.Frame):
# FIXME: The model should know when to do this itself, right?
self.bmpblock.Redisplay()
self.do_update = False
+
+ def OnSaveAll(self, event=None):
+ """Save snapshots of all screens"""
+ start = self.bmpblock.current_screen
+ thinglist = self.screenlist.GetItems()
+ for thing in thinglist:
+ self.bmpblock.current_screen = thing
+ self.bmpblock.Redisplay()
+ self.bmpblock.Saveit()
+ self.bmpblock.current_screen = start
+ self.do_update = True
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698