diff options
author | Reinier Heeres <reinier@heeres.eu> | 2009-04-06 22:21:48 (GMT) |
---|---|---|
committer | Reinier Heeres <reinier@heeres.eu> | 2009-04-06 22:21:48 (GMT) |
commit | da830cf757964c1a8c8c725c187ce3bdae764b18 (patch) | |
tree | f0112a28fa5261e28b3de3deb3d42cbb9f6c0f00 | |
parent | d108108718f1895d449b0dbdb85d542d8f8e5a81 (diff) |
Make toolbar '=' insert '==' as it should
-rw-r--r-- | astparser.py | 4 | ||||
-rw-r--r-- | toolbars.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/astparser.py b/astparser.py index 3a87817..bf6d37a 100644 --- a/astparser.py +++ b/astparser.py @@ -368,12 +368,12 @@ class AstParser: # Copy state, list objects will remain the same state = copy.copy(state) state.level += 1 - ofs = node.col_offset + ofs = getattr(node, 'col_offset', 0) if node is None: return None - elif isinstance(node, ast.Expression): + elif isinstance(node, ast.Expression) or isinstance(node, ast.Module): return self._process_node(node.body, state) elif isinstance(node, ast.BinOp): diff --git a/toolbars.py b/toolbars.py index 77f6811..168d1f0 100644 --- a/toolbars.py +++ b/toolbars.py @@ -233,7 +233,7 @@ class BooleanToolbar(gtk.Toolbar): self.insert(LineSeparator(), -1) self.insert(IconToolButton('boolean-eq', _('Equals'), - lambda x: calc.button_pressed(calc.TYPE_OP_POST, '=')), -1) + lambda x: calc.button_pressed(calc.TYPE_OP_POST, '==')), -1) self.insert(IconToolButton('boolean-neq', _('Not equals'), lambda x: calc.button_pressed(calc.TYPE_OP_POST, '!=')), -1) |