Damien Elmes
49e2d82aae
fade next card in
...
- to minimize pop-in of images and mathjax, fade the previous card
out and fade the next card in
- render the answer at the same time as the question so it can be
shown immediately
- move reviewer css to separate file
- remove image preloading code that should no longer be necessary
2017-07-29 14:24:45 +10:00
Damien Elmes
7ad6966943
split js code out into separate files, mathjax improvements
...
- js code that was previously bundled in .py files is now in the
web folder
- add helpers to create links to bundled files, and update
stdHtml() to accept a list of javascript files to include
instead of text
- render MathJax in card layout and preview screens - these should be
updated in the future to update the document dynamically like the
reviewer does
- start media server earlier so it can be used to serve content for
the toolbar, etc
- work around a bug in WebEngine on Windows that could cause the
media server to hang
2017-07-28 16:35:45 +10:00
Damien Elmes
94b1768ba8
use ctrl+delete for delete shortcut in both reviewer and browser
2017-07-26 10:52:04 +10:00
Damien Elmes
e635157ee4
move stats and sync buttons to the center
2017-06-23 14:03:18 +10:00
Damien Elmes
e93f4abcab
fix deck expanded state being reset
...
the setExpanded() call was triggering the callback, turning off
expanded state
https://anki.tenderapp.com/discussions/ankidesktop/23841-bug-when-editing-card-fields-decks-automatically-collapse
2017-06-14 11:43:47 +10:00
Damien Elmes
43a662a250
hack around the browser not closing on sync
...
saveNow() must run asynchronously, but unloadCollection() was not
designed to. fix the issue by skipping the save, as it's unlikely
the user can move the cursor from the editor to the
main window and start a sync before the timer has automatically saved
the contents.
2017-04-12 18:40:37 +10:00
Damien Elmes
783767be0d
Merge pull request #181 from Glutanimate/fix-previewer-navigation
...
Improve previewer navigation
2017-03-26 15:49:34 +10:00
Damien Elmes
bcdfeaa9c6
Merge pull request #180 from Glutanimate/preserve-tag-focus-in-browser
...
Preserve tag field focus when switching between cards in the browser
2017-03-26 15:49:03 +10:00
Glutanimate
a70e751238
Tweak previewer navigation behaviour
2017-03-24 17:09:16 +01:00
Glutanimate
0bcf60fea6
Tweak previewer navigation button display
2017-03-24 17:05:33 +01:00
Glutanimate
8f7f7db861
Preserve tag field focus when switching between cards
2017-03-24 16:23:48 +01:00
Damien Elmes
bb50976ce2
remove modeltest
2017-03-18 08:08:21 +09:00
Damien Elmes
17d68cc957
use a clearer name for fmtQA()
2017-03-14 15:48:40 +09:00
Henrik Enggaard Hansen
1dfc4466f1
Move card formatting to anki.utils
2017-03-13 15:52:02 +01:00
Damien Elmes
bcaf5762ec
fix errors when previewing
2017-02-23 16:21:00 +10:00
Damien Elmes
9c2c590de9
Merge pull request #170 from illia-v/super-no-arguments
...
Use `super()` without arguments
2017-02-22 18:34:08 +10:00
Illia Volochii
ddc4c6a7e3
Use super()
without arguments
2017-02-21 23:08:41 +02:00
Damien Elmes
7ebd66a1c8
add modeltest to browser; fix an issue with rowCount()/columnCount()
2017-02-19 14:30:35 +10:00
Damien Elmes
2fc47773b6
show error on invalid search
2017-02-02 21:00:58 +10:00
Damien Elmes
7c76a23cce
we can revert to fix#1 for the modSchema issue now
...
as we save at start of change note type screen, instead of in
beginReset()
2016-07-14 21:49:40 +10:00
Damien Elmes
8e71554ac4
saveNow() now requires a callback
...
the current code was freezing when clicking on 'cards' in the
browser - it looks like like the javascript callback was never
being called despite calling processEvents(). so we need to
refactor the code to call saveNow() with a callback that does the
subsequent processing.
a lot of the browser code was implicitly calling saveNow() via
beginReset(), so we've had to change all that code to save
immediately before it begins any processing. found a probable bug in
the process - it doesn't look like onRowChange() was saving before
overwriting the note, so theoretically edits could be lost if the
user switched to another card very quickly after typing something.
onSearch() has been split into a GUI-activated onSearchActivated()
that takes care of saving, and a lower level search() that refreshes
the current search. it keeps track of the last search via an instance
variable so that it refreshes properly if a user accidentally adds
some characters to their search without activating the search, then
does something like reverse the sort order.
2016-07-14 20:23:44 +10:00
Damien Elmes
85215018a5
another approach to fixing modSchema bug
...
start the progress dialog immediately so that askUser()
becomes part of the progress dialog's modality
the problem with the previous approach was that beginReset() attempts
to save the note again, leading to schema mismatches
2016-07-12 13:53:59 +10:00
Damien Elmes
5b10d7c45b
fix change note type getting stuck
...
thanks to stvad for the report
2016-07-11 11:34:12 +10:00
Damien Elmes
a8e2f992c8
image support
2016-07-07 23:39:48 +10:00
Damien Elmes
9c569ac35c
fix onHeight error by not reloading toolbar each note
2016-07-07 17:29:53 +10:00
Damien Elmes
d824f178cc
Merge pull request #133 from hssm/browser-recenter
...
Fix automatic horizontal scrolling in browser
2016-07-04 16:29:45 +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
Houssam Salem
7a60482269
Fix automatic horizontal scrolling in browser
2016-06-07 16:32:19 +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
Dmitry Mikheev
74e28058f7
sorry, a typo crept in
2016-05-05 03:26:13 +05:00
Dmitry Mikheev
692dcfd4e7
2 tooltips in Preview window and support Enter
...
Let's give the users tips over the arrow buttons
and provide passing Back Side / Next Card
by pressing Enter key.
2016-05-05 03:21:04 +05:00
Glutanimate
ec401a6c23
Add keyboard shortcut for 'Add Note' action in Browser (Ctrl+E)
2016-03-04 20:21:58 +01:00
Damien Elmes
216a68f656
add missing comma in received patch
2016-02-22 10:42:27 +10:00
Damien Elmes
97311e33d9
suspend note -> suspend card
2016-02-22 09:31:00 +10:00
Glutanimate
4c9d176272
Add keyboard shortcut for 'Suspend Note' in Browser
2016-02-21 12:10:02 +01:00
Houssam Salem
98d98ad363
Rebuild browser tree without reconnecting signals
...
Fixes a bug where adding or removing a saved search triggers
multiple click events on tree items.
2015-06-30 21:41:16 +10:00
Houssam Salem
6e20bf7013
Load saved searches list in sorted order
2014-11-11 10:13:29 +11:00
Damien Elmes
1f178b869f
remove backspace to delete shortcut on macs
...
too many people activating it accidentally
2014-10-10 17:59:18 +09:00
Houssam Salem
9eaacf8977
Bump mod time when editing saved searches
...
Fixes saved searches not getting synced when modified.
2014-10-05 20:37:09 +11: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
Derbeth
8dedcdf6ac
allow better translations of '1 note deleted' browser tooltip
2014-08-26 09:31:32 +02:00
Soren I. Bjornstad
b19a1707fb
put selection in a sensible place after deleting several cards
...
If the last selection was at the top, the new selection will be right
above the last-selected item; otherwise, it will be right below it.
2014-08-11 14:32:59 -05:00
Damien Elmes
03f9c76b9e
Merge branch 'master' of https://github.com/sobjornstad/anki
2014-07-04 06:41:44 +09:00
Soren I. Bjornstad
45a6e8cdba
fix automatic 'deck:current' missing trailing space
...
3aeb5d8
accidentally added some duplicate code that made the search
parser run twice and strip the space from the search that had just been
automatically placed in the box.
2014-07-03 14:03:04 -05:00
Damien Elmes
1e34696c5b
Merge branch 'master' of git://github.com/sobjornstad/anki into sobjornstad-master
...
Conflicts:
anki/exporting.py
2014-06-29 04:07:00 +09:00
Houssam Salem
68d8275ce1
Reduce margin of search box so that text isn't covered by fav button
2014-06-28 01:38:34 +10:00
Soren I. Bjornstad
083d9e8aa5
remove search text when ctrl-clicking a left panel item
2014-06-25 13:46:21 -05:00
Soren I. Bjornstad
d659d9cff7
add 'replay audio' button to previewer
2014-06-21 15:35:45 -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
Houssam Salem
7fa346c2a2
Re-check favourites status on any text change
...
Updates the favourites button when the search text is updated programmatically as well as user input. Fixes a bug where using the recent search drop-down doesn't update the favourites button state correctly.
2014-05-27 07:04:10 +10:00
Houssam Salem
96a294039e
Don't manually specify tab order.
...
The default order is more logical:
Text input -> Search -> Preview -> Results table
2014-05-25 11:06:30 +10:00
Houssam Salem
07426a883c
Replace search lineEdit before we connect signals.
...
Avoids overriding the setup work we do on it.
2014-05-22 21:53:35 +10:00
Damien Elmes
7134da4cd6
enable houssam's fav code
2014-05-12 15:45:21 +09:00
Houssam Salem
3aeb5d86da
Added search saving feature to card browser.
2014-04-09 04:35:00 +10:00
Damien Elmes
9f6b073def
allow copy context item in info view
2014-03-27 16:48:26 +09:00
Damien Elmes
b562b8c6dc
Revert "fix some memory leaks"
...
This reverts commit b9ba2375a1
.
testing assumption that this is causing the windows crashes
2014-03-27 13:58:30 +09:00
Damien Elmes
29026b08e2
fix crashes and corruption in column headers
...
set all columns to interactive at once to work around qt5 issues
2014-03-14 15:41:00 +09:00
Damien Elmes
f9d93fa888
Revert "use a new header key on qt5 to fix drawing bug"
...
This reverts commit e063123218
.
2014-03-14 15:29:48 +09:00
Damien Elmes
b9ba2375a1
fix some memory leaks
2014-03-14 12:51:38 +09:00
Damien Elmes
e063123218
use a new header key on qt5 to fix drawing bug
2014-03-06 09:07:03 +09:00
Damien Elmes
776168b2ea
Merge pull request #62 from hssm/998
...
Issue #998 : Allow copy/paste and context menu in all card windows.
2014-02-15 23:43:15 +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
Houssam Salem
770c6e9c4a
Add expand/collapse support for decks in browser tree.
...
The state is preserved in a new deck configuration key named 'browserCollapsed'.
2014-02-15 13:32:14 +11:00
Damien Elmes
513b0ca8d7
ignore filtered cards when determining new card pos boundaries
2014-01-14 15:06:22 +09:00
Damien Elmes
c5df294a28
fix "local variable 'txt' referenced before assignment"
2014-01-13 19:07:34 +09:00
Damien Elmes
5bc25e494c
add fixme
2013-12-02 10:26:18 +09:00
Damien Elmes
dd1899bcc6
cascading column resize must be set after resize
2013-11-26 04:57:39 +09:00
Damien Elmes
3348b091d0
tweak logging
...
- log only sched getCard(), not all getCard calls
- don't log sched.today unless it's changed
2013-10-30 22:42:32 +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
d503b62cd1
fix display of non-latin tags
2013-10-08 07:42:06 +09:00
Damien Elmes
174914b7dc
scroll to newly added column in browser ( #978 )
2013-10-04 08:43:46 +09:00
Damien Elmes
b55761190f
option to tag notes in find dupes function
2013-10-04 00:07:11 +09:00
Damien Elmes
b49d52393e
add tags column in browser
2013-09-04 03:21:19 +09:00
Damien Elmes
51121f6e86
escape image links in clayout and preview as well ( #903 )
2013-06-10 15:28:34 +09:00
Damien Elmes
9101867224
only show browser close menu item on mac
2013-05-31 14:16:37 +09:00
Damien Elmes
d74338b6e9
allow font sizes > 20 in browser ( #492 )
2013-05-23 14:12:04 +09:00
Damien Elmes
8594c65510
treat preview window as a separate main window
2013-05-22 10:08:39 +09:00
Damien Elmes
d44348ea47
remove broken accelerator from preview button; add tooltip
2013-05-22 10:04:34 +09:00
Damien Elmes
85dfa4e5a4
ensure fmax>=fmin when rescheduling
2013-05-17 16:27:58 +09:00
Damien Elmes
f6f6537967
fix regression caused by preview code
...
we shouldn't blank out self.card when multiple cards selected, as a number of
other routines take it to mean the most recently selected card.
2013-05-10 15:02:58 +09:00
Damien Elmes
dbfe9529f9
fix race in preview mode, and fix preview shortcut keys in qt5
2013-05-09 15:32:30 +09:00
Damien Elmes
2c1194658e
remove unused onRevlog()
2013-05-04 15:45:57 +09:00
Damien Elmes
5951ccb09e
preliminary preview support
2013-05-04 15:45:57 +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
0994bd332c
cancel sync if user elects to keep unsaved card content ( #705 )
2013-04-11 19:23:32 +09:00
Damien Elmes
dcf38f2f10
allow shift click for OR query ( #688 )
2013-04-11 17:07:08 +09:00
Flavio Lerda
bc8b9d5110
Remove the right hook.
...
The code was removing a hook that was not added, with the result that
the hook was not actually being removed.
2013-04-09 22:58:04 +01:00
Andreas Klauer
5b768c03d2
surplus newline typo
2013-03-03 00:19:16 +01:00
Damien Elmes
c8d3d5a337
Merge branch 'master' of github.com:dae/anki
2013-02-26 19:11:56 +09:00
Andreas Klauer
6ddc276d57
workaround for filter tree onclick not working ( #729 )
2013-02-25 22:04:38 +01:00
Damien Elmes
8d2d998168
use question/answer for browser labels
...
by using a different label to the default front/back fields, it will hopefully make it clearer that a reversed card has the back side for the question
2013-02-22 11:13:59 +09:00
Damien Elmes
a2ad76dbb4
default to current deck when selecting ( #693 )
2013-02-20 15:25:59 +09:00
Damien Elmes
83cbace080
use double quotes for browser search quoting ( #623 )
...
when I did a search of AW decks a while back, double quotes were far less
prevalent than single quotes. ideally we'll add a way of quoting them in the
future.
2013-02-20 15:15:27 +09:00
Damien Elmes
02531e1db3
fix focus note option ( #563 )
2013-01-29 09:49:04 +09: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
ead1f005ec
fix concat of mid searches
2013-01-15 10:26:54 +09:00
Damien Elmes
120c1d4136
match a single note type in browser even if duplicate names
2013-01-15 06:15:27 +09:00
Damien Elmes
444e02f568
default browser line font to system default
2013-01-08 10:44:46 +09:00
Soren Bjornstad
96fd3de6e5
Apply same fix to "leech" as "marked".
...
"Leech" does not need to be displayed in the taglist as a tag, as it is
already listed as a special item further up the list.
2012-12-25 17:40:02 -06:00
Damien Elmes
d11a1e0d54
allow browser font customization on a per-template basis
2012-12-22 10:10:52 +09:00
Damien Elmes
eced132aa2
don't lose selection when changing deck
2012-12-22 09:44:52 +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