aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRael <rael.gc@gmail.com>2015-11-18 14:03:46 -0200
committerRael <rael.gc@gmail.com>2015-11-18 14:03:46 -0200
commit6b503543ae75fcd1172e9c557b6ed2752aa4d943 (patch)
treeae94ae4083586b341510d862fd1e677b64ca11ae
parent47885a6a2c4f1239232dff6983456ed405f06fa5 (diff)
downloadscudcloud-6b503543ae75fcd1172e9c557b6ed2752aa4d943.zip
scudcloud-6b503543ae75fcd1172e9c557b6ed2752aa4d943.tar.gz
scudcloud-6b503543ae75fcd1172e9c557b6ed2752aa4d943.tar.bz2
Better code for sendMessage replacement (#292)
-rw-r--r--scudcloud-1.0/lib/wrapper.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scudcloud-1.0/lib/wrapper.py b/scudcloud-1.0/lib/wrapper.py
index f018163..13be430 100644
--- a/scudcloud-1.0/lib/wrapper.py
+++ b/scudcloud-1.0/lib/wrapper.py
@@ -173,6 +173,9 @@ class Wrapper(QWebView):
@QtCore.pyqtSlot(str, str)
def sendMessage(self, title, message):
- 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)
+ erase = ['New message from ', 'New message in ', '['+self.name.lower()+'] in ']
+ for s in erase:
+ title = str(title).replace(s, '', 1)
+ self.window.notify(title, str(message), self.icon)