GNOME Bugzilla – Bug 634004
Calculator does not sum when "equals" sign is typed on keyboard
Last modified: 2010-11-10 03:52:03 UTC
Forwarded from downstream (Ubuntu https://bugs.launchpad.net/ubuntu/+source/gcalctool/+bug/666635): Calculator will sum when "equals" button is input through button on calculator panel (with mouse). Other input functions on keyboard keypad seem to work normally.
Created attachment 174171 [details] [review] Patch to solve on equals
This is by design, otherwise you cannot enter a calculation like: x = 6 + 1 For = to work as an alternate solve key to enter it would have to be clever and only work if the preceeding text is not a variable. I'm not convinced this would be a good idea though (the behaviour of = might feel inconsistent).
Review of attachment 174171 [details] [review]: This patch breaks entering variables, e.g. "x = 6 + 1"
Yes, you are right, it wouldn't be consistent if in some cases = would solve and in others it wouldn't. I didn't know about GCalcTool being able to handle variables, but now I know. Then I assume this bug is a WON'T FIX one, isn't it?
Closing WONTFIX, thanks for the patch work though!
A possibility would be to only allow algol/pascal style assignment, so you'd have to write x := 6 + 1 instead. We'd still need some cleverness (but not too much), but it would be less inconsistent, both compared to giving the = key two meanings (as with this patch), and compared to the current state where the "=" button and the "=" key have different meanings. If we did, I bet we'd get at least one bug report about someone preferring only using the equal sign to make assignments, though.