z1dev / zkanji

Japanese language study suite and dictionary
GNU General Public License v3.0
60 stars 10 forks source link

Feature Request -- Add kanji to group from dictionary view(s) #21

Closed am2del closed 6 years ago

am2del commented 6 years ago

Menu-clicking in dictionary-view(s) currently doesn't allow adding Kanji to Kanji-groups - only words to Word-groups. It would be practical if possible to allow this, preferably where user can check/uncheck which of the kanji is appended to the Kanji-group - similar to how things are added to Study-decks.

It could be nice to be offered to copy and/or add to Kanji-group from the "Kanji Information Dialog" as well.

z1dev commented 6 years ago

There is a "kanji" submenu in the context-menu of words, or alternatively you can select the kanji you wish to add to a group like you would select text in a text editor, and add to group from the context-menu there.

It could be nice to be offered to copy and/or add to Kanji-group from the "Kanji Information Dialog" as well.

I plan to implement the context-menu of the kanji information like it is in the old zkanji. Not sure if I will add all the options, but I want to have everything reasonable. The context-menu there allows changing the display settings of the S.O.D. like show shadow or not, or speed. It has add kanji to group or copy it to clipboard etc. The only one I might not include is the "translate kanji," because it copied the kanji to the dictionary, but with the current interface design there can be any number of dictionary widgets open. I'm not yet sure what solution would be best in such cases.

z1dev commented 6 years ago

The context-menu in the kanji information should be working now. I'm not sure what else should I do for the original issue. I will close it if you agree because there is nothing to do with it.

am2del commented 6 years ago

Looking good, two small details aside:

1) One minor addition request, as it seems logical to be available here: Add kanji to group...-option

2) A minor BUG (?) @ the right-hand field in Kanji Information Dialogue, the column which houses all the data - hereforth referred to as INFO_AREA: --> MENU_CLICK in the INFO_AREA to open the CONTEXT_MENU, (available options should be just three) --> CLICK anywhere inside the INFO_AREA making the CONTEXT_MENU dissapear, --> and... (Oops!) it automaticly scrolled down to the bottom (!) Is this SCROLLING-behaviour a BUG parhaps?

It seems no. 2 also appears opon selecting the Copy kanji data-option in the CONTEXT_MENU appearing @ MENU_CLICK within the DIAGRAM_AREA (left-hand field) - BUT then sometimes scrolls all the way and sometimes just half-way.

I got no good ideas as to why this occours... sorry. Just, perhaps, both are caused by the same thing - so fixing either may fix both?

z1dev commented 6 years ago

"Add kanji to group..." option should now be there. I also reordered the options slightly.

A minor BUG (?) @ the right-hand field [...]

I can't tell what causes that. There is no code written for the info area, it's handled by Qt. I assume it's either a Qt bug, or there is no other way to access the text in that area than by moving the text cursor to the end. Or maybe it always scrolls to the current cursor position which happens to be at the end of the text.

Instead of implementing my own text field there, I use the built in QTextEdit, set to read-only. Basically it's a text editor widget with rich-text support. Some operations, like inserting new lines or formatting the text require the text cursor to be moved around in a very clumsy way, which can result in scrolling, but there is no such thing happening when showing the context-menus.

am2del commented 6 years ago

Build (UTC): 2018-03-24 @ 07:44

"Add kanji to group..." option should now be there. I also reordered the options slightly.

Looking great! The only option I don't see in the CONTEXT_MENU is the "Stroke order diagram (S.O.D.)" <--> "Font" display selection. Add or not, your decision.

I can't tell what causes that. There is no code written for the info area, it's handled by Qt. [...] Instead of implementing my own text field there, I use the built in QTextEdit, set to read-only.

Given this, my guess is that QT performs a SELECT_ALL which moves the cursor from top-to-bottom thus caused the scrolling effect... but difficult to tell - in current build this issue has been resolved.

You can close this issue.

z1dev commented 6 years ago

The only option I don't see in the CONTEXT_MENU is the "Stroke order diagram (S.O.D.)" <--> "Font" display selection.

It is there at the bottom called "Stroke order diagram," right above the "Background grid." What I don't quite like is that when you uncheck it, I don't add the options for the diagram in the context-menu. I might put them back just grayed out but I'll close this issue for now.