![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Aug 2015
Device: none
|
save expanded tags on exit or some other way
on the left of the calibre window is a list of tags (Authors; Languages; Series; ...). they have little triangles pointing to the right. when you click on the triangle the tag expands to show tags subsidiary to that tag (subcategories).
those have further subcategories/tags. THE QUESTION: is there some way to set a default for which tags are expanded. For example when you exit calibre and restart it could calibre return to the previous state? If this is not already possible could someone please add it? or give me a hint how to do it myself? thank you :-) |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,316
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
IIRC there is nothing in base calibre to do this. Though check the view manager plugin it might allow you to do it already or if not, is probably the right place to add such functionality.
Things lie the current search and virtual library and tag browser state are deliberately not restored in base calibre. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Boox Note Air
|
![]()
Thanks Kovid, out of curiosity I checked out the (otherwise terrific) "View Manager" plugin but I could not find a way to automatically expand the tags in "Tag Browser"...@kiwidude can you confirm?
|
![]() |
![]() |
![]() |
#4 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,706
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
That said, View Manager (VM) does not have any interaction with the Tag Browser (TB) that I'm aware of, so I doubt it can offer a solution. I use VM extensively across several libraries, and I normally have the TB hidden. I'm not aware of any plugins that offer any customisation of the TB, everything is done either in the TB itself, or in Preferences->Look & feel->Tag browser. At a surface level, a Preserve category expansion checkbox in L&F->TB->Display would do the trick. @chaley may have some ideas, he does most of the changes in this regard. BR |
|
![]() |
![]() |
![]() |
#5 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,728
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
No the functionality doesn't exist in any of my plugins, the closest to it in terms of code required is the User Category plugin which has the code to view/expand a node in the tag browser.
It's not a feature of personal interest/use nor have I seen it requested so it isn't something I am rushing to add to the View Manager plugin. If someone else wants to submit a patch or indeed as BetterRed suggested incorporate into the tag browser options within calibre itself then those are your more likely options at this point. Last edited by kiwidude; 12-14-2024 at 10:40 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,412
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
For several reasons I am not willing to add restoring the expanded/collapsed state of the entire tree. The major reason is that I personally have no use for it and don't want to deal with the inevitable maintenance, complaints, change requests, and bug reports. The second reason is that performance would likely be awful.
However, I could add an option in L&F to restore the visibility of the currently focused item in the TB, which is the last item expanded, collapsed, or clicked upon. Of course, the expansion depends on the item still being there. Let me know if this is of use. |
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Boox Note Air
|
What @chaley suggests, i.e. to add an option in L&F to restore visibility of the last expanded sub-node, seems to me absolutely ideal. I would definitely find that useful, and while this feature might not have been requested much, I am sure it will find its public. Thanks @chaley, @kovidgoyal and @kiwidude!
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
I would also find it useful. I have a list of "Saved Searches" that I expand each time I start up Calibre, so that setting would be ideal.
Thank you @chaley |
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,412
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I submitted the changes. I will add a post if and when Kovid accepts them into calibre source.
Prefs / Look & feel / Tag browser contains the new option, unchecked by default. The implementation provides an API for plugins. To get the current expanded item: Code:
tbw = gui.tb_widget state = tbw.get_expansion_state() Code:
tbw = gui.tb_widget tbw.restore_expansion_state(state) |
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,412
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The changes are now in calibre source.
|
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Boox Note Air
|
Thanks a tonne @chaley, the option works like a charm (although the node of the expanded item appears at the top of the Tag browser list, hence hiding the non-expanded items above it) !
|
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,412
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Qt scrolls the tree until the selected item is visible, preferring to place that item as close to the center of the widget as it can. Which item is at the top of the screen comes from that. There's no guarantee that it is a top level node. |
|
![]() |
![]() |
![]() |
#13 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2021
Device: Boox Note Air
|
Right!
|
![]() |
![]() |
![]() |
Tags |
tags list |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dragging a book into an expanded Hierarchy level collapse other expanded levels | ChrisMillward | Calibre | 3 | 07-04-2020 06:02 AM |
How can I save all my tags to a file, and how can another macOS Calibre user it? | adrianf | Calibre | 17 | 03-15-2020 07:05 PM |
Sigil adding unwanted tags on Save | Chaihana Joe | Sigil | 5 | 12-09-2019 03:28 PM |
Remove tags and rating from save-to-disk | Sparkling | Calibre | 5 | 01-10-2011 03:23 AM |
Save to disk and Tags | tselling | Calibre | 2 | 08-30-2009 09:05 PM |