Commits

Miki Tebeka committed 99cb818

View and text anchor

Comments (0)

Files changed (1)

 from os.path import isdir, isfile
 from os import makedirs
 from itertools import count
+import webbrowser
+from threading import Thread
+
 import Tkinter as tk
 from tkFileDialog import askopenfilename, askdirectory
 from tkMessageBox import showerror
-from threading import Thread
 
 def subfn(match):
     return match.group(1).decode("base64")
     out.grid(row=1, column=1, sticky=tk.W+tk.E)
     tk.Button(root, text="...", command=askdir(out)).grid(row=1, column=2)
     tk.Label(root, text="Progress:").grid(row=2, sticky=tk.W)
-    progress = tk.Label(root, text="", width=40)
+    progress = tk.Label(root, text="", width=40, anchor=tk.W)
     progress.grid(row=2, column=1, columnspan=2, sticky=tk.W+tk.E)
 
     def log(message):
         t.daemon = 1
         t.start()
 
+    def view():
+        webbrowser.open("%s/index.html" % out.get().strip())
+
     tk.Button(root, text="Salvage", command=go).grid(row=3)
-    tk.Button(root, text="Quit", command=root.quit).grid(row=3, column=1)
+    tk.Button(root, text="View", command=view).grid(row=3, column=1)
+    tk.Button(root, text="Quit", command=root.quit).grid(row=3, column=2)
 
     root.columnconfigure(1, weight=1)
     root.mainloop()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.