This commit is contained in:
Kovid Goyal 2009-05-04 18:57:14 -07:00
parent 97ed8d26df
commit a8b7cc4af8
3 changed files with 63 additions and 3 deletions

View File

@ -35,6 +35,10 @@ class PluginWidget(Widget, Ui_Form):
self.opt_mono_family.setModel(self.font_family_model) self.opt_mono_family.setModel(self.font_family_model)
self.initialize_options(get_option, get_help, db, book_id) self.initialize_options(get_option, get_help, db, book_id)
self.opt_header.toggle(), self.opt_header.toggle()
self.opt_render_tables_as_images.toggle()
self.opt_render_tables_as_images.toggle()
def set_value_handler(self, g, val): def set_value_handler(self, g, val):
if val is None and unicode(g.objectName()) in ('opt_serif_family', if val is None and unicode(g.objectName()) in ('opt_serif_family',

View File

@ -252,5 +252,53 @@
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection>
<sender>opt_render_tables_as_images</sender>
<signal>toggled(bool)</signal>
<receiver>label_3</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>96</x>
<y>76</y>
</hint>
<hint type="destinationlabel">
<x>31</x>
<y>113</y>
</hint>
</hints>
</connection>
<connection>
<sender>opt_header</sender>
<signal>toggled(bool)</signal>
<receiver>label_4</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>67</x>
<y>144</y>
</hint>
<hint type="destinationlabel">
<x>72</x>
<y>165</y>
</hint>
</hints>
</connection>
<connection>
<sender>opt_header</sender>
<signal>toggled(bool)</signal>
<receiver>label_5</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>107</x>
<y>141</y>
</hint>
<hint type="destinationlabel">
<x>102</x>
<y>211</y>
</hint>
</hints>
</connection>
</connections> </connections>
</ui> </ui>

View File

@ -69,6 +69,7 @@ class Config(ResizableDialog, Ui_Dialog):
input_path - Path to input file input_path - Path to input file
output_format - Output format (without a leading .) output_format - Output format (without a leading .)
input_format - Input format (without a leading .)
opf_path - Path to OPF file with user specified metadata opf_path - Path to OPF file with user specified metadata
cover_path - Path to user specified cover (can be None) cover_path - Path to user specified cover (can be None)
recommendations - A pickled list of 3 tuples in the same format as the recommendations - A pickled list of 3 tuples in the same format as the
@ -96,14 +97,21 @@ class Config(ResizableDialog, Ui_Dialog):
self.show_group_help) self.show_group_help)
self.groups.setMouseTracking(True) self.groups.setMouseTracking(True)
@property
def input_format(self):
return unicode(self.input_formats.currentText()).lower()
@property
def output_format(self):
return unicode(self.output_formats.currentText()).lower()
def setup_pipeline(self, *args): def setup_pipeline(self, *args):
input_format = unicode(self.input_formats.currentText()).lower() input_format = self.input_format
output_format = unicode(self.output_formats.currentText()).lower() output_format = self.output_format
input_path = self.db.format_abspath(self.book_id, input_format, input_path = self.db.format_abspath(self.book_id, input_format,
index_is_id=True) index_is_id=True)
self.input_path = input_path self.input_path = input_path
self.output_format = output_format
output_path = 'dummy.'+output_format output_path = 'dummy.'+output_format
log = Log() log = Log()
log.outputs = [] log.outputs = []