View Single Post
Old 05-01-2012, 03:55 PM   #221
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: 7,045
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Found a couple more problems:

Adding a new named setting fails:
Spoiler:
Code:
calibre, version 0.8.49
ERROR: Unhandled exception: <b>NameError</b>:global name 'settings' is not defined

Traceback (most recent call last):
  File "calibre_plugins.generate_cover.dialogs", line 379, in add_setting
NameError: global name 'settings' is not defined


GC doesn't handle a configured font being removed well:
Spoiler:
Code:
calibre, version 0.8.49
ERROR: Unhandled exception: <b>IndexError</b>:list index out of range

Traceback (most recent call last):
  File "calibre_plugins.generate_cover.action", line 53, in _generate_cover
  File "calibre_plugins.generate_cover.dialogs", line 1125, in __init__
  File "calibre_plugins.generate_cover.dialogs", line 1315, in display_preview
  File "calibre_plugins.generate_cover.draw", line 232, in generate_cover_for_book
  File "calibre_plugins.generate_cover.draw", line 44, in get_textline
  File "calibre_plugins.generate_cover.draw", line 38, in get_font_or_default
IndexError: list index out of range

Unsurprisingly, importing a setting with a font that isn't installed does the same thing when you try to use it. Maybe check fonts on import, and report missing ones while changing to default?

While not necessarily a problem, I'd expect it to ask if I wanted to save unsaved changes before exporting a setting.

Jim
JimmXinu is offline   Reply With Quote