diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py
index 013d13f9e7..04bc5284ed 100644
--- a/src/calibre/gui2/comments_editor.py
+++ b/src/calibre/gui2/comments_editor.py
@@ -593,6 +593,11 @@ class Editor(QWidget): # {{{
def code_dirtied(self, *args):
self.source_dirty = True
+ def hide_toolbars(self):
+ self.toolbar1.setVisible(False)
+ self.toolbar2.setVisible(False)
+ self.toolbar3.setVisible(False)
+
# }}}
if __name__ == '__main__':
diff --git a/src/calibre/gui2/convert/metadata.py b/src/calibre/gui2/convert/metadata.py
index 5f39202e26..23cac74cf8 100644
--- a/src/calibre/gui2/convert/metadata.py
+++ b/src/calibre/gui2/convert/metadata.py
@@ -18,6 +18,7 @@ from calibre.ebooks.metadata.opf2 import metadata_to_opf
from calibre.ptempfile import PersistentTemporaryFile
from calibre.gui2.convert import Widget
from calibre.utils.icu import sort_key
+from calibre.library.comments import comments_to_html
def create_opf_file(db, book_id):
mi = db.get_metadata(book_id, index_is_id=True)
@@ -57,6 +58,7 @@ class MetadataWidget(Widget, Ui_Form):
self.initialize_metadata_options()
self.initialize_options(get_option, get_help, db, book_id)
self.connect(self.cover_button, SIGNAL("clicked()"), self.select_cover)
+ self.comment.hide_toolbars()
def deduce_author_sort(self, *args):
au = unicode(self.author.currentText())
@@ -79,7 +81,7 @@ class MetadataWidget(Widget, Ui_Form):
self.author_sort.setText(mi.author_sort if mi.author_sort else '')
self.tags.setText(', '.join(mi.tags if mi.tags else []))
self.tags.update_items_cache(self.db.all_tags())
- self.comment.setPlainText(mi.comments if mi.comments else '')
+ self.comment.html = comments_to_html(mi.comments) if mi.comments else ''
if mi.series:
self.series.setCurrentIndex(self.series.findText(mi.series))
if mi.series_index is not None:
@@ -154,7 +156,7 @@ class MetadataWidget(Widget, Ui_Form):
author_sort = unicode(self.author_sort.text()).strip()
if author_sort:
mi.author_sort = author_sort
- comments = unicode(self.comment.toPlainText()).strip()
+ comments = self.comment.html
if comments:
mi.comments = comments
mi.series_index = float(self.series_index.value())
diff --git a/src/calibre/gui2/convert/metadata.ui b/src/calibre/gui2/convert/metadata.ui
index 8db4cfa2a1..61c27594c4 100644
--- a/src/calibre/gui2/convert/metadata.ui
+++ b/src/calibre/gui2/convert/metadata.ui
@@ -20,30 +20,6 @@
Book Cover
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
- -
-
-
- Use cover from &source file
-
-
- true
-
-
-
-
@@ -95,6 +71,30 @@
+ -
+
+
+ Use cover from &source file
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+
+
opt_prefer_metadata_cover
@@ -264,35 +264,7 @@
-
-
-
-
- 0
- 0
-
-
-
-
- 16777215
- 200
-
-
-
- Comments
-
-
-
-
-
-
-
- 16777215
- 180
-
-
-
-
-
-
+
@@ -325,6 +297,12 @@
1
+
+ Editor
+ QWidget
+ calibre/gui2/comments_editor.h
+ 1
+
title
@@ -334,7 +312,6 @@
tags
series
series_index
- comment
cover_path
cover_button
opt_prefer_metadata_cover