View Single Post
Old 08-19-2016, 01:52 PM   #125
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,334
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
@nabsltd - View Manager doesn't have a concept of 'leaving a view'. My first thought is to suggest exactly what you say you don't want to do--apply the 'empty' restriction on your 'normal' view.

It would be technologically possible to add a 'leaving a view' concept; where 'leaving a view' is defined as 'a different VM view is being applied'--there's no way I know of to trigger the PI if you change part of the view manually. But I'm not convinced the utility of it would be greater than the complexity of adding it, when applying a view with empty restriction is so functionally similar.

You could define a View that clears the restriction, invoke it and then invoke your 'normal' view when you want it cleared. Keyboard shortcuts will speed it up, too. (My 'normal' view is mapped to the space bar, for example.)

Quote:
Originally Posted by BetterRed View Post
I can imagine that idea of 'hooking' a View to a specific Virtual Library would be useful to some people. For me it would have to be optional, i.e. 'blank' would be in the list of Virtual Libraries. And View switching within a Virtual Library would have to be available, as it is now.
I agree that switching VLs instead of using restriction searches seems like a better idea.

But it doesn't sound like it's something you'd plan to use. And it's not something I'd plan to use. And you're the only person who's said anything about it. That suggests that there's not very much interest in it...

Quote:
Originally Posted by BetterRed View Post
Conceptually, I would prefer the inverse, i.e. in a Virtual Library definition, I could specify the default View to use when the VL is opened.
VM can apply a view when the library is changed because there's a library_changed() hook that's called on each plugin. I don't know if there is such a hook for changing VLs.

And ff you try putting the configuration for choosing a VM view in the VL definition code (vs the VM config), you'd practically need to add the PI to the calibre core--so I doubt that will happen. Configuring it from the VM PI config is possible, but admittedly less convenient.

Plus, while VM view can have keyboard shortcuts, I don't see anywhere to configure Virtual Libraries to keyboard shortcuts. That's a big incentive, IMO, to set VL based on VM View instead of VM View based on VL.

TL;DR: Jim's not sufficiently motivated/convinced to make either of these changes at this time.
JimmXinu is offline   Reply With Quote