~stub/ubuntu/precise/calibre/devel

« back to all changes in this revision

Viewing changes to src/calibre/library/custom_columns.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-04-12 11:29:25 UTC
  • mfrom: (42.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110412112925-c7171kt2bb5rmft4
Tags: 0.7.50+dfsg-2
* debian/control: Build with libpodofo-dev to enable PDF metadata.
  (Closes: #619632)
* debian/control: Add libboost1.42-dev build dependency. Apparently it is
  needed in some setups. (Closes: #619807)
* debian/rules: Call dh_sip to generate a proper sip API dependency, to
  prevent crashes like #616372 for partial upgrades.
* debian/control: Bump python-qt4 dependency to >= 4.8.3-2, which reportedly
  fixes crashes on startup. (Closes: #619701, #620125)

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
                    table=tn, column='value', datatype=v['datatype'],
189
189
                    colnum=v['num'], name=v['name'], display=v['display'],
190
190
                    is_multiple=is_m, is_category=is_category,
191
 
                    is_editable=v['editable'])
 
191
                    is_editable=v['editable'], is_csp=False)
192
192
 
193
193
    def get_custom(self, idx, label=None, num=None, index_is_id=False):
194
194
        if label is not None:
445
445
        rv = self._set_custom(id, val, label=label, num=num, append=append,
446
446
                         notify=notify, extra=extra,
447
447
                         allow_case_change=allow_case_change)
448
 
        self.dirtied([id], commit=False)
 
448
        self.dirtied(set([id])|rv, commit=False)
449
449
        if commit:
450
450
            self.conn.commit()
451
451
        return rv
484
484
            if not existing:
485
485
                existing = []
486
486
            for x in set(set_val) - set(existing):
487
 
                if x is None:
 
487
                # normalized types are text and ratings, so we can do this check
 
488
                # to see if we need to re-add the value
 
489
                if not x:
488
490
                    continue
489
491
                case_change = False
490
492
                existing = list(self.all_custom(num=data['num']))