onionshare closes automatically (if box is checked) when download finishes. fixes #36

This commit is contained in:
Micah Lee 2014-06-11 20:53:19 -04:00
parent de0e8f9eb0
commit 86d835f291
7 changed files with 56 additions and 7 deletions

View file

@ -1,10 +1,11 @@
from flask import Flask, render_template
import threading, json, os, gtk
import threading, json, os, gtk, gobject
onionshare = None
onionshare_port = None
filename = None
onion_host = None
window = None
clipboard = gtk.clipboard_get(gtk.gdk.SELECTION_CLIPBOARD)
url = None
@ -66,3 +67,9 @@ def check_for_requests():
return json.dumps(events)
@app.route("/close")
def close():
global window
gobject.timeout_add(1000, window.destroy)
return ''