[Sugar-devel] [PATCH v2 Calculate] Changed symbols on the calculate activity button. (Ticket #2161)

Ishan Bansal ishan at seeta.in
Thu Sep 30 12:58:06 EDT 2010


New symbols "×", "÷" and "=" (instead of "*","/" and "Enter" respectively)
defined for the calculator activity in order to give a calculator look to
activity.
---
 layout.py  |    2 +-
 mathlib.py |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

v1 was Reviewed-By Sascha Silbe <sascha-ml-reply-to-2010-3 at silbe.org>
v1->v2: Symbol for "x" changed to "×"and bug description changed.

diff --git a/layout.py b/layout.py
index b29ceaf..db34a1e 100644
--- a/layout.py
+++ b/layout.py
@@ -67,7 +67,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, ('='), self.col_gray1, lambda w: self._parent.process()],
         ]
 
     def create_dialog(self):
diff --git a/mathlib.py b/mathlib.py
index 610bb07..15b16f4 100644
--- a/mathlib.py
+++ b/mathlib.py
@@ -62,12 +62,12 @@ class MathLib:
         # 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: '/')
         self.div_sym = _('div_sym')
         if len(self.div_sym) == 0 or len(self.div_sym) > 3:
-            self.div_sym = '/'
+            self.div_sym = '÷'
 
     def set_angle_type(self, type):
         self.angle_scaling = self.d(type)
-- 
1.7.0.4



More information about the Sugar-devel mailing list