home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_1193 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  1.6 KB  |  41 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. __license__ = 'GPL 3'
  5. __copyright__ = '2009, John Schember <john@nachtimwald.com>'
  6. __docformat__ = 'restructuredtext en'
  7. from calibre.gui2.convert.pdb_output_ui import Ui_Form
  8. from calibre.gui2.convert import Widget
  9. from calibre.ebooks.pdb import FORMAT_WRITERS
  10. from calibre.gui2.widgets import BasicComboModel
  11. format_model = None
  12.  
  13. class PluginWidget(Widget, Ui_Form):
  14.     TITLE = _('PDB Output')
  15.     HELP = _('Options specific to') + ' PDB ' + _('output')
  16.     
  17.     def __init__(self, parent, get_option, get_help, db = None, book_id = None):
  18.         global format_model
  19.         Widget.__init__(self, parent, 'pdb_output', [
  20.             'format',
  21.             'inline_toc'])
  22.         self.db = db
  23.         self.book_id = book_id
  24.         self.initialize_options(get_option, get_help, db, book_id)
  25.         default = self.opt_format.currentText()
  26.         if format_model is None:
  27.             format_model = BasicComboModel(FORMAT_WRITERS.keys())
  28.         
  29.         self.format_model = format_model
  30.         self.opt_format.setModel(self.format_model)
  31.         default_index = self.opt_format.findText(default)
  32.         format_index = self.opt_format.findText('doc')
  33.         if default_index != -1:
  34.             pass
  35.         elif format_index != -1:
  36.             pass
  37.         
  38.         self.opt_format.setCurrentIndex(0)
  39.  
  40.  
  41.