~ubuntu-branches/debian/sid/calibre/sid

« back to all changes in this revision

Viewing changes to src/calibre/gui2/catalog/catalog_bibtex.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-05-14 18:17:50 UTC
  • mfrom: (1.5.10)
  • Revision ID: package-import@ubuntu.com-20140514181750-xyrxqa47dbw0qfhu
Tags: 1.36.0+dfsg-1
* New upstream release:
  - Fixes editing of metadata (Closes: #741638)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
    TITLE = _('BibTeX Options')
17
17
    HELP  = _('Options specific to')+' BibTeX '+_('output')
18
18
    OPTION_FIELDS = [('bib_cit','{authors}{id}'),
19
 
                     ('bib_entry', 0), #mixed
20
 
                     ('bibfile_enc', 0), #utf-8
21
 
                     ('bibfile_enctag', 0), #strict
 
19
                     ('bib_entry', 0),  # mixed
 
20
                     ('bibfile_enc', 0),  # utf-8
 
21
                     ('bibfile_enctag', 0),  # strict
22
22
                     ('impcit', True),
23
23
                     ('addfiles', False),
24
24
                     ]
30
30
        QWidget.__init__(self, parent)
31
31
        self.setupUi(self)
32
32
 
33
 
    def initialize(self, name, db): #not working properly to update
 
33
    def initialize(self, name, db):  # not working properly to update
34
34
        from calibre.library.catalogs import FIELDS
35
35
 
36
36
        self.all_fields = [x for x in FIELDS if x != 'all']
37
 
        #add custom columns
 
37
        # add custom columns
38
38
        for x in sorted(db.custom_field_keys()):
39
39
            self.all_fields.append(x)
40
40
            if db.field_metadata[x]['datatype'] == 'series':
41
41
                self.all_fields.append(x+'_index')
42
 
        #populate
 
42
        # populate
43
43
        for x in self.all_fields:
44
44
            QListWidgetItem(x, self.db_fields)
45
45
 
78
78
 
79
79
        # Dictionary currently activated fields
80
80
        if len(self.db_fields.selectedItems()):
81
 
            opts_dict = {'fields':[unicode(item.text()) for item in self.db_fields.selectedItems()]}
 
81
            opts_dict = {'fields':[unicode(i.text()) for i in self.db_fields.selectedItems()]}
82
82
        else:
83
83
            opts_dict = {'fields':['all']}
84
84