Commit Graph

139 Commits

Author SHA1 Message Date
Garrett Robinson
ea47e80f14 Add estimated time remaining to progress indicator
Estimates the time remaining for each download and displays it in the
progress bar. Waits for 10 seconds before showing the progress bar to
allow the download rate to stabilize, which prevents the estimated time
remaining from jumping all over the place at the start of the download
(a.k.a the "Windows copy dialog experience"). If your download takes
less than 10 seconds, you don't really need to see an ETA anyway.

This commit also refactors the Downloads class, splitting out the
download-specific functionality into a new Download class, providing
better encapsulation. As a result, I was able to simplify the call to
`update_download` because it was no longer necessary to pass the
`total_bytes` (which don't change after the download has begun).

Tested on Mac OS 10.9.
2015-12-23 01:05:30 -05:00
Micah Lee
4cfffbf847 Don't access self.hs when using --local-only in GUI 2015-12-04 13:19:21 -08:00
Micah Lee
f4780813d6 Decorator is expecting argument to be named slug_candidate, not shutdown_slug_candidate (#200) 2015-12-04 13:17:45 -08:00
Micah Lee
ce79633eec "Stop sharing automatically" checkbox respected in GUI when toggled before the server is started (fixes #223) 2015-11-20 13:43:19 -08:00
Micah Lee
dc58921187 Add docstrings to all classes and methods (fix #198) 2015-11-15 19:01:20 -08:00
Micah Lee
fd39f84bff Merge branch 'master' into ephemeral
Conflicts:
	onionshare/helpers.py
	onionshare/onionshare.py
2015-11-15 15:35:59 -08:00
Micah Lee
ecb8128f91 Merge pull request #217 from effigies/ctrlq
Clean up and exit on Ctrl-Q
2015-11-08 12:52:12 -08:00
Micah Lee
d67ca2c406 Merge pull request #207 from lazlolazlolazlo/docstrings
Add some missing docstrings.
2015-11-08 12:44:30 -08:00
Christopher J. Markiewicz
89c363d247 Clean up and exit on Ctrl-Q 2015-11-06 20:43:37 -05:00
Micah Lee
55c4c0fac1 Updated onionshare-gui to support ephemeral hidden services 2015-09-08 18:12:24 -07:00
Micah Lee
bbee1599c5 Updated copyright year to 2015 2015-09-07 21:48:49 -07:00
Micah Lee
5d37d9b7b2 Removed all of the Tails-specific code. If we use ephemeral hidden services, we no longer need to touch the filesystem, and hopefully no longer need root in Tails. 2015-09-07 21:44:29 -07:00
Lazlo Westerhof
7446cee655 Fix some codestyle issues according to pep8. 2015-06-26 19:38:22 +02:00
Lazlo Westerhof
7fada800f3 Add some missing docstrings. 2015-06-25 21:55:29 +02:00
Micah Lee
19fac71a3e figure out the osx_resource_dir only once, to fix issue with cli version in OSX 2015-06-16 14:30:09 -07:00
Micah Lee
3073ec8a76 must load the window_icon before validation, because alert() requires it 2015-06-16 10:54:18 -07:00
Micah Lee
eb9dc99a19 URL display is no longer tiny, and window gets autoresized if URL is too big (fixes #183) 2015-05-18 11:05:33 -07:00
Micah Lee
a86cda4549 Ripping out dmg code, replacing pyinstaller with py2app for OSX -- still in progress (#151) 2015-05-15 16:56:22 -07:00
Micah Lee
669750be37 specify types in all str.format() calls (fixes #169) 2015-05-15 12:26:58 -07:00
Micah Lee
aab5ae31ab No longer duplicates human_readable_filesize functions. Closes #170 2015-05-14 14:40:55 -07:00
Thomas Waldmann
087102bde4 pep8: too long lines, reformat lines to < 120 chars. removed redundancy from long_description in setup.py.
note: pep8 usually recommends 80 chars, but I find that impractical and unnecessary - it's not 1980 any more when code was edited on 80x25 terminals.

i was a bit wondering about onionshare-launcher.py - it does a lot of imports, but does not use the imported names.
2014-11-18 18:59:48 +01:00
Thomas Waldmann
aa2b59ec5d pep8: 2 spaces before inline comments 2014-11-18 18:37:17 +01:00
Thomas Waldmann
63965fd2d9 pep8: blank after comma and colon 2014-11-18 18:35:09 +01:00
Thomas Waldmann
179eefae29 pep8: fix empty line counts
top level: 2, else 1

I also advice to not put "pass" into empty classes, but rather a docstring instead of "pass".
2014-11-18 18:29:32 +01:00
Micah Lee
f5ddd23b70 handles canceled downloads properly (fixes #81) 2014-09-22 20:22:30 +00:00
Micah Lee
43a24a19d2 split starting server status message into three verbose chunks 2014-09-22 19:19:24 +00:00
Micah Lee
15671ce1d9 remove trailing slash from filenames before adding, because getting basename on OSX fails otherwise 2014-09-22 12:03:50 -07:00
Micah Lee
4f6cff6503 warns about sending large files in GUI (#123) 2014-09-18 01:35:30 +00:00
Micah Lee
5b9176c9d4 combined Start Server and Stop Server buttons into a single button 2014-09-18 00:37:19 +00:00
Micah Lee
c159ef671d removed unused strings 2014-09-18 00:26:22 +00:00
Micah Lee
b1e48fa9bb Fixed drag & drop issue, and made drop here image work in Windows (fixes #129) 2014-09-17 15:48:19 -07:00
Micah Lee
89581b0a03 encode one way for CLI, encode another for GUI (#141) 2014-09-16 02:09:37 +00:00
Micah Lee
0a4ee35f5b fixes unicode filename display in GUI (#141) 2014-09-16 01:15:57 +00:00
Micah Lee
8cdecbcaf4 removing unnecessary whitespace 2014-09-16 00:22:14 +00:00
Micah Lee
d73d859fed fixed Windows/OSX image path problem, and updated NSIS Windows installer to install all the new .py files from refactoring 2014-09-04 13:20:39 -07:00
Micah Lee
3c071ce500 don't try stopping the web app if it hasn't started 2014-09-03 17:56:10 -07:00
Micah Lee
d00b296c47 moving image files into /usr/share instead of /usr/lib (fixes #126) 2014-09-03 17:50:06 -07:00
Micah Lee
8d01ad7ec6 moved images to subfolder (#126) 2014-09-03 17:36:03 -07:00
Lazlo Westerhof
7c9dbb0caf Fix missing window icon 2014-09-03 20:56:46 +02:00
Micah Lee
2c1534979e squash bug in closing Flask web server (fixes #131) 2014-09-03 00:11:25 -07:00
Micah Lee
4edcce9ece add utf-8 encoding to all .py files 2014-09-02 17:30:01 -07:00
Micah Lee
a6e99fcc21 added GPLv3 license to each source file 2014-09-02 12:10:42 -07:00
Micah Lee
c49cc75a55 fixed Tails bug where if you stopped server in GUI, you could not start a new server again 2014-08-30 01:42:17 +00:00
Micah Lee
cf52c2dcd0 fix bug caused by refactoring that made Tails launch infinite onionshare processes (oops) 2014-08-30 01:10:58 +00:00
Micah Lee
0858366e31 remove gui_mode from web app, because it is no longer useful 2014-08-29 16:06:13 -07:00
Micah Lee
e90d90b7d5 keep some status bar messages around for longer 2014-08-29 15:57:44 -07:00
Micah Lee
0a28ad4538 can't stop a server before it has finished starting 2014-08-29 15:50:19 -07:00
Micah Lee
d1cd3c83ab added status bar to GUI, populated it with useful status messages 2014-08-29 15:43:07 -07:00
Micah Lee
6688ced698 waits for hs to be ready in GUI too (#116) 2014-08-29 14:35:25 -07:00
Micah Lee
846b10b755 waits for hidden service before displaying URL. fixes #116 2014-08-29 14:32:19 -07:00