Merge lp:~lihow731/ubuntu/saucy/gnome-calculator/fix-for-1209326 into lp:ubuntu/saucy/gnome-calculator

Proposed by Leon Liao
Status: Needs review
Proposed branch: lp:~lihow731/ubuntu/saucy/gnome-calculator/fix-for-1209326
Merge into: lp:ubuntu/saucy/gnome-calculator
Diff against target: 106 lines (+57/-0)
5 files modified
.pc/applied-patches (+1/-0)
debian/changelog (+6/-0)
debian/patches/fix-the-undo-ctrl-z-bug.patch (+45/-0)
debian/patches/series (+1/-0)
src/math-equation.vala (+4/-0)
To merge this branch: bzr merge lp:~lihow731/ubuntu/saucy/gnome-calculator/fix-for-1209326
Reviewer Review Type Date Requested Status
Jamie Strandboge Needs Fixing
Review via email: mp+202198@code.launchpad.net

Description of the change

I propose to merge this patch for fix lp: BUG#1209326.

To post a comment you must log in.
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thanks for your patch! A few comments:
 * your merge request was made with patches applied. This includes the .pc directory and code changes. Since you are adding a patch to debian/patches, it is easier for reviewers if you 'quilt pop -a' before submitting the request. You might find when working on SRUs it is easier to provide a debdiff in the bug
 * in debian/changelog, 1:3.8.2-1ubuntu5ppa should be 1:3.8.2-1ubuntu4.1
 * in debian/changelog, saucy should be 'saucy-proposed'
 * debian/patches/fix-the-undo-ctrl-z-bug.patch has a lot of information, but it isn't quite right. It should focus on upstream commits (if appropriate) and reference the Ubuntu bug. Eg:
Origin: <upstream commit>
Description: Fix the undo/ctrl-z bug
 Due to the code structure, the undo stack do not keep the last answer.
 We use another variable to keep it.
Bug-Ubuntu: https://launchpad.net/bugs/1209326

If there is no upstream commit, you should use 'Author: Person Who <email address hidden>'. The DEP-3 comments that are in your patch were unclear, especially in light of the boiler text that was included.

review: Needs Fixing
Revision history for this message
Leon Liao (lihow731) wrote :

Hi Jamie,

I want to correct something in your comments.
Do I need to push the commit again with --overwrite option?
Or, how can I do?

Best regards,
Leon

2014-01-25 Jamie Strandboge <email address hidden>

> Review: Needs Fixing
>
> Thanks for your patch! A few comments:
> * your merge request was made with patches applied. This includes the .pc
> directory and code changes. Since you are adding a patch to debian/patches,
> it is easier for reviewers if you 'quilt pop -a' before submitting the
> request. You might find when working on SRUs it is easier to provide a
> debdiff in the bug
> * in debian/changelog, 1:3.8.2-1ubuntu5ppa should be 1:3.8.2-1ubuntu4.1
> * in debian/changelog, saucy should be 'saucy-proposed'
> * debian/patches/fix-the-undo-ctrl-z-bug.patch has a lot of information,
> but it isn't quite right. It should focus on upstream commits (if
> appropriate) and reference the Ubuntu bug. Eg:
> Origin: <upstream commit>
> Description: Fix the undo/ctrl-z bug
> Due to the code structure, the undo stack do not keep the last answer.
> We use another variable to keep it.
> Bug-Ubuntu: https://launchpad.net/bugs/1209326
>
> If there is no upstream commit, you should use 'Author: Person Who
> <email address hidden>'. The DEP-3 comments that are in your patch were
> unclear, especially in light of the boiler text that was included.
> --
>
> https://code.launchpad.net/~lihow731/ubuntu/saucy/gnome-calculator/fix-for-1209326/+merge/202198
> You are the owner of
> lp:~lihow731/ubuntu/saucy/gnome-calculator/fix-for-1209326.
>

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

Hi Leon,

It is OK to overwrite your own Bazaar branch.

Unmerged revisions

11. By Leon Liao

Fix the undo/ctrl-z bug.
* src/math-equation.vala: fix the undo/ctrl-z bug.(lp Bug #1209326)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.pc/applied-patches'
2--- .pc/applied-patches 2013-06-07 18:18:04 +0000
3+++ .pc/applied-patches 2014-01-18 17:46:19 +0000
4@@ -1,1 +1,2 @@
5 unity_classic_menubar.patch
6+fix-the-undo-ctrl-z-bug.patch
7
8=== modified file 'debian/changelog'
9--- debian/changelog 2013-07-15 18:41:28 +0000
10+++ debian/changelog 2014-01-18 17:46:19 +0000
11@@ -1,3 +1,9 @@
12+gnome-calculator (1:3.8.2-1ubuntu5ppa) saucy; urgency=low
13+
14+ * src/math-equation.vala: fix the undo/ctrl-z bug.
15+
16+ -- Li-Hao Liao (Leon Liao) <lihow731@gmail.com> Sun, 19 Jan 2014 00:49:25 +0800
17+
18 gnome-calculator (1:3.8.2-1ubuntu4) saucy; urgency=low
19
20 * debian/patches/unity_classic_menubar.patch: use "Quit" rather than
21
22=== added file 'debian/patches/fix-the-undo-ctrl-z-bug.patch'
23--- debian/patches/fix-the-undo-ctrl-z-bug.patch 1970-01-01 00:00:00 +0000
24+++ debian/patches/fix-the-undo-ctrl-z-bug.patch 2014-01-18 17:46:19 +0000
25@@ -0,0 +1,45 @@
26+Description: Fix the undo/ctrl-z bug
27+ Due to the code structure, the undo stack do not keep the last answer.
28+ We use another variable to keep it.
29+ .
30+ gnome-calculator (1:3.8.2-1ubuntu5) saucy; urgency=low
31+ .
32+ * src/math-equation.vala: fix the undo/ctrl-z bug.
33+Author: Li-Hao Liao (Leon Liao) <lihow731@gmail.com>
34+
35+---
36+The information above should follow the Patch Tagging Guidelines, please
37+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
38+are templates for supplementary fields that you might want to add:
39+
40+
41+Bug-Ubuntu: https://launchpad.net/bugs/1209326
42+Last-Update: <2014-01-19>
43+
44+--- gnome-calculator-3.8.2.orig/src/math-equation.vala
45++++ gnome-calculator-3.8.2/src/math-equation.vala
46+@@ -137,6 +137,8 @@ public class MathEquation : Gtk.TextBuff
47+
48+ private bool in_delete;
49+
50++ private Number last_ans;
51++
52+ private bool _in_solve;
53+ public bool in_solve
54+ {
55+@@ -489,6 +491,7 @@ public class MathEquation : Gtk.TextBuff
56+ }
57+
58+ state = undo_stack.nth_data (0);
59++ state.ans = last_ans;
60+ undo_stack.remove (state);
61+ redo_stack.prepend (get_current_state ());
62+
63+@@ -986,6 +989,7 @@ public class MathEquation : Gtk.TextBuff
64+ return;
65+ }
66+
67++ last_ans = state.ans;
68+ _in_solve = true;
69+
70+ number_mode = NumberMode.NORMAL;
71
72=== modified file 'debian/patches/series'
73--- debian/patches/series 2013-06-07 18:18:04 +0000
74+++ debian/patches/series 2014-01-18 17:46:19 +0000
75@@ -1,1 +1,2 @@
76 unity_classic_menubar.patch
77+fix-the-undo-ctrl-z-bug.patch
78
79=== modified file 'src/math-equation.vala'
80--- src/math-equation.vala 2013-02-19 11:14:23 +0000
81+++ src/math-equation.vala 2014-01-18 17:46:19 +0000
82@@ -137,6 +137,8 @@
83
84 private bool in_delete;
85
86+ private Number last_ans;
87+
88 private bool _in_solve;
89 public bool in_solve
90 {
91@@ -489,6 +491,7 @@
92 }
93
94 state = undo_stack.nth_data (0);
95+ state.ans = last_ans;
96 undo_stack.remove (state);
97 redo_stack.prepend (get_current_state ());
98
99@@ -986,6 +989,7 @@
100 return;
101 }
102
103+ last_ans = state.ans;
104 _in_solve = true;
105
106 number_mode = NumberMode.NORMAL;

Subscribers

People subscribed via source and target branches

to all changes: