Skip to content
This repository has been archived by the owner on Oct 29, 2018. It is now read-only.

Commit

Permalink
Better code for sendMessage replacement (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
raelgc committed Nov 18, 2015
1 parent 47885a6 commit 6b50354
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scudcloud-1.0/lib/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ def pasted(self, checked):

@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)


0 comments on commit 6b50354

Please sign in to comment.