Commit graph

216 commits

Author SHA1 Message Date
Henrik Giesel
956beae044 Close previewer if there is no card to render 2021-01-10 02:01:24 +01:00
Henrik Giesel
961de57ed9 Fix formatting, use shortcut on preview before displaying 2021-01-10 01:50:00 +01:00
Henrik Giesel
3e1cf6c986 Prevent error when browser is closed with previewer open 2021-01-10 01:21:52 +01:00
Henrik Giesel
5aa6281521 Add shortcut to new preview button 2021-01-10 00:00:19 +01:00
Henrik Giesel
2fa91e6480 Remove preview button from browser.py top bar 2021-01-09 23:25:56 +01:00
Henrik Giesel
f3f1849148 Make button show its toggle state 2021-01-09 23:16:01 +01:00
Henrik Giesel
1e3e7ccfcd Put Preview button into editor inside browser 2021-01-09 22:34:53 +01:00
RumovZ
0ebaf98c96 Compare and save filters normalised
When checking whether the current search is a saved filter, compare the
searches normalised to allow the detection of equivalent expressions.
Invalid searches are accepted unaltered to allow the deletion of invalid
saved filters.
As for saving new filters, do so normalised, respectively, reject
invalid searches.
2021-01-07 22:11:21 +01:00
RumovZ
5a559cab16 Format 2021-01-07 18:20:14 +01:00
RumovZ
ad361e7a77 Provide ConcatSeparator through rsbackend.py 2021-01-07 17:48:30 +01:00
Damien Elmes
2b5ef0b9a8 fix qt/ pylints 2021-01-07 16:21:50 +10:00
Damien Elmes
8075d46011 convert setWindowFlags call into helper, and fix invalid variables
"type: ignore" was masking the invalid references to self in places
like showText()
2021-01-07 14:24:49 +10:00
Damien Elmes
73eec46bda Merge pull request #860 from RumovZ/norm-search
Normalise search
2021-01-07 10:51:36 +10:00
RumovZ
ac4d254793 Merge branch 'master' of https://github.com/ankitects/anki into norm-search 2021-01-06 20:57:24 +01:00
RumovZ
85cb9c318c Format 2021-01-06 20:35:11 +01:00
RumovZ
163f92729d Add exception handling for filter modifications 2021-01-06 20:25:13 +01:00
RumovZ
0b1eec9cd8 Add tests for writer.rs
Also minor adjustments to concatenate_searches.
2021-01-06 19:39:34 +01:00
RumovZ
f061ccfb02 Implement search replacing via Ctrl+Shift combo
Also switch to using the new backend functions for concatenating and
negating searches.
2021-01-06 18:32:29 +01:00
BlueGreenMagick
9a29d1b97a remove context help button 2021-01-06 22:15:48 +09:00
RumovZ
8c0d666431 Adjust frontend to normalized search syntax 2021-01-06 14:05:28 +01:00
Damien Elmes
3123e6df7f do tag rename and tag clearing in background; move logic to tags.py
Because the logic is in rename_tag() now, it means we create a
checkpoint even if the tag is orphaned. This is because currently
checkpointing is a GUI responsibility. In the future we need to introduce
multi-level undo, and should move responsibility for managing it
to the backend.
2021-01-04 14:14:39 +10:00
Arthur Milchior
5c7dbdf72b NF: Add a hook to change the default search from reviewer
The goal here is to simplify my add-on which show a single card or the whole deck when the browser open
2021-01-02 19:49:11 +01:00
RumovZ
6ad500db55 Make function names more explicit and add docs 2020-12-29 11:18:49 +01:00
RumovZ
f61cc9112d Norm search 2020-12-22 11:08:47 +01:00
Damien Elmes
68311500b3 update remaining python format strings to Fluent 2020-11-22 14:57:53 +10:00
RumovZ
f05e70a03e Merge branch 'master' into rework-search-parser
Conflicts:
    rslib/src/search/sqlwriter.rs
2020-11-18 09:04:04 +01:00
Damien Elmes
072b626535 formatting fix 2020-11-18 13:48:23 +10:00
Damien Elmes
d1a23fd65a fix browser updateTitle() 2020-11-18 13:40:21 +10:00
Damien Elmes
b02badb224 update multi-line _() references 2020-11-18 11:32:22 +10:00
Damien Elmes
686b640e11 update some qt ngettext references 2020-11-18 09:22:27 +10:00
Damien Elmes
2feddb3d70 update temporary val="%s" references to standard ftl 2020-11-17 22:00:44 +10:00
Damien Elmes
066b1498ae merge bulk of qt/ - designer files still to do 2020-11-17 17:42:43 +10:00
RumovZ
8fc5d4c897 Update frontend search escapes to new parsing 2020-11-14 20:37:40 +01:00
RumovZ
7f9aa879b5 Fix clicking filters with keyboard modifiers 2020-11-08 11:05:11 +01:00
Soren Bjornstad
e8b40ec7d5 start with default value in reposition text box highlighted
This saves a keystroke if you want to replace the default value. It's
hard to imagine a situation in which you would want to *prepend*
characters to the default value, as is the current behavior. If you want
to accept the default value, you can still hit enter or tab immediately.
2020-11-02 19:07:53 -06:00
RumovZ
00a5a6ff33 Work around Qt's focus bug (fix help-wanted#22)
Manually hide the editor's completer popup before accepting a short cut which changes the focus widget. Thus, work around the bug in PyQt 5.15 where a QLineEdit with open QCompleter popup won't get notified about focus changes handled by the Main Window, leading to inconsistent focus.
2020-10-24 10:47:25 +02:00
Damien Elmes
00a71b6499 Merge pull request #799 from hgiesel/cal
Introduce Browser.search_for and Browser.update_search
2020-10-21 21:31:21 +10:00
Damien Elmes
dff4849241 Merge pull request #798 from abdnh/escape-quotes-in-search
Escape double quotes in search
2020-10-21 21:28:51 +10:00
Henrik Giesel
ee34a3458c Turn update_search into its own method 2020-10-19 21:07:29 +02:00
Henrik Giesel
bd9fca786d Add search prompt for setupSearch 2020-10-19 20:57:19 +02:00
Henrik Giesel
634a6f04d1 Add uses of search_for 2020-10-19 20:51:36 +02:00
Henrik Giesel
ae26e2fc70 Add search_for method 2020-10-19 20:37:17 +02:00
abdo
0c7726f87e Escape double quotes in search 2020-10-19 01:06:41 +03:00
abdo
5463b13128 Fix typing warning 2020-10-12 11:01:15 +03:00
abdo
e0bbf38850 Do sidebar switch check in browser init
https://github.com/ankitects/help-wanted/issues/6#issuecomment-706880794
2020-10-12 10:28:21 +03:00
abdo
3d3e68ed7a Merge branch 'sidebar-context-menu' of https://github.com/abdnh/anki into sidebar-context-menu 2020-10-12 10:15:23 +03:00
Damien Elmes
597b81ebeb Merge pull request #782 from johan456789/patch-1
fix outdated help site
2020-10-12 12:15:46 +10:00
abdo
401485834b Move new sidebar code to a separate file
- Move the new sidebar code and SidebarTreeView implementation to a
  new file. Old sidebar can be accessed with the shift key. The "new" sidebar
  doesn't add much for now.
- Make rename_deck work with subdecks
- Fix an issue when trying to open context menu over areas not populated
  with sidebar items
2020-10-10 04:42:49 +03:00
abdo
69f9543fda Merge commit 'refs/pull/590/head' of https://github.com/ankitects/anki into sidebar2 2020-10-10 04:11:54 +03:00
johan456789
0ebe5d14eb fix help url paths 2020-10-10 00:38:07 +08:00