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
=== modified file 'src/Core/Evaluation.vala'
--- src/Core/Evaluation.vala 2015-01-20 22:04:24 +0000
+++ src/Core/Evaluation.vala 2015-02-09 18:24:33 +0000
@@ -85,7 +85,12 @@
85 d = e.eval_postfix (tokenlist);85 d = e.eval_postfix (tokenlist);
86 } catch (Error e) { throw new OUT_ERROR.EVAL_ERROR (e.message); }86 } catch (Error e) { throw new OUT_ERROR.EVAL_ERROR (e.message); }
87 } catch (Error e) { throw new OUT_ERROR.SHUNTING_ERROR (e.message); }87 } catch (Error e) { throw new OUT_ERROR.SHUNTING_ERROR (e.message); }
88 return e.cut (d, d_places);88
89 string cut = e.cut (d, d_places);
90 if (cut == "-0")
91 cut = "0";
92
93 return cut;
89 } catch (Error e) { throw new OUT_ERROR.SCANNER_ERROR (e.message); }94 } catch (Error e) { throw new OUT_ERROR.SCANNER_ERROR (e.message); }
90 }95 }
9196
9297
=== modified file 'src/MainWindow.vala'
--- src/MainWindow.vala 2015-01-24 15:37:13 +0000
+++ src/MainWindow.vala 2015-02-09 18:24:33 +0000
@@ -54,7 +54,7 @@
54 private string[] regular_buttons = { "0", "1", "2", "3", "4", "5", 54 private string[] regular_buttons = { "0", "1", "2", "3", "4", "5",
55 "6", "7", "8", "9", "0", " + ",55 "6", "7", "8", "9", "0", " + ",
56 " − ", " × ", " ÷ ", "%", ".", "(", 56 " − ", " × ", " ÷ ", "%", ".", "(",
57 ")", "^", "π"};57 ")", "^", "π", "e"};
5858
59 private string[] function_buttons = { "sin", "cos", "tan", "√", "sinh", "cosh",59 private string[] function_buttons = { "sin", "cos", "tan", "√", "sinh", "cosh",
60 "tanh" , "sqrt"};60 "tanh" , "sqrt"};

Subscribers

People subscribed via source and target branches

to all changes: