Commit Graph

1436 Commits

Author SHA1 Message Date
Damien Elmes
4467b7c991 restore marking support
maybe multiple mark types would make sense in the future, but for now
let's stick to what will work in the older clients
2017-08-16 20:30:29 +10:00
Damien Elmes
43d2fc2307 readme tweak 2017-08-16 20:02:09 +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
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
489d16ed14 refactor profile and collection loading/unloading
- unloadCollection() now waits for all collection windows to
indicate they've closed, and calls a callback when it's done
- autosync runs when the collection is unloaded, and is no longer
responsible for reloading it
- make sure backup thread runs until completion
- ensure we return to profile manager when collection can't be loaded
- don't run the profile manager with exec_(), or opening+closing a
broken profile ends up nesting runloops
- warn if a window wasn't cleaned up as part of collection unloading
2017-08-16 17:39:37 +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
8ab5a3a176 use callback when closing windows
remove the old forceClose hack in favour of a callback when closing, so
all windows have a chance to save properly before the collection is
unloaded

also:

- fix a warning shown when opening about screen
- require a call to editor.cleanup() when closing a window, to make sure
 any pending js callbacks don't try to fire on a deleted object
- make sure we gc webview when closing editcurrent
- main.py still needs refactoring to make use of the change
2017-08-16 12:48:15 +10:00
Damien Elmes
ca9d80c014 py3 always has a db progress handler 2017-08-16 11:50:00 +10:00
Damien Elmes
b28ca8c0d1 make saveNow() consistently fire callback after returning to event loop
avoid gotchas with callback firing in the middle of a close event, etc
2017-08-16 11:49:33 +10:00
Damien Elmes
d330d2f77f fix unit tests 2017-08-15 21:31:58 +10:00
Damien Elmes
d0389e138e Merge pull request #197 from techdavid/fix-bottom-drag-default
Fix decks being moved to the default deck when dragged to the bottom
2017-08-15 21:21:52 +10:00
Damien Elmes
c4b439eaf2 new import shortcut that doesn't conflict with italics 2017-08-15 21:18:47 +10:00
Damien Elmes
265bef2b68 likewise for manage note types 2017-08-15 18:49:41 +10:00
Damien Elmes
29dc4f298a add 'clear unused tags' back to menu
users who only use the sidebar may miss it
2017-08-15 18:48:22 +10:00
Damien Elmes
bef6e5bcf5 treat name resolution failure as internet offline 2017-08-15 18:46:07 +10:00
Damien Elmes
5f614a5a45 ctrl+shift for undo shortcut 2017-08-15 18:44:11 +10:00
Damien Elmes
b558712976 filter menu tweaks
- make the chunking and menu code more generic
- decks and note types now chunk menus too
- chunked menu now shows start and end prefix
2017-08-15 18:41:36 +10:00
Damien Elmes
1b53ad4555 dock tweaks
- add frame to tree because dock widget has no frame on Windows, looking
 odd
- remove the title bar
2017-08-15 15:19:22 +10:00
Damien Elmes
af14051637 add check to see if drag&drop caused a recent bug
user was getting errors because they had a deck starting with double
quotes
2017-08-15 15:11:59 +10:00
Damien Elmes
f693edb328 make sure dock widget doesn't start out floating 2017-08-15 14:54:13 +10:00
Damien Elmes
a8ce74a784 compensate for qt's integer scaling on windows
fixes

https://anki.tenderapp.com/discussions/beta-testing/687-high-resolution-display-scaling-issue
2017-08-15 14:47:03 +10:00
Damien Elmes
a16aa73d6e switch to svg images for better hidpi rendering 2017-08-15 13:54:58 +10:00
Damien Elmes
30e6a34d25 only focus webview after fields have been set
on some platforms the old approach was causing a focus+blur event to
fire with the old note contents

fixes

https://anki.tenderapp.com/discussions/beta-testing/681-red-cloze

and probably fixes

https://anki.tenderapp.com/discussions/beta-testing/683-back-input-returns
2017-08-15 11:38:32 +10:00
Damien Elmes
1e06fe4896 add a frame to search area 2017-08-15 11:35:33 +10:00
David Bailey
06add3ee07 Fix decks being moved to the default deck when dragged to the bottom
Previously ontoDeckId was undefined if a deck was moved to the bottom, resulting in it being moved to the default deck, instead of being made a top-level deck.
2017-08-14 22:58:14 +01:00
Damien Elmes
8e2154dfbf change backup filename
- embed date in name to make it easier for people to locate correct
backup
- move old backups to the trash instead of deleting outright
- backups in the old format will not be rotated, and will need to be
deleted by the user - if we just deleted them at the start of  the
rotation it could lead to data loss for users moving back and forth
between 2.1 and 2.0
2017-08-14 18:53:39 +10:00
Damien Elmes
44c764b895 fix sidebar showing, tweak icons 2017-08-14 16:57:43 +10:00
Damien Elmes
a353135af3 add type-in-the-answer note type 2017-08-13 19:42:27 +10:00
Damien Elmes
c8127ee606 hideable sidebar
- rely on restoreGeom() to preserve visibility
- case-insensitive sort on tags
2017-08-13 19:11:40 +10:00
Damien Elmes
ad6dcde531 OCD fix for gear icon 2017-08-13 19:05:59 +10:00
Damien Elmes
c4029e5680 shortcut keys to jump to first 9 templates 2017-08-12 17:29:47 +10:00
Damien Elmes
be1514a97b bump version 2017-08-12 17:04:53 +10:00
Damien Elmes
cc0ec00fe7 add a little padding in bottom area 2017-08-12 17:04:07 +10:00
Damien Elmes
ec5e54d21d reformat css 2017-08-12 16:14:32 +10:00
Damien Elmes
b7be2ad744 clear flags on export 2017-08-12 16:13:53 +10:00
Damien Elmes
71101d041a ditch marked tag in favour of card flags
Users can now mark individual cards with one of four different coloured
flags, instead of relying on a tag that applied to the whole note.

- replaced marking functionality in reviewer and browser with new
flag options
- added flag:x search
- marked and leech tags now show in normal tag list in filter screen,
instead of being treated specially
- the other clients will need updating to set and shown the flags, but
flags set in the beta should be preserved by the other clients
2017-08-12 16:08:10 +10:00
Damien Elmes
6bbd6d2dd5 limit length of clayout field summary 2017-08-12 14:42:19 +10:00
Damien Elmes
3014839d29 browser -> browse 2017-08-11 22:04:06 +10:00
Damien Elmes
c831c4539e browser -> browse 2017-08-11 22:02:32 +10:00
Damien Elmes
03b0ff4565 tidy up card name list 2017-08-11 21:44:05 +10:00
Damien Elmes
72fdffed8b add some more padding to browser 2017-08-11 21:43:31 +10:00
Damien Elmes
a882937dd3 fix cloze in mathjax workaround 2017-08-11 21:09:47 +10:00
Damien Elmes
1fb2c96d07 use a full window on non-Mac platforms as well 2017-08-11 21:06:15 +10:00
Damien Elmes
75f58b86d6 disable rather than hide drop down in clayout cloze case 2017-08-11 21:04:17 +10:00
Damien Elmes
ba16b8714b remove images and move away from qt resources
- the bulk of image use is in webviews, so we move almost all used
images to web/imgs, as it's easier to manage
- change AnkiWebView to always use the local media server as a base, as
much of the UI has come to depend on it
- remove images from a few areas, as they felt dated
- delete a bunch of unused images
- href=# links were being opened in a browser window, so the code now
ignores them - the HTML should really be updated to return false in the
onclick handler
- update a few icons
2017-08-11 20:59:43 +10:00
Damien Elmes
3be43c2309 use ip for loopback, as localhost is wrong on some machines 2017-08-11 20:37:04 +10:00
Damien Elmes
2415611450 remove sidebar in browser
use a pop-up menu instead, which saves a lot of screen real estate and
should be more intuitive for new users

also:

- add options to manage note types and clear unused tags in the relevant
submenus
- shuffle a few shortcut keys
- remove the old favourites code - saving and removing now done via the
menu
- individual card templates now searchable
2017-08-11 19:10:39 +10:00
Damien Elmes
0c3565228d remove icon from add-on submenu 2017-08-11 14:41:41 +10:00
Damien Elmes
6c765d7302 remove toolbar in browser in favour of menu items 2017-08-11 14:40:51 +10:00
Damien Elmes
1c88315e86 bump version 2017-08-10 21:51:46 +10:00