mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-01-04 15:15:01 +01:00
Save IMAP tweaks and strings for translation.
This commit is contained in:
parent
83ea401eaf
commit
3de15229ac
5 changed files with 401 additions and 318 deletions
|
|
@ -1155,7 +1155,7 @@ class ImapTab(QWidget):
|
|||
row+=1
|
||||
|
||||
label = QLabel(_('IMAP User Name'))
|
||||
tooltip = _("Name of IMAP user. Eg: yourname@gmail.com\nNote that Gmail addresses need to have IMAP enabled in Gmail Settings first.")
|
||||
tooltip = _("Name of IMAP user. Eg: yourname@gmail.com\nNote that Gmail accounts need to have IMAP enabled in Gmail Settings first.")
|
||||
label.setToolTip(tooltip)
|
||||
self.l.addWidget(label,row,0)
|
||||
self.imapuser = QLineEdit(self)
|
||||
|
|
@ -1165,7 +1165,7 @@ class ImapTab(QWidget):
|
|||
row+=1
|
||||
|
||||
label = QLabel(_('IMAP User Password'))
|
||||
tooltip = _("IMAP password. If left empty, FFDL will ask you for your password when you .")
|
||||
tooltip = _("IMAP password. If left empty, FFDL will ask you for your password when you use the feature.")
|
||||
label.setToolTip(tooltip)
|
||||
self.l.addWidget(label,row,0)
|
||||
self.imappass = QLineEdit(self)
|
||||
|
|
@ -1175,8 +1175,8 @@ class ImapTab(QWidget):
|
|||
self.l.addWidget(self.imappass,row,1)
|
||||
row+=1
|
||||
|
||||
self.imapsessionpass = QCheckBox(_('Remember Password for Session (when not entered above)'),self)
|
||||
self.imapsessionpass.setToolTip(_('If checked, and no password is entered above, FFDL will remember your password until you close calibre or change libraries.'))
|
||||
self.imapsessionpass = QCheckBox(_('Remember Password for Session (when not saved above)'),self)
|
||||
self.imapsessionpass.setToolTip(_('If checked, and no password is entered above, FFDL will remember your password until you close calibre or change Libraries.'))
|
||||
self.imapsessionpass.setChecked(prefs['imapsessionpass'])
|
||||
self.l.addWidget(self.imapsessionpass,row,0,1,-1)
|
||||
row+=1
|
||||
|
|
|
|||
|
|
@ -1447,7 +1447,7 @@ class EmailPassDialog(QDialog):
|
|||
self.setLayout(self.l)
|
||||
|
||||
self.setWindowTitle(_('Password'))
|
||||
self.l.addWidget(QLabel(_("Enter Email Password for %s:"%user)),0,0,1,2)
|
||||
self.l.addWidget(QLabel(_("Enter Email Password for %s:")%user),0,0,1,2)
|
||||
|
||||
# self.l.addWidget(QLabel(_("Password:")),1,0)
|
||||
self.passwd = QLineEdit(self)
|
||||
|
|
|
|||
|
|
@ -399,10 +399,8 @@ class FanFictionDownLoaderPlugin(InterfaceAction):
|
|||
def get_urls_from_imap_menu(self):
|
||||
|
||||
if not prefs['imapserver'] or not prefs['imapuser'] or not prefs['imapfolder']:
|
||||
info_dialog(self.gui, _('Email Settings not Configured'),
|
||||
_('FFDL Email Settings are not configured.'),
|
||||
show=True,
|
||||
show_copy_button=False)
|
||||
s=_('FFDL Email Settings are not configured.')
|
||||
info_dialog(self.gui, s, s, show=True, show_copy_button=False)
|
||||
return
|
||||
|
||||
imap_pass = None
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -213,11 +213,14 @@ def get_urls_from_imap(srv,user,passwd,folder,markread=True):
|
|||
|
||||
urllist=[]
|
||||
for part in email_message.walk():
|
||||
try:
|
||||
#print("part mime:%s"%part.get_content_type())
|
||||
if part.get_content_type() == 'text/plain':
|
||||
urllist.extend(get_urls_from_text(part.get_payload(decode=True)))
|
||||
if part.get_content_type() == 'text/html':
|
||||
urllist.extend(get_urls_from_html(part.get_payload(decode=True)))
|
||||
if part.get_content_type() == 'text/plain':
|
||||
urllist.extend(get_urls_from_text(part.get_payload(decode=True)))
|
||||
if part.get_content_type() == 'text/html':
|
||||
urllist.extend(get_urls_from_html(part.get_payload(decode=True)))
|
||||
except Exception as e:
|
||||
print("Failed to read email content: %s"%e)
|
||||
#print "urls:%s"%get_urls_from_text(get_first_text_block(email_message))
|
||||
|
||||
if urllist and markread:
|
||||
|
|
|
|||
Loading…
Reference in a new issue