This commit is contained in:
Marshall T. Vandegrift 2008-06-17 17:10:59 -04:00
commit 7727918de3
3 changed files with 5 additions and 1 deletions

View File

@ -84,6 +84,7 @@ class UserProfiles(QDialog, Ui_Dialog):
self.populate_options(recipe)
self.stacks.setCurrentIndex(0)
self.toggle_mode_button.setText(_('Switch to Advanced mode'))
self.source_code.setPlainText('')
else:
self.source_code.setPlainText(src)
self.highlighter = PythonHighlighter(self.source_code.document())

View File

@ -337,6 +337,9 @@ def do_set_metadata(db, id, stream):
mi = OPFReader(stream)
db.set_metadata(id, mi)
do_show_metadata(db, id, False)
if SingleApplication is not None:
sa = SingleApplication('calibre GUI')
sa.send_message('refreshdb:')
def command_set_metadata(args, dbpath):
parser = get_parser(_(

View File

@ -1422,7 +1422,7 @@ ALTER TABLE books ADD COLUMN isbn TEXT DEFAULT "" COLLATE NOCASE;
mi = OPFCreator(base, self.get_metadata(idx, index_is_id=index_is_id))
cover = self.cover(idx, index_is_id=index_is_id)
if cover is not None:
cname = name + '.jpg'
cname = sanitize_file_name(name) + '.jpg'
cpath = os.path.join(base, cname)
open(cpath, 'wb').write(cover)
mi.cover = cname