mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-18 19:08:24 -04:00
onionshare closes automatically (if box is checked) when download finishes. fixes #36
This commit is contained in:
parent
de0e8f9eb0
commit
86d835f291
7 changed files with 56 additions and 7 deletions
|
@ -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 ''
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue