python: Show call no in image window.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 25 Mar 2009 15:36:51 +0000 (15:36 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 25 Mar 2009 21:04:17 +0000 (21:04 +0000)
src/gallium/state_trackers/python/retrace/interpreter.py

index 6aaea2d65da02fc6f7c43cf8d9ead555bf13b321..a22314d2000cc5a12c05f61e05145ed5f3e230cb 100755 (executable)
@@ -54,14 +54,14 @@ def save_image(filename, surface):
     outimage = make_image(surface)
     outimage.save(filename, "PNG")
 
-def show_image(surface):
+def show_image(surface, title):
     outimage = make_image(surface)
     
     import Tkinter as tk
     from PIL import Image, ImageTk
     root = tk.Tk()
     
-    root.title('background image')
+    root.title(title)
     
     image1 = ImageTk.PhotoImage(outimage)
     w = image1.width()
@@ -609,7 +609,8 @@ class Interpreter(parser.TraceDumper):
             filename = '%s_%04u.png' % (description, self.call_no)
             save_image(filename, surface)
         else:
-            show_image(surface)
+            title = '%u. %s' % (self.call_no, description)
+            show_image(surface, title)
     
 
 class Main(parser.Main):