From 35c85b1c86e1747dc0d7fe918982293ad988d5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Wed, 25 May 2016 13:18:29 -0500 Subject: [PATCH] Added a sound when someone sends a message --- src/controller/mainController.py | 2 ++ src/sounds/default/chat.ogg | Bin 0 -> 7298 bytes 2 files changed, 2 insertions(+) create mode 100644 src/sounds/default/chat.ogg diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 26fc5b8..d61a61b 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -287,6 +287,7 @@ class Controller(object): buffer = self.search_chat_buffer(obj.user_id) if buffer == None: wx.CallAfter(self.chat_from_id, obj.user_id) + self.session.soundplayer.play("chat.ogg") return # If the chat already exists, let's create a dictionary wich will contains data of the received message. message = {"id": obj.message_id, "user_id": obj.user_id, "date": obj.timestamp, "body": obj.text, "attachments": obj.attachments} @@ -300,3 +301,4 @@ class Controller(object): # ToDo: Clean this code and test how is the database working with this set to True. num = self.session.order_buffer(buffer.name, data, True) buffer.insert(self.session.db[buffer.name]["items"][-1], False) + self.session.soundplayer.play("chat.ogg") \ No newline at end of file diff --git a/src/sounds/default/chat.ogg b/src/sounds/default/chat.ogg new file mode 100644 index 0000000000000000000000000000000000000000..78955d441b8bc8a3e7c6f24c35c968a9a4275fca GIT binary patch literal 7298 zcmeG>c~sNKx|0PA5HNv&5Lp5QO(D4RNRmqaVd%$ZmlR<^|tDpUxHS9dd};4_x*XtVKU3N{N~%{n=xeV z+Ax3yvjuZW)9FjD_Cr~sveu=?CT1X0Xunp?3g#(F-8q5^K``GH1QS`gH@L`>xaG~C z3PwZ80s=%NrX@Iqq_3rxQEZ3gP+MvTFWW_bGFn zexw$Z9AI;;^GL!!8a})lj%Z2>5ljP(_ z|9W2YIcz50Yx>>isP_Tog5_vi%Lp8twG1H->7Av2quCY(NTC!!U-gB(m~@s@^&U1(de#a$9=I z4Y!h;Tsc;j---tDh)AMoMSHm=)JQqRTDwPaZ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