![]() |
#16 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,376
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
To test I built an action chain that turns off the search bar if the target library is "Library.test_small". Note the chain condition that tests the library name. I then set up an event to call that chain whenever the library is changed. This works fine. However, a chain that contains a single action to change the library works only once. Here is my test action chain: HideSearchBar.zip Here is the event definition: |
|
![]() |
![]() |
![]() |
#17 | |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,605
Karma: 7511185
Join Date: Sep 2020
Device: none
|
Quote:
edit: in this case, I think I misinterpreted the event Library Changed as Library Switched. Anyway, I finally got the layout action to run upon switching to a specific library, but what I think will be useful is something that will need more testing: for library A, show this; for library B, hide that... Last edited by Comfy.n; 07-10-2023 at 01:01 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,605
Karma: 7511185
Join Date: Sep 2020
Device: none
|
This was a very cool addition, thanks so much @chaley and OP for the suggestion!
The new 'Hide all' option provides an instant expansion of screen real estate, making it easier to adjust/order columns in book list mode. And it's awesome that anyone can run Calibre from source and take a peek at latest features. ![]() |
![]() |
![]() |
![]() |
#19 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,376
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
If I was doing this "in anger" I would probably build an action chain per library, setting up the panels as I want for that library, with a chain condition that checks the library name. I would then build a chain using "Chain Caller" to call each of these library chains. Finally, I would call the chain caller chain in the Library Changed and the Calibre Initialized events. NB: our hope is that there is enough of an API in this action to permit the View Manager to offer controlling which panels are visible using check boxes or what-have-you. Quote:
For amusement: my first implementation included a "Show all" action that turned out to be less than useful. In particular, showing the cover grid, the cover browser, and QuickView at the same time is best avoided. ![]() |
||
![]() |
![]() |
![]() |
#20 |
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,605
Karma: 7511185
Join Date: Sep 2020
Device: none
|
|
![]() |
![]() |
Advert | |
|
![]() |
#21 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,829
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#22 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,376
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The built-in buttons are toggles. |
|
![]() |
![]() |
![]() |
#23 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,829
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I managed to miss that.
![]() EDIT: Oh, a second page. |
![]() |
![]() |
![]() |
#24 | |
light mode user
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 66
Karma: 16268
Join Date: May 2023
Location: New England
Device: I use the Calibre ebook-viewer on macos and Apple Books on ios.
|
Quote:
Thanks for all the effort solving and adding a qol feature— it will be a great improvement to using multiple libraries and layouts on calibre! Last edited by arpeggioaccele; 07-13-2023 at 02:42 AM. |
|
![]() |
![]() |
![]() |
#25 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,376
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The new actions are in calibre release 6.23.
|
![]() |
![]() |
![]() |
#26 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,677
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Suggestion: apply the 'Layout actions' icon to the Layout button in the status bar, at the moment the button uses the Preferences icon so it can't be done effectively with an override.
BR |
![]() |
![]() |
![]() |
#27 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,376
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#28 |
light mode user
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 66
Karma: 16268
Join Date: May 2023
Location: New England
Device: I use the Calibre ebook-viewer on macos and Apple Books on ios.
|
I got the action chain working! It took me a while to figure out what went wrong; it was the little checkboxes that enable/disable the event trigger.
Using two chains to hide all layouts then enable the ones I wanted with the condition template = program: current_library_name() datatype = text condition value = Library name (why is book title and font choice displayed here, super confusing imo) Then I just called both chains when the event triggered, which is terribly slow but it was my first try lol. |
![]() |
![]() |
![]() |
#29 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,376
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The font and title boxes are shown because it is using the general template tester, which has no idea what you are trying to do. It gives you the value of the template for the current book(s), if it can figure out what the current book is. It also gives you access to the template debugger, which you didn't mention. Your condition template might be simple or it might be a multi-line complex GPM or Python template. Calibre can't know in advance/read your mind. As regards "terribly slow", the time will depend on the number of books in the library. Mine takes 0.5 seconds to switch libraries to my test library of 100 books, which for me isn't slow. For my test library of 50,000 books it taks 2.4 seconds, of which 2 seconds is calibre opening the library. Switching to a library with 1 book takes 0.1 seconds. Are these times similar to what you are seeing? It is taking longer than simply changing the library then pushing the layout buttons? To help with the comparison, what I have is:
|
|
![]() |
![]() |
![]() |
#30 | ||
light mode user
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 66
Karma: 16268
Join Date: May 2023
Location: New England
Device: I use the Calibre ebook-viewer on macos and Apple Books on ios.
|
Quote:
I just meant that I personally tried a dozen times to get the book title to switch to show the value of the template I was trying to use instead lol. Once I understood that book details did not actually pertain to the template value I wanted I gave up trying to click and actually read the instructions (https://www.mobileread.com/forums/sh...&postcount=172) I assumed that changing the font is generally done a single time even for a long program and just makes the UI cluttered— though I'm sure it has it's uses and it isn't at all confusing what it is for. I copy paste stuff if its long anyways. Quote:
I have around 15k books in my main calibre library, I was mostly exaggerating about the speed. You're right, changing the layout is hardly longer than loading the database. I only mentioned it because I think I am unnecessarily loading covers when I do not need to. I assume that if I do not load the covers, it will eliminate the quite fast loading time. If I turn off covers before switching libraries, there would be no loading time, the button pushing in this order (using action chains) might actually be faster. In short, it is my implementation that is the slow part, not the plugin at all! Since it was my first try, I did not get around to using the chain caller action you suggest but I will try it next for nth library I have. Last edited by arpeggioaccele; 07-17-2023 at 02:53 AM. |
||
![]() |
![]() |
![]() |
Tags |
layout, switch |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
New keyboard layouts for M92 | docidocus | Onyx Boox | 4 | 07-22-2014 06:27 AM |
QWidget Layouts | Agama | Development | 1 | 08-16-2012 03:32 PM |
903 Not all layouts available after installing FBReader | Fractalus | PocketBook | 3 | 12-18-2011 12:40 PM |
Advice for two column layouts? | stickybuns | Workshop | 5 | 04-20-2011 07:12 AM |
PRS-600 Additional keyboard layouts | Shiimis | Sony Reader Dev Corner | 2 | 04-05-2010 01:47 PM |