diff options
-rw-r--r-- | calculate.py | 5 | ||||
-rw-r--r-- | layout.py | 3 | ||||
-rw-r--r-- | mathlib.py | 13 |
3 files changed, 14 insertions, 7 deletions
diff --git a/calculate.py b/calculate.py index bda756c..91cf276 100644 --- a/calculate.py +++ b/calculate.py @@ -258,8 +258,8 @@ class Calculate(ShareableActivity): 'plus': '+', 'minus': '-', 'asterisk': '*', - 'multiply': '', - 'divide': '', + 'multiply': '×', + 'divide': '÷', 'slash': '/', 'BackSpace': lambda o: o.remove_character(-1), 'Delete': lambda o: o.remove_character(1), @@ -317,6 +317,7 @@ class Calculate(ShareableActivity): self.KEYMAP['multiply'] = self.ml.mul_sym self.KEYMAP['divide'] = self.ml.div_sym + self.KEYMAP['equal'] = self.ml.equ_sym self.clipboard = gtk.Clipboard() self.select_reason = self.SELECT_SELECT @@ -47,6 +47,7 @@ class CalcLayout: mul_sym = self._parent.ml.mul_sym div_sym = self._parent.ml.div_sym + equ_sym = self._parent.ml.equ_sym self.button_data = [ # [x, y, width, label, bgcol, cb] @@ -74,7 +75,7 @@ class CalcLayout: [4, 2, 1, div_sym, self.col_gray3, lambda w: self._parent.add_text(div_sym)], [5, 2, 1, ')', self.col_gray3, lambda w: self._parent.add_text(')')], - [3, 3, 3, _('Enter'), self.col_gray1, lambda w: self._parent.process()], + [3, 3, 3, equ_sym, self.col_gray1, lambda w: self._parent.process()], ] def create_dialog(self): @@ -78,15 +78,20 @@ class MathLib: if self.fraction_sep == "" or self.fraction_sep == None: self.fraction_sep = "." - # TRANS: multiplication symbol (default: '*') + # TRANS: multiplication symbol (default: '×') self.mul_sym = _('mul_sym') if len(self.mul_sym) == 0 or len(self.mul_sym) > 3: - self.mul_sym = '*' + self.mul_sym = '×' - # TRANS: division symbol (default: '/') + # TRANS: division symbol (default: '÷') self.div_sym = _('div_sym') if len(self.div_sym) == 0 or len(self.div_sym) > 3: - self.div_sym = '/' + self.div_sym = '÷' + + # TRANS: equal symbol (default: '=') + self.equ_sym = _('equ_sym') + if len(self.equ_sym) == 0 or len(self.equ_sym) > 3: + self.equ_sym = '=' def set_format_type(self, fmt, digit_limit=9): self.format_type = fmt |