Commit Graph

69 Commits

Author SHA1 Message Date
Damien Elmes
fc60cfec28 fix margins in prefs screen 2017-08-29 17:33:09 +10:00
Damien Elmes
abc55222be add missing png 2017-08-28 22:29:47 +10:00
Damien Elmes
226bb2bc83 add record icon back to dialog 2017-08-28 21:46:22 +10:00
Damien Elmes
b28eb4fba6 add collection/deck shortcuts, refresh when saved changes 2017-08-28 21:43:44 +10:00
Damien Elmes
737a8d934e persistent add-on configuration
- add-ons can ship default config in a config.json file
- users can edit the config in the add-ons dialog, easily syntax-check
the json, and restore it to the defaults
- an optional config.md contains instructions to the user in markdown
format
- config will be preserved when add-on is updated, instead of being
overwritten as is the case when users are required to edit the source
files

A simple example: in config.json:

{"myvar": 5}

In your add-on's code:

from aqt import mw
config = mw.addonManager.getConfig(__name__)
print("var is", config['myvar'])

Add-ons that manage options in their own GUI can have that GUI
displayed when the config button is clicked:

mw.addonManager.setConfigAction(__name__, myOptionsFunc)
2017-08-28 20:51:43 +10:00
Damien Elmes
7288a9b063 new add-on handling
- separate dialog for managing add-ons
- only add-ons compatible with Anki 2.1 will be shown on AnkiWeb
- can delete or toggle disabled on multiple add-ons at once
- check for updates button
- button to view add-on's AnkiWeb page

The new handling drops support for single file .py add-ons, and requires
add-ons to store all files in a single folder. This ensures all files
are cleaned up properly when updating or deleting an add-on, and
prevents file conflicts between separate add-ons. See the updated
add-on docs for more:

https://apps.ankiweb.net/docs/addons21.html#add-on-folders
https://apps.ankiweb.net/docs/addons21.html#sharing-add-ons

README.addons has been moved to the above page
2017-08-26 15:14:20 +10:00
Damien Elmes
a7580c3762 revert undo shortcut 2017-08-17 13:46:31 +10:00
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
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
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
5f614a5a45 ctrl+shift for undo shortcut 2017-08-15 18:44:11 +10:00
Damien Elmes
a16aa73d6e switch to svg images for better hidpi rendering 2017-08-15 13:54:58 +10:00
Damien Elmes
1e06fe4896 add a frame to search area 2017-08-15 11:35:33 +10:00
Damien Elmes
44c764b895 fix sidebar showing, tweak icons 2017-08-14 16:57:43 +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
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
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
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
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
d55318d83f clayout refactor
- tabs became difficult to read when users had a lot of templates, so we
use a combobox instead
- move the More button to the top and integrate adding/removing
templates
- start with no focus to avoid accidental modifications
- display confirmation before adding template
- remove 'edit to customize' text that some users had trouble editing
2017-08-08 19:45:31 +10:00
Damien Elmes
d9b5d11312 fix conflicting add tags/jump to tags shortcuts 2017-08-04 17:39:40 +10:00
Damien Elmes
b81a64272e allow browser override font to be unset 2017-07-29 16:09:00 +10:00
Damien Elmes
8cd20f3352 turn latex svg into a note type option
needed until the other clients support svgs
2017-07-28 18:38:31 +10:00
Damien Elmes
17bb179d06 experimental prewrap support
- add option to wrap html in implicit pre-wrap environment during
editing and review - defaults to off
- update paste filter to convert divs/Ps to newlines and non-breaking
spaces to normal ones
- catch enter key and write \n instead of creating a new div

also:

- remove extra caretToEnd() call that is no longer required
- add dd/dt/dl to allowed tags
2017-07-20 12:16:47 +10:00
Damien Elmes
294813f4fd switch undo shortcut
on windows webengine seems to install a permanent ctrl+z handler that is
active even when an editing area is not selected, so our shortcut is
never triggered when the webengineview is focused.
2017-06-24 19:24:43 +10:00
Damien Elmes
ca08b742fa Revert "work around https://bugreports.qt.io/browse/QTBUG-54755"
This reverts commit 0bd79abe11.
2017-06-05 16:52:22 +10:00
Dmitry Mikheev
5a0ac657a9 Correct hotkey to Add-ons >> Browse & Install... 2017-02-18 18:53:38 +05:00
Damien Elmes
b58c082e29 tweaks to add-on downloading
- avoid opening and closing multiple progress dialogs
- report errors at the end; download what we can
- update dialog text
2017-02-15 15:55:31 +10:00
Damien Elmes
1609ffc92a increase deck conf default size 2017-01-08 19:41:12 +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
0bd79abe11 work around https://bugreports.qt.io/browse/QTBUG-54755 2016-12-15 21:12:51 +10:00
Damien Elmes
a001553f66 move the editor buttons into the webview
use new icons, which scale with dpi changes
2016-06-22 14:52:17 +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
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
Damien Elmes
3cceba085d change repos shortcut to ctrl+shift+s to avoid conflict 2016-03-27 20:50:59 +10:00
Damien Elmes
818c4534e9 ctrl+shift+p for reposition 2016-02-23 14:50:01 +10:00
Soren I. Bjornstad
5dbe267c46 add keyboard shortcut for 'manage note types' 2014-08-10 13:52:09 -05:00
Houssam Salem
3aeb5d86da Added search saving feature to card browser. 2014-04-09 04:35:00 +10:00
Houssam Salem
8f61dd3bf2 Merge branch 'master' of https://github.com/dae/anki 2014-04-06 16:38:32 +10:00
ospalh
49919b4eb6 Fix png images causing libpng 1.6.3 to print warnings. 2014-03-19 15:09:41 +01:00
Houssam Salem
068a63270d Changed location of import button (#1018).
Also updated help link in same window to point to a valid anchor.
2014-02-22 21:30:32 +11:00
Damien Elmes
96eeacbf69 increase filtered deck size limit to 99999 2014-01-14 15:12:45 +09:00
Damien Elmes
647ca8bffa option to disable backup compression 2013-12-06 13:35:31 +09:00