~ubuntu-branches/ubuntu/karmic/calibre/karmic

« back to all changes in this revision

Viewing changes to src/calibre/gui2/dialogs/fetch_metadata.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-30 12:49:41 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730124941-qjdsmri25zt8zocn
Tags: 0.6.3+dfsg-0ubuntu1
* New upstream release. Please see http://calibre.kovidgoyal.net/new_in_6/
  for the list of new features and changes.
* remove_postinstall.patch: Update for new version.
* build_debug.patch: Does not apply any more, disable for now. Might not be
  necessary any more.
* debian/copyright: Fix reference to versionless GPL.
* debian/rules: Drop obsolete dh_desktop call.
* debian/rules: Add workaround for weird Python 2.6 setuptools behaviour of
  putting compiled .so files into src/calibre/plugins/calibre/plugins
  instead of src/calibre/plugins.
* debian/rules: Drop hal fdi moving, new upstream version does not use hal
  any more. Drop hal dependency, too.
* debian/rules: Install udev rules into /lib/udev/rules.d.
* Add debian/calibre.preinst: Remove unmodified
  /etc/udev/rules.d/95-calibre.rules on upgrade.
* debian/control: Bump Python dependencies to 2.6, since upstream needs
  it now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
from calibre.gui2 import error_dialog, NONE, info_dialog
15
15
from calibre.gui2.widgets import ProgressIndicator
16
16
from calibre.utils.config import prefs
 
17
from calibre import strftime
17
18
 
18
19
class Fetcher(QThread):
19
20
 
45
46
        return len(self.matches)
46
47
 
47
48
    def columnCount(self, *args):
48
 
        return 5
 
49
        return 6
49
50
 
50
51
    def headerData(self, section, orientation, role):
51
52
        if role != Qt.DisplayRole:
57
58
            elif section == 2: text = _("Author Sort")
58
59
            elif section == 3: text = _("Publisher")
59
60
            elif section == 4: text = _("ISBN")
 
61
            elif section == 5: text = _("Published")
60
62
 
61
63
            return QVariant(text)
62
64
        else:
80
82
                res = book.publisher
81
83
            elif col == 4:
82
84
                res = book.isbn
 
85
            elif col == 5:
 
86
                if hasattr(book.pubdate, 'timetuple'):
 
87
                    res = strftime('%b %Y', book.pubdate.timetuple())
83
88
            if not res:
84
89
                return NONE
85
90
            return QVariant(res)
126
131
            prefs['isbndb_com_key'] =  key
127
132
        else:
128
133
            key = None
129
 
        title = author = publisher = isbn = None
 
134
        title = author = publisher = isbn = pubdate = None
130
135
        if self.isbn:
131
136
            isbn = self.isbn
132
137
        if self.title:
190
195
        if hasattr(self, '_hangcheck') and self._hangcheck.isActive():
191
196
            self._hangcheck.stop()
192
197
 
193
 
 
194
198
    def __enter__(self, *args):
195
199
        return self
196
200