Commit Graph

22 Commits

Author SHA1 Message Date
Damien Elmes
4037a034aa fix inconsistent indentation 2019-03-04 16:54:22 +10:00
Damien Elmes
da2ddcc6e2 explicitly import _ and ngettext 2019-03-04 11:58:34 +10:00
Damien Elmes
b06b70f721 avoid running timers after collection unload
fixes:
- onRefreshTimer() firing when collection is in the process of
unloading
- saveNow() in the no changes case, which fires a timer 10ms later
2019-02-06 12:03:14 +10:00
Damien Elmes
372d5ed6e8 update copyright and clarify licenses 2019-02-05 14:01:33 +10:00
Damien Elmes
52313fd0bf work around progress dlg hang at startup on osx
with autosync on, when the progress dialog is closed and the main window
appears, it becomes stuck. hiding the dialog instead of closing it
seems to fix this.
2018-01-14 19:29:56 +10:00
Damien Elmes
b9aa3a3083 fix bad margins in progress dialog 2018-01-14 18:05:43 +10:00
Damien Elmes
1c390218fc fixes to progress window
- make sure _shown reset to False on finish()
- ignore calls to .update() after finish() called, which can happen with
async signals in the sync code
2018-01-14 12:16:47 +10:00
Damien Elmes
5ad8f67f12 move away from qprogressdialog
qprogressdialog has been the source of a number of problems in the past,
and the most recent issue is that it's showing the progress dialog
early, regardless of what the minimum duration is set to. since we're
already using our own logic for deciding when to show the dialog, it's
easier to move to a normal dialog box

also prevent timers from firing while a progress dialog is visible, or
if the refresh timer fires we end up with the same issue.

https://anki.tenderapp.com/discussions/beta-testing/949-anki-stops-when-field-is-added
2017-12-28 18:31:05 +10:00
Damien Elmes
1cc29278f2 Revert "avoid setting modality in progress dialog"
This reverts commit 059db539a7.

seems to work correctly in qt 5.9.2
2017-10-20 13:25:38 +10:00
Damien Elmes
059db539a7 avoid setting modality in progress dialog
when modal, the program hangs on OS X when moving back and forth
between the main window and the profile manager, and I haven't been able
to find a better workaround

.update() ignores user input when processing events, so this will
hopefully not break things
2017-08-16 17:43:56 +10:00
Damien Elmes
b3a569ed57 progress dialog tweaks
- don't use mw as parent if it's not visible
- wider
2017-08-16 13:20:29 +10:00
Damien Elmes
ca9d80c014 py3 always has a db progress handler 2017-08-16 11:50:00 +10:00
Damien Elmes
e7abd9f4ed fix crash when syncing media on windows
update() was being called when processing events, leading to
recursion until the stack was exhausted

https://anki.tenderapp.com/discussions/beta-testing/639-anki-210-beta4-crashing-during-syncing
2017-07-26 15:21:27 +10:00
Illia Volochii
13b7e01044 Stop inheriting from object
It is not needed in Python 3.
2017-02-07 00:21:33 +02:00
Damien Elmes
9ed315cbb7 fix progress window getting stuck on ubuntu 16.10
https://anki.tenderapp.com/discussions/beta-testing/231-anki-210-alpha-9#comment_41810358
2017-01-25 16:50:57 +10:00
Damien Elmes
02975d43ad partial sync cancellation
each time we send or receive a chunk of data we check to see if the
user wants to cancel sync

in the case of a hung connection, it will still take a minute to time
out
2017-01-17 17:15:50 +10:00
Damien Elmes
de7e40537d port majority of code to qt5.5+
- a few issues to work out still, and editor changes not done yet
- for communication between webengine and python code, we set window
.location to 'http://anki/<something>' - the leading http is
necessary for qt to call the link handler, which was introduced
in qt5.5
- the designer files now use a promoted qobject to create instances
of AnkiWebView
- we use the css zoom property to alter webengine font size based on
system dpi
- prefs and addons folder stored in new location (at least for now)
2016-05-31 18:51:40 +10:00
Damien Elmes
15b349e3a8 start port to python 3
unit tests pass and main screens of GUI load
2016-05-12 14:45:35 +10:00
Damien Elmes
3bbd0bca7e zip64 support, and import/export improvements
- we now allow exports over 2gb/64k files - AnkiMobile and AnkiDroid
will need to be updated to support this
- avoid compressing media files in export, as in the common case of
jpg/mp3 it's much faster with no increase in size
- exports and imports now show # of files processed
- mw.progress.update() now limits # of updates per sec
2016-02-26 10:01:46 +10:00
Andreas Klauer
4b0f31676c repeating timers would randomly start firing every 100ms indefinitely 2013-05-24 02:08:36 +02:00
Damien Elmes
0055d31d04 block gui updates while painting browser rows
If we processEvents() in the middle of a QItemDelegate, the recursion can
cause a crash on some OSes
2013-01-29 06:45:29 +09:00
Damien Elmes
d477df8c28 merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00