home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 January / maximum-cd-2011-01.iso / DiscContents / calibre-0.7.26.msi / file_1219 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-10-31  |  1.7 KB  |  43 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.     COMMIT_NAME = 'pdb_output'
  17.     ICON = I('mimetypes/unknown.png')
  18.     
  19.     def __init__(self, parent, get_option, get_help, db = None, book_id = None):
  20.         global format_model
  21.         Widget.__init__(self, parent, [
  22.             'format',
  23.             'inline_toc'])
  24.         self.db = db
  25.         self.book_id = book_id
  26.         self.initialize_options(get_option, get_help, db, book_id)
  27.         default = self.opt_format.currentText()
  28.         if format_model is None:
  29.             format_model = BasicComboModel(FORMAT_WRITERS.keys())
  30.         
  31.         self.format_model = format_model
  32.         self.opt_format.setModel(self.format_model)
  33.         default_index = self.opt_format.findText(default)
  34.         format_index = self.opt_format.findText('doc')
  35.         if default_index != -1:
  36.             pass
  37.         elif format_index != -1:
  38.             pass
  39.         
  40.         self.opt_format.setCurrentIndex(0)
  41.  
  42.  
  43.