mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Output: Remove option to choose masthead font as the font selection control causes crashes on some windows systems
This commit is contained in:
parent
5e2de3f121
commit
7471f00b04
@ -55,13 +55,6 @@ class MOBIOutput(OutputFormatPlugin):
|
||||
' specified directory. If the directory already '
|
||||
'exists, it will be deleted.')
|
||||
),
|
||||
OptionRecommendation(name='mobi_navpoints_only_deepest',
|
||||
recommended_value=False,
|
||||
help=_('When adding navpoints for the chapter-to-chapter'
|
||||
' navigation on the kindle, use only the lowest level '
|
||||
'of items in the TOC, instead of items at every level.')
|
||||
),
|
||||
|
||||
OptionRecommendation(name='kindlegen',
|
||||
recommended_value=False,
|
||||
help=('Use kindlegen (must be in your PATH) to generate the'
|
||||
|
@ -1710,7 +1710,6 @@ class MobiWriter(object):
|
||||
'''
|
||||
from calibre.ebooks.oeb.base import TOC
|
||||
items = list(self._oeb.toc.iterdescendants())
|
||||
if self.opts.mobi_navpoints_only_deepest:
|
||||
items = [i for i in items if i.depth == 1]
|
||||
offsets = {i:self._id_offsets.get(i.href, -1) for i in items if i.href}
|
||||
items = [i for i in items if offsets[i] > -1]
|
||||
|
@ -6,11 +6,9 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
from PyQt4.Qt import Qt
|
||||
|
||||
from calibre.gui2.convert.mobi_output_ui import Ui_Form
|
||||
from calibre.gui2.convert import Widget
|
||||
from calibre.gui2.widgets import FontFamilyModel
|
||||
|
||||
font_family_model = None
|
||||
|
||||
@ -26,11 +24,13 @@ class PluginWidget(Widget, Ui_Form):
|
||||
['prefer_author_sort', 'rescale_images', 'toc_title',
|
||||
'mobi_ignore_margins', 'mobi_toc_at_start',
|
||||
'dont_compress', 'no_inline_toc',
|
||||
'masthead_font','personal_doc', 'mobi_navpoints_only_deepest']
|
||||
'personal_doc']#, 'mobi_navpoints_only_deepest']
|
||||
)
|
||||
from calibre.utils.fonts import fontconfig
|
||||
self.db, self.book_id = db, book_id
|
||||
|
||||
'''
|
||||
from calibre.utils.fonts import fontconfig
|
||||
|
||||
global font_family_model
|
||||
if font_family_model is None:
|
||||
font_family_model = FontFamilyModel()
|
||||
@ -46,9 +46,11 @@ class PluginWidget(Widget, Ui_Form):
|
||||
|
||||
self.font_family_model = font_family_model
|
||||
self.opt_masthead_font.setModel(self.font_family_model)
|
||||
'''
|
||||
|
||||
self.initialize_options(get_option, get_help, db, book_id)
|
||||
|
||||
'''
|
||||
def set_value_handler(self, g, val):
|
||||
if unicode(g.objectName()) in 'opt_masthead_font':
|
||||
idx = -1
|
||||
@ -59,3 +61,4 @@ class PluginWidget(Widget, Ui_Form):
|
||||
g.setCurrentIndex(idx)
|
||||
return True
|
||||
return False
|
||||
'''
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>521</width>
|
||||
<height>331</height>
|
||||
<height>342</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -55,22 +55,12 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0" colspan="2">
|
||||
<item row="8" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Kindle options</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Periodical masthead font:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="opt_masthead_font"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
@ -101,7 +91,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<item row="9" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -128,13 +118,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="opt_mobi_navpoints_only_deepest">
|
||||
<property name="text">
|
||||
<string>Use only &lowest level of items in the TOC for chapter-to-chapter navigation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user