mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-19 22:58:30 +00:00
Merge branch 'master' of deluge-torrent.org:deluge
This commit is contained in:
commit
0503db85ea
@ -38,6 +38,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import smtplib
|
import smtplib
|
||||||
|
from email.utils import formatdate
|
||||||
from twisted.internet import defer, threads
|
from twisted.internet import defer, threads
|
||||||
from deluge import component
|
from deluge import component
|
||||||
from deluge.event import known_events
|
from deluge.event import known_events
|
||||||
@ -118,11 +119,14 @@ class CoreNotifications(CustomNotifications):
|
|||||||
From: %(smtp_from)s
|
From: %(smtp_from)s
|
||||||
To: %(smtp_recipients)s
|
To: %(smtp_recipients)s
|
||||||
Subject: %(subject)s
|
Subject: %(subject)s
|
||||||
|
Date: %(date)s
|
||||||
|
|
||||||
|
|
||||||
""" % {'smtp_from': self.config['smtp_from'],
|
""" % {'smtp_from': self.config['smtp_from'],
|
||||||
'subject': subject,
|
'subject': subject,
|
||||||
'smtp_recipients': to_addrs}
|
'smtp_recipients': to_addrs,
|
||||||
|
'date': formatdate()
|
||||||
|
}
|
||||||
|
|
||||||
message = '\r\n'.join((headers + message).splitlines())
|
message = '\r\n'.join((headers + message).splitlines())
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
import logging,os.path
|
import logging,os,os.path
|
||||||
|
|
||||||
from popup import Popup
|
from popup import Popup
|
||||||
|
|
||||||
@ -476,7 +476,8 @@ class TextInput(InputField):
|
|||||||
self.cursor = len(prefix)
|
self.cursor = len(prefix)
|
||||||
|
|
||||||
if len(opts) > 1 and second_hit: # display multiple options on second tab hit
|
if len(opts) > 1 and second_hit: # display multiple options on second tab hit
|
||||||
self.opts = " ".join(opts)
|
sp = self.value.rfind(os.sep)+1
|
||||||
|
self.opts = " ".join([o[sp:] for o in opts])
|
||||||
|
|
||||||
# Cursor movement
|
# Cursor movement
|
||||||
elif c == curses.KEY_LEFT:
|
elif c == curses.KEY_LEFT:
|
||||||
@ -520,6 +521,7 @@ class TextInput(InputField):
|
|||||||
# Move the cursor forward
|
# Move the cursor forward
|
||||||
self.cursor+=1
|
self.cursor+=1
|
||||||
|
|
||||||
|
|
||||||
def complete(self,line):
|
def complete(self,line):
|
||||||
line = os.path.abspath(os.path.expanduser(line))
|
line = os.path.abspath(os.path.expanduser(line))
|
||||||
ret = []
|
ret = []
|
||||||
@ -534,7 +536,7 @@ class TextInput(InputField):
|
|||||||
continue
|
continue
|
||||||
f = os.path.join(line, f)
|
f = os.path.join(line, f)
|
||||||
if os.path.isdir(f):
|
if os.path.isdir(f):
|
||||||
f += "/"
|
f += os.sep
|
||||||
ret.append(f)
|
ret.append(f)
|
||||||
else:
|
else:
|
||||||
# This is a file, but we could be looking for another file that
|
# This is a file, but we could be looking for another file that
|
||||||
@ -552,9 +554,8 @@ class TextInput(InputField):
|
|||||||
p = os.path.join(os.path.dirname(line), f)
|
p = os.path.join(os.path.dirname(line), f)
|
||||||
|
|
||||||
if os.path.isdir(p):
|
if os.path.isdir(p):
|
||||||
p += "/"
|
p += os.sep
|
||||||
ret.append(p)
|
ret.append(p)
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user