Commit Graph

33 Commits

Author SHA1 Message Date
Damien Elmes
c1587254f4 use isort to tidy up imports 2019-12-20 19:19:29 +10:00
Damien Elmes
2155e93bad Revert "add signatures to calling code"
This reverts commit 441e279f6d.

Pytype does catch the mentioned error without the extra annotations.
2019-12-19 11:39:40 +10:00
Damien Elmes
441e279f6d add signatures to calling code
otherwise mypy ignores them. And even then, it's not smart enough
to notice self.mw.pm.setUiScale("foo") is invalid unless the
instance assignment in main has a type hint as well
2019-12-19 11:34:46 +10:00
Damien Elmes
3a4f94ab86 add UI scale preference 2019-12-19 09:58:16 +10:00
Damien Elmes
3b5f8fec4c default to v2 scheduler on new installs, remove warning 2019-12-06 18:37:39 +10:00
Damien Elmes
241b7ea005 use locales instead of two digit lang codes
and move away from launchpad
2019-09-23 21:18:03 +10:00
Damien Elmes
e5194ad208 remove open backup folder link
https://anki.tenderapp.com/discussions/ankidesktop/35084-crash-while-trying-to-revert-to-a-backup
2019-07-22 10:49:22 +10:00
Damien Elmes
9cc99cdced possible fix for " super-class ... Preferences was never called"
Can't reproduce the issue, but it seems the user was able to open the
preferences screen when no collection was loaded. If an error was
caught in loadCollection() the main window was not being hidden, so
perhaps a timing issue was preventing the profiles screen from taking
modal focus.

Removed the check in the prefs init - it is hopefully no longer
necessary, and returning before QDialog.__init__() was called was
causing the problem.

Caught exception:
  File "aqt/webview.py", line 27, in cmd
  File "aqt/webview.py", line 85, in _onCmd
  File "aqt/webview.py", line 360, in _onBridgeCmd
  File "aqt/toolbar.py", line 56, in _linkHandler
  File "aqt/toolbar.py", line 80, in _syncLinkHandler
  File "aqt/main.py", line 669, in onSync
  File "aqt/main.py", line 365, in unloadCollection
  File "aqt/main.py", line 611, in closeAllWindows
  File "aqt/__init__.py", line 110, in closeAll
<class 'RuntimeError'>: super-class __init__() of type Preferences was never called
2019-04-21 19:02:03 +10:00
Damien Elmes
ebdd8dae4b tidy up unused imports 2019-03-04 17:25:19 +10:00
Damien Elmes
da2ddcc6e2 explicitly import _ and ngettext 2019-03-04 11:58:34 +10:00
Damien Elmes
372d5ed6e8 update copyright and clarify licenses 2019-02-05 14:01:33 +10:00
Damien Elmes
f699ebb370 add hw accel toggle to prefs 2018-08-30 13:39:04 +10:00
Damien Elmes
560c21c59d add experimental scheduler to preferences 2018-04-30 16:26:19 +10:00
Damien Elmes
d78176debe fix opening prefs screen in V1 sched 2018-01-22 11:24:45 +10:00
Damien Elmes
d3d61ce93f add option to show day learn cards before reviews 2018-01-20 16:07:57 +10:00
Damien Elmes
b17a0552d0 support customizing day cutoff w/ V2 scheduler 2018-01-20 15:32:52 +10:00
Damien Elmes
fcccf12ba6 night mode 2017-12-04 12:20:56 +10:00
Damien Elmes
d3d96222bc prefs and dialog tweaks
- manage prefs window so it only opens once, and gets closed properly
- provide silentlyClose shortcut to dialogmanager windows
2017-09-10 15:15:12 +10:00
Damien Elmes
a66c5f555f revamp profile manager
- use a main window instead of a dialog, so the menu items of the main
window don't appear while the profile window is active on OS X
- the profile manager now has a button to automatic restoring from
backup, which will prevent old backups from being clobbered
- drop support for profile passwords
- do the right thing when user quits from the menu in profile manager
mode
2017-08-16 19:45:39 +10:00
Damien Elmes
259023f369 write backups in thread; remove strip html & compress options
we do the backup compression/writing in a separate thread so it
doesn't slow down profile switching/syncing, and remove the option
to write uncompressed backups

the strip html option is no longer used, so remove it from preferences
2017-01-08 19:29:57 +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
864a9135dc allow language changing in prefs
avoided adding this in the past as on a multi user system it allows
one profile user to annoys others by changing the interface language,
but it comes at the expense of easily changing the language for users
who choose the wrong one on first startup
2016-04-05 11:02:01 +10:00
Christian Krause
a65c20b3ad Avoid exception on exit
Closing anki when the preferences dialog
is open will cause an exception since
self.mw.col in Preferences is not available
anymore.

Avoid the exception by checking self.mw.col
again on accept().
2015-04-26 12:31:54 +02:00
Damien Elmes
6e7e08ebd0 be explicit about modSchema()'s check flag
- remove gui code that adds exceptions for syncing
- use check=False for all syncing and upgrade code
2014-11-03 16:28:12 +09:00
Damien Elmes
a5d9131445 force media resync on deauth 2014-07-04 19:44:15 +09:00
dae
fc4f24ce59 don't default to a button in prefs dialog 2014-06-03 16:26:46 +09:00
Damien Elmes
647ca8bffa option to disable backup compression 2013-12-06 13:35:31 +09:00
Damien Elmes
f64c07ca40 show sync username in prefs screen 2013-10-04 06:09:36 +09:00
Damien Elmes
79d4451299 move full sync into preferences, and remove maintenance menu 2013-05-14 15:27:40 +09:00
Damien Elmes
ce9e09d4c5 changes for qt5 on mac
- setShown() -> setVisible()
- qt_mac_set_menubar_icons() no longer exported, use alternative method
2013-04-15 13:46:07 +09:00
Damien Elmes
b2457811a2 optimize imports 2012-12-22 09:17:10 +09:00
Damien Elmes
d477df8c28 merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00