IGN:Now that we use OpenLibrary for covers. Remove password dialog for LibraryThing

This commit is contained in:
Kovid Goyal 2009-04-19 15:46:25 -07:00
parent 40dd093352
commit fc59904369
2 changed files with 7 additions and 20 deletions

View File

@ -25,7 +25,6 @@ from calibre import islinux
from calibre.ebooks.metadata.meta import get_metadata from calibre.ebooks.metadata.meta import get_metadata
from calibre.utils.config import prefs from calibre.utils.config import prefs
from calibre.customize.ui import run_plugins_on_import from calibre.customize.ui import run_plugins_on_import
from calibre.gui2 import config as gui_conf
class CoverFetcher(QThread): class CoverFetcher(QThread):
@ -289,7 +288,6 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
self.series_index.setValue(self.db.series_index(row)) self.series_index.setValue(self.db.series_index(row))
QObject.connect(self.series, SIGNAL('currentIndexChanged(int)'), self.enable_series_index) QObject.connect(self.series, SIGNAL('currentIndexChanged(int)'), self.enable_series_index)
QObject.connect(self.series, SIGNAL('editTextChanged(QString)'), self.enable_series_index) QObject.connect(self.series, SIGNAL('editTextChanged(QString)'), self.enable_series_index)
QObject.connect(self.password_button, SIGNAL('clicked()'), self.change_password)
self.show() self.show()
height_of_rest = self.frameGeometry().height() - self.cover.height() height_of_rest = self.frameGeometry().height() - self.cover.height()
@ -377,15 +375,15 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
def fetch_cover(self): def fetch_cover(self):
isbn = unicode(self.isbn.text()).strip() isbn = unicode(self.isbn.text()).strip()
d = self.lt_password_dialog() #d = self.lt_password_dialog()
if not gui_conf['asked_library_thing_password'] and \ #if not gui_conf['asked_library_thing_password'] and \
(not d.username() or not d.password()): # (not d.username() or not d.password()):
d.exec_() # d.exec_()
gui_conf['asked_library_thing_password'] = True # gui_conf['asked_library_thing_password'] = True
self.fetch_cover_button.setEnabled(False) self.fetch_cover_button.setEnabled(False)
self.setCursor(Qt.WaitCursor) self.setCursor(Qt.WaitCursor)
title, author = map(unicode, (self.title.text(), self.authors.text())) title, author = map(unicode, (self.title.text(), self.authors.text()))
self.cover_fetcher = CoverFetcher(d.username(), d.password(), isbn, self.cover_fetcher = CoverFetcher(None, None, isbn,
self.timeout, title, author) self.timeout, title, author)
self.cover_fetcher.start() self.cover_fetcher.start()
self._hangcheck = QTimer(self) self._hangcheck = QTimer(self)

View File

@ -589,17 +589,7 @@
<item> <item>
<widget class="QPushButton" name="fetch_cover_button"> <widget class="QPushButton" name="fetch_cover_button">
<property name="text"> <property name="text">
<string>Download &amp;cover image</string> <string>Download &amp;cover</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="password_button">
<property name="toolTip">
<string>Change the username and/or password for your account at LibraryThing.com</string>
</property>
<property name="text">
<string>Change &amp;password</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -655,7 +645,6 @@
<tabstop>comments</tabstop> <tabstop>comments</tabstop>
<tabstop>fetch_metadata_button</tabstop> <tabstop>fetch_metadata_button</tabstop>
<tabstop>fetch_cover_button</tabstop> <tabstop>fetch_cover_button</tabstop>
<tabstop>password_button</tabstop>
<tabstop>formats</tabstop> <tabstop>formats</tabstop>
<tabstop>add_format_button</tabstop> <tabstop>add_format_button</tabstop>
<tabstop>remove_format_button</tabstop> <tabstop>remove_format_button</tabstop>