Quote:
Originally Posted by thiago.eec
Hi, Chaley.
I have two questions:
1) What is the is_multiple argument used for? I could not understand this parameter.
|
The is_multiple parameter tells calibre if text or composite columns hold a single value or are comma-separated (tags-like) columns. If is_multiple is True then the 'is_names' boolean in the display tells calibre if a text column is ampersand-separated instead of comma-separated (contains names ).
Quote:
2) When using calibre preferences, I can create multiple columns before restarting. Can't that be replicated with the API? I plan to use this on my Skoob Sync plugin, but the user must configure seven columns, hence seven restarts.
|
You can create as many columns as you want with a single instance of the class, as like this:
Code:
creator = CreateNewCustomColumn(gui)
result1 = creator.create('#col1', ...)
--- check result1 for correctness ---
result2 = creator.create('#col2', ...)
--- check result2 for correctness ---
Any instance created after one is used to create columns and before calibre is restarted will refuse to create columns.
This system is similar to what you see with calibre preferences. You can create etc as many columns as you wish using one dialog, but you can't do it again until you restart.