View Single Post
Old 01-01-2011, 03:28 PM   #174
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by kacir View Post
Hi.

I would like to have a plugin that would enable me to put a frequently used option directly on a toolbar.

There is an option in Preferences -> Import / Export -> Adding books -> swap author Firstname and Lastname.
I change that option very often and it is always lots of clicks, plus I sometimes forget what is the latest setting. Another User Unfiendly feature of that panel is that the Apply button is in the top left corner, the Close button in the parent dialog is in the right left.
At first when not reading this properly I thought you meant the edit metadata dialog to swap names after the import but I understand now on re-reading it. I guess the question I would have would be how you would visually show what option you have selected. I guess perhaps a split button dropdown with a toggle on the menu option and displaying a tickmark next to it would be a conventional approach?

Quote:
Originally Posted by kacir View Post
Another lot candidate for placing on the "Toolbar Frequently Used Options" would be 4 versions of regular expression for importing new books.
Yes I do believe it is an area for "enhancement" on the preferences dialog, I could not understand why there was not at least a history dropdown on there when I first started using Calibre. However continually clicking all the way into the dialog to make a change before adding books would be too painful - your suggestion of toolbar access sounds better. However as each "button" would have to be a separate plugin I think you would be better writing a single plugin button with a split dropdown (like the Add button has). You could assign keyboard shortcuts too. If making it available to others you would want to offer some way to configure the regex options - ideally via the plugin preferences dialog. Only downside would be requiring a Calibre restart each time you add/remove an option (rebuilding the menus only occurs at Calibre startup) but given how infrequently you would do that I think it is acceptable. It might even be possible to get around that, just that it hasn't "been done" yet within Calibre I have seen.

What I do is use a tool to rename the files before adding to Calibre so they always match my regex but if you want to avoid that I can see this as a popular solution.

Quote:
Originally Posted by kacir View Post
Is it possible to make such plugin? Could I make a my private version of Calibre by simply copying a little piece of code from the settings dialog to the source for the toolbar layout?
I believe both the above could be done quite elegantly as plugins. So you would not need to actually modify the source code of Calibre and "have a private version".

If you want to write these yourself, go for it. If you want me to do them for you I'm happy to do so, on holiday at the moment so thumb twiddling...

EDIT: Ok, I couldn't resist. I'm working on writing this for you. I will combine all the requirements into one button. Basically it will let you change any of the adding preferences by clicking on the toolbar dropdown menu button, so the three checkbox options that are there now, plus the ability to switch between up to 4 user configurable regular expressions. We'll see how it goes...

Last edited by kiwidude; 01-01-2011 at 09:01 PM. Reason: Further comments
kiwidude is offline