changeset 1788:526e4145253c

primitivus (chat): since dialog refresh is done in message notification, print the message first and then notify
author souliane <souliane@mailoo.org>
date Wed, 13 Jan 2016 08:50:40 +0100
parents d678b723460b
children 8e2c831073a6
files frontends/src/primitivus/chat.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py	Tue Jan 12 17:54:38 2016 +0100
+++ b/frontends/src/primitivus/chat.py	Wed Jan 13 08:50:40 2016 +0100
@@ -303,9 +303,9 @@
         @param message (unicode): message content
         @param extra (dict): extra data
         """
-        QuickChat.printMessage(self, nick, my_message, message, timestamp, extra, profile)
         new_text = ChatText(self, timestamp, nick, my_message, message)
         self.content.append(new_text)
+        QuickChat.printMessage(self, nick, my_message, message, timestamp, extra, profile)
 
     def printInfo(self, msg, type_='normal', extra=None):
         """Print general info
@@ -315,7 +315,6 @@
             me: "/me" information like "/me clenches his fist" ==> "toto clenches his fist"
         @param timestamp (float): number of seconds since epoch
         """
-        QuickChat.printInfo(self, msg, type_, extra)
         if extra is None:
             extra = {}
         try:
@@ -324,6 +323,7 @@
             timestamp = None
         _widget = ChatText(self, timestamp, None, False, msg, is_info=True)
         self.content.append(_widget)
+        QuickChat.printInfo(self, msg, type_, extra)
 
     def notify(self, contact="somebody", msg=""):
         """Notify the user of a new message if primitivus doesn't have the focus.