diff frontends/primitivus/chat.py @ 153:f197b52796ee

Primitivus: begining of management for actionResult
author Goffi <goffi@goffi.org>
date Sat, 31 Jul 2010 00:34:05 +0800
parents 80661755ea8d
children a50953ac6191
line wrap: on
line diff
--- a/frontends/primitivus/chat.py	Sat Jul 31 00:32:51 2010 +0800
+++ b/frontends/primitivus/chat.py	Sat Jul 31 00:34:05 2010 +0800
@@ -108,7 +108,7 @@
             for wid in self.content:
                 wid._invalidate()
         elif key == "meta l": #user wants to (un)hide widget decoration
-            show = not self._w.__class__ == custom_widgets.LabelLine
+            show = not isinstance(self._w, custom_widgets.LabelLine)
             self.showDecoration(show)
             self._invalidate()
         elif key == "meta s": #user wants to (un)hide group's subject
@@ -223,7 +223,7 @@
         self.host.redraw()
 
     def printMessage(self, from_jid, msg, profile, timestamp=""):
-        assert (from_jid.__class__ == JID)
+        assert isinstance(from_jid, JID)
         my_jid = self.host.profiles[profile]['whoami']
         self.content.append(ChatText(self, timestamp or None, my_jid, from_jid, msg))
         self.text_list.set_focus(len(self.content)-1)