Commit Graph

180 Commits

Author SHA1 Message Date
Damien Elmes
94463991bc basic sync support
currently no progress shown on large uploads/downloads
2016-07-04 15:45:53 +10:00
Damien Elmes
a1caa93054 fix mem leaks in dialogs
- ensure we're cleaning them up after they're rejected
- run the garbage collector afterwards so the qwebengineprocess
  instances get cleaned up
2016-07-04 13:22:35 +10:00
Damien Elmes
a4cab1d8f2 remove setupFonts(), disable syncing 2016-06-23 12:06:16 +10:00
Damien Elmes
4e2bd3f739 resize toolbars to fit content 2016-06-07 14:27:33 +10:00
Damien Elmes
9abc9fde9f use a channel for bridge
acceptNavRequest was not being called for rapid updates, so it's not
usable
2016-06-06 15:50:03 +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
1dce3eaaff drop anki1 upgrade code 2016-05-12 14:20:59 +10: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
ece78a7d11 allow all ankiwebview instances to take focus
the canFocus/canCopy separate variables was silly, as we ended up
with text that could be copied from the context menu but not with
a shortcut key. also we default to allowing focus now, since that's
the more sensible default. fixes copy issues with card info dialog and
some addons
2014-09-15 15:04:14 +09:00
Damien Elmes
e5a2a9c3f8 make sure users can unload corrupt collection to create new profile 2014-07-02 06:29:53 +09:00
Damien Elmes
61b0072dcc fix handling of corrupt collections on windows
- advise user to create new profile, which prevents restores from
  backup overwriting old backups
- don't rename the collection file, as it's no longer necessary,
  and it fixes a windows bug where the main window would be left
  open due to a failure to rename the locked collection file
2014-06-27 04:25:40 +09:00
dae
1933779fa6 Merge branch 'master' of github.com:dae/anki 2014-06-26 08:58:22 +09:00
dae
48dbc48b65 provide debug info when collection corrupt 2014-06-26 07:37:16 +09:00
Soren I. Bjornstad
5b61db7d0a make sure unused media exist before deleting them 2014-06-20 19:41:56 -05:00
Soren I. Bjornstad
5f94d92f78 Merge branch 'geom_saverestore' 2014-06-20 10:36:31 -05:00
Soren I. Bjornstad
436f257e36 dialog box size and position improvements
- keep track of size and position for a number of dialogs
- make sure addons dialog opens at an appropriate size for the system
  font size
- add optional argument to showText to restore geom on creation and save
  on reject (other buttons, if used, need to be programmed to save
  individually)
2014-06-20 10:31:52 -05:00
Soren I. Bjornstad
b4784b7437 add "export" button to deck menus 2014-06-19 19:13:12 -05:00
Adam Mesha
5629533b38 Add hooks before and after a state change.
Useful for plugin authors.
2014-04-22 01:20:48 +03:00
Damien Elmes
28b2f8fe03 allow main webview to focus, which may fix shortcut issues
some users reported plugins that define reviewer shortcuts broke
2014-04-16 01:43:33 +09:00
Damien Elmes
b99e349695 fix copy not appearing when reviewing 2014-04-14 15:32:30 +09:00
Damien Elmes
5044089d42 Revert "tweak heights and font sizes"
This reverts commit 9beed20dc0.

beta testers all seem to prefer the original smaller size
2014-03-27 14:02:55 +09:00
Damien Elmes
5cc8e9b7d3 show main window on startup on mac
this causes a visible resize, but seems to fix the intermittent
beachball on startup issue
2014-03-20 08:00:02 +09:00
Damien Elmes
9beed20dc0 tweak heights and font sizes 2014-03-07 10:16:38 +09:00
Damien Elmes
96cc486528 editor needs to accept focus; rename cardViewer to canFocus 2014-02-18 15:13:59 +09:00
Houssam Salem
a12e6f6b65 Issue #998: Allow copy/paste and context menu in all card windows. 2014-02-15 17:26:03 +11:00
Damien Elmes
227c5cbc94 rename corrupt collection (#999)
if we don't do this, the user can never get back into the profile
in order to overwrite it with a backup
2014-01-14 15:24:42 +09:00
Damien Elmes
cc98ef3763 tweak imports to work around tooling incorrectly finding module unused
fixes 'quit' from the profile menu, etc
2013-12-19 07:41:29 +09:00
Damien Elmes
f057242da1 typo in clock off msg 2013-12-09 15:45:39 +09:00
Damien Elmes
647ca8bffa option to disable backup compression 2013-12-06 13:35:31 +09:00
Damien Elmes
46a771def3 fix clock off message 2013-12-06 13:27:13 +09:00
Damien Elmes
ae8074ec01 make sure we reset odue when rescheduling as new
if we fail to do this for a relearning card, it sticks around
until it causes problems later
2013-11-17 16:03:58 +09:00
Damien Elmes
f6b9dadf13 catch invalid file encodings in media check & sync 2013-11-13 17:19:25 +09:00
Damien Elmes
ef9157a8ee don't open log for export or upgrade, only regular+sync 2013-11-13 16:48:22 +09:00
Damien Elmes
5dfe95aa67 move debug logging into libanki
we want to be able to log the initial automatic sync, which
happens before the debug logging was set up in ankiqt

also skip the flush, as it should eventually get written
2013-11-04 23:04:27 +09:00
Damien Elmes
2e22b6218b don't close log on profile close
we want the log to stick around for syncs, and if the user
changes to another profile the log will be closed then
2013-11-04 06:35:30 +09:00
Damien Elmes
1d2ef1dbfb seeking on win32 is slow, so keep file handle around 2013-11-03 18:39:03 +09:00
Damien Elmes
1fe04a29b2 change env var name 2013-10-23 16:04:44 +09:00
Damien Elmes
82a54c780f catch invalid temp folder and other tweaks
- tweak sync code so that a failure in loading the collection
  won't leave the app with an unopen collection
- don't show corrupt collection message when the error is not
  a db error
- catch the temp folder issue when loading the collection. i suspect
  this was the issue that was causing some people to end up with
  an open anki instance with no collection loaded
2013-10-22 15:30:53 +09:00
Damien Elmes
553a908839 skip startup sync when restoring from backup 2013-10-22 14:57:56 +09:00
Damien Elmes
004998c8ec env var to skip expensive closing during dev 2013-10-22 14:28:17 +09:00
Piotr Kubowicz
b0a24a14ff Fixed the translation in the warning about system clock 2013-10-21 09:52:54 +02:00
Damien Elmes
184ea3503a use file system encoding for cmdline args
thanks to to wlhunag for the initial patch!
2013-10-21 09:22:14 +09:00
Damien Elmes
58f13f1e9a display time difference & more info in clock off msg; i18n it 2013-10-20 10:26:11 +09:00
Damien Elmes
0ac8789ad5 encode to utf8 before writing log 2013-10-18 15:21:54 +09:00
Damien Elmes
0fbc94c186 more logging tweaks
- disable in browser, note.cards()
- in getCard() we want the calling frame, not us
- log current day
- show card/note id in card info stat
2013-10-18 14:20:20 +09:00
Damien Elmes
b99533a5ad add logging to some scheduling and syncing code 2013-10-18 11:52:21 +09:00
Damien Elmes
9cb1d19dc2 try to work around the qbytearray issue
https://anki.tenderapp.com/discussions/ankidesktop/3369-bug-report-for-restoring-from-backup
2013-10-18 07:53:53 +09:00
Damien Elmes
0254a25c23 unused media tooltip patch from julien baley (removed redundant .finish()) 2013-07-24 01:04:37 +09:00
Damien Elmes
70008a8f40 remove filtered deck restriction on stats 2013-07-18 19:01:39 +09:00
Damien Elmes
2047e5c93c don't send old backups to the trash (#912) 2013-07-03 03:41:41 +09:00
Hans Engel
c916fa533f Handle invalid import file argument in both launch cases (single-profile and multi-profile launch) (#924) 2013-06-29 15:08:37 -07:00
Damien Elmes
122c5c8f4c ensure we have access to col when removing notes while syncing 2013-05-31 10:42:24 +09:00
Damien Elmes
b253a1736d tweak unused media msg 2013-05-24 10:35:18 +09:00
Damien Elmes
eb1793ba38 send old backups to trash as well 2013-05-23 14:04:40 +09:00
Damien Elmes
2655dcf649 move unused media to trash too 2013-05-23 13:42:31 +09:00
Damien Elmes
41d7f716bb profile name in title bar 2013-05-22 13:04:45 +09:00
Damien Elmes
ddc01ad8e8 log deletions in text file 2013-05-22 12:27:37 +09:00
Damien Elmes
e2d50fbf71 safe mode won't work on 4.7 2013-05-18 18:19:35 +09:00
Damien Elmes
205c6d4c38 add a 'safe mode' (#797) 2013-05-17 15:32:22 +09:00
Damien Elmes
a492e95aed remove pyqtconfig usage (#831) 2013-05-17 15:17:04 +09:00
Damien Elmes
79d4451299 move full sync into preferences, and remove maintenance menu 2013-05-14 15:27:40 +09:00
Damien Elmes
4bfbd2396a do integrity check when closing collection 2013-05-07 15:27:35 +09:00
Damien Elmes
6ef7354fe2 typo 2013-04-24 12:42:56 +09:00
Damien Elmes
d4c5e5627b Merge pull request #25 from ospalh/fix-unload-collection
Fix the return value of aqt.main.unloadCollection()
2013-04-23 20:40:39 -07:00
ospalh
a92aea1f27 Fix the return value of aqt.main.unloadCollection() (True if there is no col... 2013-04-23 15:42:27 +02: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
0994bd332c cancel sync if user elects to keep unsaved card content (#705) 2013-04-11 19:23:32 +09:00
Damien Elmes
827ed998ea catch unicode errors in debug console (#545) 2013-04-11 15:25:59 +09:00
Damien Elmes
a2ad76dbb4 default to current deck when selecting (#693) 2013-02-20 15:25:59 +09:00
Damien Elmes
fa07268763 don't allow invalid chars in file export (#694) 2013-02-20 15:12:07 +09:00
Damien Elmes
c80d1209e6 don't die if suppressUpdate unset 2013-02-20 08:27:26 +09:00
Damien Elmes
6415474db4 make sure we save when main window closed while not focused 2013-02-14 09:26:17 +09:00
Damien Elmes
c67c932c64 make sure we switch back to old deck when filt. cancelled (#338) 2013-01-30 18:27:34 +09:00
Damien Elmes
dec480844b include filtered deck name in quotes 2013-01-15 08:09:02 +09:00
Damien Elmes
b2457811a2 optimize imports 2012-12-22 09:17:10 +09:00
Damien Elmes
ce4c62fcbb add 'note types' to main menu 2012-12-22 08:21:24 +09:00
Damien Elmes
a35ce1fd8e add tooltip on undo rollback 2012-12-22 07:42:52 +09:00
Damien Elmes
873811a56e disable undo when switching profiles 2012-12-21 20:55:57 +09:00
Damien Elmes
d477df8c28 merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00