From f153fd885d1016876f191d4fdafa57d9f7960595 Mon Sep 17 00:00:00 2001 From: souliane Date: Tue, 22 Dec 2015 11:39:45 +0100 Subject: [PATCH] quick_frontend, primitivus (chat): printing the history is left to quick_frontend --- frontends/src/primitivus/chat.py | 4 +--- frontends/src/quick_frontend/quick_chat.py | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontends/src/primitivus/chat.py b/frontends/src/primitivus/chat.py index ff1c8575..0631e401 100644 --- a/frontends/src/primitivus/chat.py +++ b/frontends/src/primitivus/chat.py @@ -93,9 +93,7 @@ class Chat(PrimitivusWidget, QuickChat): PrimitivusWidget.__init__(self, self.pile, self.target) # we must adapt the behaviour with the type - if type_ == C.CHAT_ONE2ONE: - self.historyPrint(profile=self.profile) - elif type_ == C.CHAT_GROUP: + if type_ == C.CHAT_GROUP: if len(self.chat_colums.contents) == 1: self.occupants_list = sat_widgets.GenericList([], option_type=sat_widgets.ClickableText, on_click=self._occupantsClicked) self.occupants_panel = sat_widgets.VerticalSeparator(self.occupants_list) diff --git a/frontends/src/quick_frontend/quick_chat.py b/frontends/src/quick_frontend/quick_chat.py index 00df6e4a..66f69140 100644 --- a/frontends/src/quick_frontend/quick_chat.py +++ b/frontends/src/quick_frontend/quick_chat.py @@ -52,6 +52,9 @@ class QuickChat(quick_widgets.QuickWidget): self.nick = None self.games = {} # key=game name (unicode), value=instance of quick_games.RoomGame + if type_ == C.CHAT_ONE2ONE: + self.historyPrint(profile=self.profile) + def __str__(self): return u"Chat Widget [target: {}, type: {}, profile: {}]".format(self.target, self.type, self.profile)