From: Simon Cross Date: Sat, 17 May 2014 18:40:01 +0000 (+0200) Subject: Proper glyphs for GenericBits. X-Git-Tag: 0.1~42 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=31a73cad5d73cca9169a1fb7e59640a8413b18a9;p=naja.git Proper glyphs for GenericBits. --- diff --git a/naja/actions.py b/naja/actions.py index d5e2b37..4dafbc6 100644 --- a/naja/actions.py +++ b/naja/actions.py @@ -135,6 +135,16 @@ class GenericBits(LocationAction): bits.toggle_bits(self.toggle_bits) bits.clear_bits(self.clear_bits) + def get_glyphs(self): + glyphs = [] + if self.set_bits: + glyphs.append(ACTION_GLYPHS.SET_BITS) + if self.clear_bits: + glyphs.append(ACTION_GLYPHS.CLEAR_BITS) + if self.toggle_bits: + glyphs.append(ACTION_GLYPHS.TOGGLE_BITS) + return tuple(glyphs) + def get_text(self, location=None): if 'message' in self.data: return super(GenericBits, self).get_text()