This commit is contained in:
Kovid Goyal 2013-10-27 17:19:45 +05:30
parent 1854a412ec
commit cbf3dd41c7

View File

@ -243,7 +243,6 @@ class SchedulerDialog(QDialog, Ui_Dialog):
self.password.setEchoMode(self.password.Normal
if state == Qt.Checked else self.password.Password)
def schedule_type_selected(self, *args):
for i, st in enumerate(self.SCHEDULE_TYPES):
if getattr(self, st).isChecked():
@ -365,8 +364,10 @@ class SchedulerDialog(QDialog, Ui_Dialog):
un = pw = ''
if account_info is not None:
un, pw = account_info[:2]
if not un: un = ''
if not pw: pw = ''
if not un:
un = ''
if not pw:
pw = ''
self.username.setText(un)
self.password.setText(pw)
self.show_password.setChecked(False)
@ -390,7 +391,8 @@ class SchedulerDialog(QDialog, Ui_Dialog):
if scheduled:
typ, sch, last_downloaded = schedule_info
d = utcnow() - last_downloaded
def hm(x): return (x-x%3600)//3600, (x%3600 - (x%3600)%60)//60
def hm(x):
return (x-x%3600)//3600, (x%3600 - (x%3600)%60)//60
hours, minutes = hm(d.seconds)
tm = _('%(days)d days, %(hours)d hours'
' and %(mins)d minutes ago')%dict(
@ -417,7 +419,6 @@ class SchedulerDialog(QDialog, Ui_Dialog):
self.keep_issues.setEnabled(self.add_title_tag.isChecked())
class Scheduler(QObject):
INTERVAL = 1 # minutes
@ -477,7 +478,6 @@ class Scheduler(QObject):
self.delete_old_news.emit(ids)
QTimer.singleShot(60 * 60 * 1000, self.oldest_check)
def show_dialog(self, *args):
self.lock.lock()
try: