mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-24 17:23:26 +02:00
...
This commit is contained in:
parent
4f3424ab72
commit
9cc4d3e0ea
2 changed files with 3 additions and 3 deletions
|
|
@ -183,6 +183,7 @@ def connect_gui_obj_handler(self, gui_obj, slot):
|
|||
def set_value(self, g, val):
|
||||
from calibre.gui2.convert.xpath_wizard import XPathEdit
|
||||
from calibre.gui2.convert.regex_builder import RegexEdit
|
||||
from calibre.gui2.widgets import EncodingComboBox
|
||||
if self.set_value_handler(g, val):
|
||||
return
|
||||
if isinstance(g, (QSpinBox, QDoubleSpinBox)):
|
||||
|
|
@ -201,6 +202,8 @@ def set_value(self, g, val):
|
|||
g.setCheckState(Qt.Checked if bool(val) else Qt.Unchecked)
|
||||
elif isinstance(g, (XPathEdit, RegexEdit)):
|
||||
g.edit.setText(val if val else '')
|
||||
elif isinstance(g, EncodingComboBox):
|
||||
g.setEditText(val if val else '')
|
||||
else:
|
||||
raise Exception('Can\'t set value %s in %s'%(repr(val),
|
||||
unicode(g.objectName())))
|
||||
|
|
|
|||
|
|
@ -56,9 +56,6 @@ def set_value_handler(self, g, val):
|
|||
g.setCurrentIndex(i)
|
||||
break
|
||||
return True
|
||||
if g is self.opt_input_encoding:
|
||||
g.setEditText(val if val else '')
|
||||
return True
|
||||
|
||||
def font_key_wizard(self):
|
||||
from calibre.gui2.convert.font_key import FontKeyChooser
|
||||
|
|
|
|||
Loading…
Reference in a new issue