mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add button to change stored LibraryThing account information
This commit is contained in:
parent
adfab8b01a
commit
c867da7275
@ -201,7 +201,7 @@ class MetadataSingleDialog(QDialog, 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.exec_()
|
self.exec_()
|
||||||
|
|
||||||
@ -213,11 +213,18 @@ class MetadataSingleDialog(QDialog, Ui_MetadataSingleDialog):
|
|||||||
tag_string = ', '.join(d.tags)
|
tag_string = ', '.join(d.tags)
|
||||||
self.tags.setText(tag_string)
|
self.tags.setText(tag_string)
|
||||||
|
|
||||||
|
def lt_password_dialog(self):
|
||||||
|
return PasswordDialog(self, 'LibraryThing account',
|
||||||
|
_('<p>Enter your username and password for <b>LibraryThing.com</b>. <br/>If you do not have one, you can <a href=\'http://www.librarything.com\'>register</a> for free!.</p>'))
|
||||||
|
|
||||||
|
def change_password(self):
|
||||||
|
d = self.lt_password_dialog()
|
||||||
|
d.exec_()
|
||||||
|
|
||||||
def fetch_cover(self):
|
def fetch_cover(self):
|
||||||
isbn = qstring_to_unicode(self.isbn.text())
|
isbn = qstring_to_unicode(self.isbn.text())
|
||||||
if isbn:
|
if isbn:
|
||||||
d = PasswordDialog(self, 'LibraryThing account',
|
d = self.lt_password_dialog()
|
||||||
_('<p>Enter your username and password for <b>LibraryThing.com</b>. <br/>If you do not have one, you can <a href=\'http://www.librarything.com\'>register</a> for free!.</p>'))
|
|
||||||
if not d.username() or not d.password():
|
if not d.username() or not d.password():
|
||||||
d.exec_()
|
d.exec_()
|
||||||
if d.result() != PasswordDialog.Accepted:
|
if d.result() != PasswordDialog.Accepted:
|
||||||
|
@ -389,8 +389,8 @@
|
|||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>Book Cover</string>
|
<string>Book Cover</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<item row="0" column="0" >
|
<item>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<item>
|
<item>
|
||||||
<spacer>
|
<spacer>
|
||||||
@ -439,7 +439,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
<item>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
@ -507,13 +507,27 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item>
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
|
<item>
|
||||||
<widget class="QPushButton" name="fetch_cover_button" >
|
<widget class="QPushButton" name="fetch_cover_button" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Fetch cover image from server</string>
|
<string>Fetch cover image from server</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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 password</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user