-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dispatcher: allow sorting actions #9531
Conversation
Thank you. A couple of notes: |
More changes to the Profiles module are required. I may proceed with them after you finish the Dispatcher. |
Dispatcher now automatically sorts items by when they were added. (adding an item adds it to the sortlist, and removing an item deletes it). This allow not having to worry if the sort list is synced.
I know. :) This still needs to be dealt with.
Please give me a few more days, as this is not finished yet (quickmenu etc) |
7fb0dc9
to
ada81a7
Compare
Still looking for ways to arrange/fix this |
frontend/dispatcher.lua
Outdated
local ButtonDialogTitle = require("ui/widget/buttondialogtitle") | ||
quickmenu = ButtonDialogTitle:new{ | ||
--name = name, | ||
title = "Quick Menu", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For profiles we need to see the profile name here.
Can we get a screenshot to know what you're talking about ? :) |
With the latest commits the conception has changed: the profile can be either executed or shown as QuickMenu, not both options. I'm fine with that. |
So far I only used profiles in full, because my profiles are basically font face, font weight, font size and line spacing. So if I activated a profile and found out that, for example, line spacing doesn’t fit here, I’d just go to bottom menu to tweak it, not profile’s quick menu. However, in a broader sense I’d imagine someone with a night mode + font + brightness changing profile wanting to activate only night mode with fonts, but not brightness. |
Rosh Hashana is this monday & tuesday so i will not have time to finish this untill late next week at the earliest.
|
Not directly oncerns this PR, but Dispatcher and creoptions and koptoptions. Are there any reasons to give the same names to actions in cre and pdf documents? Eg
The crash is caused by koreader/frontend/document/pdfdocument.lua Lines 61 to 66 in c3cd88e
We try to set font size to 22*22 and get OOM crash. |
I think values are good! Makes more sense when you see what actually you are going to apply. Also why the first two items different? Only these have verbs, others just say what the option is named and its value |
I mean, is this intentional and you plan to add verbs to all of them? |
Current original strings from Dispatcher are displayed. |
@mergen3107, maybe it is of interest for you: #8590 (comment) and further |
Indeed :/ Moreover, they are 2 non-actions between a lot of actions (items or submenus). |
43f0126
to
4d9f7b4
Compare
Ready on my end. |
4d9f7b4
to
1894082
Compare
The reason dispatcher has different names is that the names are based on the names in Using
These interactions were discussed when dispatcher was first implemented, and the consensus was that if a user should be smart enough not to shoot himself in the foot, as technically the user can set many contradictory events. |
cdbe342
to
6b78191
Compare
Thanks, works good! A couple of propositions: A fix required: |
726befa
to
97a4737
Compare
Fixed |
Done |
|
d5cdf97
to
c83e6f5
Compare
Done |
Fix condition check, simplify getNameFromItem Allow sorting Dispatcher items and displaying them as a QuickMenu
f511458
to
345bf3c
Compare
Great! |
@hius07 |
It is now very clear/ logical Profiles - Dispatcher interaction, I think it is worth to wait for users' response on using it, before any further development. |
Unless maybe make registering a profile to Dispatcher optional? |
Checked again with current master, same behaviour. ["multiswipe_northwest_southwest_northwest"] = {
["font_base_weight"] = 1,
["font_kerning"] = 1,
["settings"] = {
["order"] = {
[1] = "font_base_weight",
[2] = "font_kerning",
[3] = "increase_font",
},
},
},
I only used |
…he sort index Discovered by @poire-z in koreader#9531 (comment)
The important part. :) |
I confirm that the issue did not happen when you don't do my "first by setting default value 0" :) Minor and probably unrelated issue and probably not worth thinking about it (@hius07 ?): |
It is unexpected for SpinWidget that the default value is less than min value. koreader/frontend/dispatcher.lua Line 145 in da65ac8
koreader/frontend/dispatcher.lua Line 703 in da65ac8
Anyways, I think there should not be any default value for this case. |
…he sort index (#9628) Discovered by @poire-z in #9531 (comment)
I'd propose to change koreader/frontend/dispatcher.lua Line 699 in f3620b6
to value = location[settings] ~= nil and location[settings][k] or settingsList[k].min,
and remove line koreader/frontend/dispatcher.lua Line 705 in f3620b6
Applicable for all |
KOReader 2022.10 "Muhara" ![koreader-2022-10](https://user-images.githubusercontent.com/202757/197379886-75c933df-8236-4be2-9287-304a88778b67.png) We skipped last month's release because I was right in the middle of moving, which serendipitously coincided with fairly drastic changes that needed more time for testing, such as a big rewrite of gestures and multitouch (koreader#9463). Users of the Dropbox plugin will now be able to use the new short-lived tokens (koreader#9496). <img width="40%" alt="image" src="https://user-images.githubusercontent.com/59040746/193070490-a3d477db-bd82-431b-95fd-2c4765244378.png" align="right">One of the more visible additions is the new Chinese keyboard contributed by @weijiuqiao, based on the [stroke input method](https://en.wikipedia.org/wiki/Stroke_count_method) (koreader#9572). It's not smart and it requires knowledge of stroke order. A tutorial can be found [here](https://github.com/koreader/koreader/wiki/Chinese-keyboard), part of which I will reproduce below. <hr> The stroke input method groups character strokes into five categories. Then any character is typed by its stroke order. | Key | Stroke type | | ------ | ------ | | `一` | Horizontal or rising stroke | | `丨` | Vertical or vertical with hook | | `丿` | Falling left | | `丶` | Dot or falling right | | `𠃋` | Turning | For example, to input 大, keys `一丿丶` are used. Note all turning strokes are input with a single `𠃋` key as long as they are written in one go. So 马 is input with `𠃋𠃋一`. After getting the intended character, a `分隔`(Separate) or `空格`(Space) key should be used to finish the input. Otherwise, strokes of the next character will be appended to that of the current one thus changing the character. Besides, the keyboard layout contains a wildcard key `*` to use in place of any uncertain stroke. Swipe north on the `分隔`(Separate) key for quick deletion of unfinished strokes. <hr> Logo credit: @bubapet We'd like to thank all contributors for their efforts. Some highlights since the previous release include: * NewsDownloader: Strip byte order mark from xml string before parsing (koreader#9468) @ad1217 * GestureDetector: Full refactor for almost-sane(TM) MT gesture handling (koreader#9463) @NiLuJe * Kobo: Unbreak touch input on fresh setups on Trilogy (koreader#9473) @NiLuJe * Kobo: Fix input on Mk. 3 (i.e., Kobo Touch A/B). (koreader#9474, koreader#9481) @NiLuJe * Kindle: Attempt to deal with sticky "waking up" hibernation banners (koreader#9491) @NiLuJe * Add "Invert page turn buttons" to Dispatcher (koreader#9494) @NiLuJe * [UIManager] Outsource device specific event handlers (koreader#9448) @zwim * AutoWarmth: add a choice to control warmth and/or night mode (koreader#9504) @zwim * Allow F5 key to reload document (koreader#9510) @poire-z * bump crengine: better SVG support with extended LunaSVG (koreader#9510) @poire-z * CRE/ImageViewer: get scaled blitbuffer when long-press on SVG (koreader#9510) @poire-z * RenderImage: use crengine to render SVG image data (koreader#9510) @poire-z * Wikipedia EPUBs: keep math SVG images (koreader#9510) @poire-z * TextViewer: add Find (koreader#9507) @hius07 * A random assortment of fixes (koreader#9513) @NiLuJe * Add Russian Wiktionary dictionary (koreader#9517) @Vuizur * add custom mapping for tolino buttons (koreader#9509) @hasezoey * Profiles: add QuickMenu (koreader#9526) @hius07 * ImageViewer: Clamp zoom factor to sane values (koreader#9529, koreader#9544) @NiLuJe * ReaderDict: fix use of dicts with ifo with DOS line endings (koreader#9536) @poire-z * Kobo: Initial Clara 2E support (koreader#9545) @NiLuJe * TextViewer: add navigation buttons (koreader#9539) @hius07 * ConfigDialog: show button with default values in spinwidgets (koreader#9558) @hius07 * Misc: Get rid of the legacy defaults.lua globals (koreader#9546) @NiLuJe * Misc: Use the ^ operator instead of math.pow (koreader#9550) @NiLuJe * DocCache: Unbreak on !Linux platforms (koreader#9566) @NiLuJe * Kobo: Clara 2E fixes (koreader#9559) @NiLuJe * Keyboard: add Chinese stroke-based layout (koreader#9572, koreader#9582) @weijiuqiao * Vocabulary builder: add Undo study status (koreader#9528, koreader#9582) @weijiuqiao * Assorted bag'o tweaks & fixes (koreader#9569) @NiLuJe * ReaderFont: add "Font-family fonts" submenu (koreader#9583) @poire-z * FileManager: add Select button to the file long-press menu (koreader#9571) @hius07 * Dispatcher: Fixes, Sort & QuickMenu (koreader#9531) @yparitcher * Cloud storage: add Dropbox short-lived tokens (koreader#9496) @hius07 * GH: Extend the issue template to request verbose debug logs for non-crash issues. (koreader#9585) @NiLuJe * Logger: Use serpent instead of dump (koreader#9588) @NiLuJe * LuaDefaults: Look for defaults.lua in $PWD first (koreader#9596) @NiLuJe * UIManager: Don't lose track of the original rotation on reboot/poweroff (koreader#9606) @NiLuJe * ReaderStatus: save status summary immediately on change (koreader#9619) @hius07 * [feat] Add Thai keyboard (koreader#9620) @weijiuqiao * Dispatcher: Fix subtle bug with modified items being added twice to the sort index (koreader#9628) @yparitcher * Vocabulary builder: supports review in reverse order (koreader#9605) @weijiuqiao * Exporter plugin: allow adding book md5 checksum when exporting highlights (koreader#9610) @sp4ke * buttondialogtitle: align upper borders (koreader#9631) @hius07 * Kobo: Always use open/write/close for sysfs writes (koreader#9635) @NiLuJe * OPDS-PS: Fix hardcoded namespace in count (koreader#9650) @bigdale123 [Full changelog](koreader/koreader@v2022.08...v2022.10) — [closed milestone issues](https://github.com/koreader/koreader/milestone/59?closed=1) --- Installation instructions: [Android](https://github.com/koreader/koreader/wiki/Installation-on-Android-devices) • [Cervantes](https://github.com/koreader/koreader/wiki/Installation-on-BQ-devices) • [ChromeOS](https://github.com/koreader/koreader/wiki/Installation-on-Chromebook-devices) • [Kindle](https://github.com/koreader/koreader/wiki/Installation-on-Kindle-devices) • [Kobo](https://github.com/koreader/koreader/wiki/Installation-on-Kobo-devices) • [PocketBook](https://github.com/koreader/koreader/wiki/Installation-on-PocketBook-devices) • [ReMarkable](https://github.com/koreader/koreader/wiki/Installation-on-ReMarkable) • [Desktop Linux](https://github.com/koreader/koreader/wiki/Installation-on-desktop-linux) • [MacOS](https://github.com/koreader/koreader/wiki/Installation-on-MacOS)
mostly borrowed from @hius07 in #9526
Lightly tested.
This change is