home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_1211 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  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.txt_output_ui import Ui_Form
  8. from calibre.gui2.convert import Widget
  9. from calibre.ebooks.txt.newlines import TxtNewlines
  10. from calibre.gui2.widgets import BasicComboModel
  11. newline_model = None
  12.  
  13. class PluginWidget(Widget, Ui_Form):
  14.     TITLE = _('TXT Output')
  15.     HELP = _('Options specific to') + ' TXT ' + _('output')
  16.     
  17.     def __init__(self, parent, get_option, get_help, db = None, book_id = None):
  18.         global newline_model
  19.         Widget.__init__(self, parent, 'txt_output', [
  20.             'newline',
  21.             'max_line_length',
  22.             'force_max_line_length',
  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_newline.currentText()
  28.         if newline_model is None:
  29.             newline_model = BasicComboModel(TxtNewlines.NEWLINE_TYPES.keys())
  30.         
  31.         self.newline_model = newline_model
  32.         self.opt_newline.setModel(self.newline_model)
  33.         default_index = self.opt_newline.findText(default)
  34.         system_index = self.opt_newline.findText('system')
  35.         if default_index != -1:
  36.             pass
  37.         elif system_index != -1:
  38.             pass
  39.         
  40.         self.opt_newline.setCurrentIndex(0)
  41.  
  42.  
  43.