diff options
author | Rael <rael.gc@gmail.com> | 2015-11-18 13:29:20 -0200 |
---|---|---|
committer | Rael <rael.gc@gmail.com> | 2015-11-18 13:29:20 -0200 |
commit | 47885a6a2c4f1239232dff6983456ed405f06fa5 (patch) | |
tree | 50b02be574c3ef13e6e1152eb2f30237cae06cbb | |
parent | 702883e521e9db324f71f77983aafa5c690ae4d8 (diff) | |
download | scudcloud-47885a6a2c4f1239232dff6983456ed405f06fa5.zip scudcloud-47885a6a2c4f1239232dff6983456ed405f06fa5.tar.gz scudcloud-47885a6a2c4f1239232dff6983456ed405f06fa5.tar.bz2 |
Short message title (#292)
-rw-r--r-- | scudcloud-1.0/lib/wrapper.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scudcloud-1.0/lib/wrapper.py b/scudcloud-1.0/lib/wrapper.py index 115cbe9..f018163 100644 --- a/scudcloud-1.0/lib/wrapper.py +++ b/scudcloud-1.0/lib/wrapper.py @@ -12,6 +12,7 @@ class Wrapper(QWebView): highlights = 0 icon = None + name = '' def __init__(self, window): self.configure_proxy() @@ -151,8 +152,8 @@ class Wrapper(QWebView): self.window.teams(data['teams']) if self.window.current() == self: self.window.quicklist(data['channels']) - iconFile = data['teams'][0]['team_name']+'.png' - filename, headers = request.urlretrieve(data['icon'], tempfile.gettempdir()+'/'+iconFile) + self.name = data['teams'][0]['team_name'] + filename, headers = request.urlretrieve(data['icon'], tempfile.gettempdir()+'/'+self.name+'.png') self.icon = filename @QtCore.pyqtSlot(bool) @@ -172,6 +173,6 @@ class Wrapper(QWebView): @QtCore.pyqtSlot(str, str) def sendMessage(self, title, message): - self.window.notify(str(title).replace("New message from ", "").replace("New message in ", ""), str(message), self.icon) + self.window.notify(str(title).replace('New message from ', '', 1).replace('New message in ', '', 1).replace('['+self.name.lower()+'] in ', '', 1), str(message), self.icon) |