Merge lp:~embik/pantheon-calculator/two-and-a-half-bugfixes into lp:~elementary-apps/pantheon-calculator/trunk

Proposed by Marvin Beckers
Status: Rejected
Rejected by: Cody Garver
Proposed branch: lp:~embik/pantheon-calculator/two-and-a-half-bugfixes
Merge into: lp:~elementary-apps/pantheon-calculator/trunk
Diff against target: 30 lines (+7/-2)
2 files modified
src/Core/Evaluation.vala (+6/-1)
src/MainWindow.vala (+1/-1)
To merge this branch: bzr merge lp:~embik/pantheon-calculator/two-and-a-half-bugfixes
Reviewer Review Type Date Requested Status
Cody Garver (community) Needs Resubmitting
Review via email: mp+249101@code.launchpad.net

Commit message

Description of the change

Fixes two very minor bugs:

* bug #1415049 (clicked around, got result -0)
* bug #1415054 (e Button has no function)

To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

Needs to be resubmitted, conflicts with trunk.

review: Needs Resubmitting

Unmerged revisions

98. By Marvin Beckers

now displaying '0' and not '-0'

97. By Marvin Beckers

added 'e' back to list of buttons

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Core/Evaluation.vala'
2--- src/Core/Evaluation.vala 2015-01-20 22:04:24 +0000
3+++ src/Core/Evaluation.vala 2015-02-09 18:24:33 +0000
4@@ -85,7 +85,12 @@
5 d = e.eval_postfix (tokenlist);
6 } catch (Error e) { throw new OUT_ERROR.EVAL_ERROR (e.message); }
7 } catch (Error e) { throw new OUT_ERROR.SHUNTING_ERROR (e.message); }
8- return e.cut (d, d_places);
9+
10+ string cut = e.cut (d, d_places);
11+ if (cut == "-0")
12+ cut = "0";
13+
14+ return cut;
15 } catch (Error e) { throw new OUT_ERROR.SCANNER_ERROR (e.message); }
16 }
17
18
19=== modified file 'src/MainWindow.vala'
20--- src/MainWindow.vala 2015-01-24 15:37:13 +0000
21+++ src/MainWindow.vala 2015-02-09 18:24:33 +0000
22@@ -54,7 +54,7 @@
23 private string[] regular_buttons = { "0", "1", "2", "3", "4", "5",
24 "6", "7", "8", "9", "0", " + ",
25 " − ", " × ", " ÷ ", "%", ".", "(",
26- ")", "^", "π"};
27+ ")", "^", "π", "e"};
28
29 private string[] function_buttons = { "sin", "cos", "tan", "√", "sinh", "cosh",
30 "tanh" , "sqrt"};

Subscribers

People subscribed via source and target branches

to all changes: