Merge lp:~xdungnguyen/footnote/fix-983699 into lp:footnote

Proposed by Nguyễn Xuân Dũng
Status: Merged
Merge reported by: Tom Beckmann
Merged at revision: not available
Proposed branch: lp:~xdungnguyen/footnote/fix-983699
Merge into: lp:footnote
Diff against target: 43 lines (+8/-0)
2 files modified
src/Widgets/EditView.vala (+2/-0)
src/Widgets/Note.vala (+6/-0)
To merge this branch: bzr merge lp:~xdungnguyen/footnote/fix-983699
Reviewer Review Type Date Requested Status
Tom Beckmann (community) Approve
Review via email: mp+102718@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tom Beckmann (tombeckmann) wrote :

Cool variable name ;)

review: Approve
Revision history for this message
Nguyễn Xuân Dũng (xdungnguyen) wrote :

Hi Tom,

I'm really happy with our first contribution to eOS project. Thanks.
See you in my next patches.

2012/4/20 Tom Beckmann <email address hidden>

> The proposal to merge lp:~xdungnguyen/footnote/fix-983699 into lp:footnote
> has been updated.
>
> Status: Needs review => Merged
>
> For more details, see:
> https://code.launchpad.net/~xdungnguyen/footnote/fix-983699/+merge/102718<https://code.launchpad.net/%7Exdungnguyen/footnote/fix-983699/+merge/102718>
> --
> https://code.launchpad.net/~xdungnguyen/footnote/fix-983699/+merge/102718<https://code.launchpad.net/%7Exdungnguyen/footnote/fix-983699/+merge/102718>
> You are the owner of lp:~xdungnguyen/footnote/fix-983699.
>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Widgets/EditView.vala'
2--- src/Widgets/EditView.vala 2012-04-07 01:42:18 +0000
3+++ src/Widgets/EditView.vala 2012-04-19 16:07:34 +0000
4@@ -98,6 +98,8 @@
5 this.close ();
6 });
7 cancel.clicked.connect ( () => {
8+ if (current_note.is_brand_new == true)
9+ action_delete_note ();
10 this.close ();
11 });
12 title.buffer.changed.connect ( () => {
13
14=== modified file 'src/Widgets/Note.vala'
15--- src/Widgets/Note.vala 2012-04-14 00:48:01 +0000
16+++ src/Widgets/Note.vala 2012-04-19 16:07:34 +0000
17@@ -34,6 +34,8 @@
18 public int month;
19 public int year;
20
21+ public bool is_brand_new;
22+
23 public Gtk.TreeIter bookmarked_iter; //may be null
24
25 Gdk.Atom format;
26@@ -117,6 +119,8 @@
27 this.bookmarked.valign = Gtk.Align.CENTER;
28 this.bookmarked.add (new Gtk.Image.from_icon_name ("bookmark-new", Gtk.IconSize.BUTTON));
29
30+ this.is_brand_new = true;
31+
32 buttons.hexpand = true;
33 buttons.pack_start (export, false);
34 buttons.pack_start (new Gtk.Label (""));
35@@ -293,6 +297,8 @@
36 q.set_int (":bookmarked", (int)this.bookmarked.active);
37 q.set_int (":id", this.id);
38 q.execute ();
39+ if (this.is_brand_new == true)
40+ this.is_brand_new = false;
41 } catch (SQLHeavy.Error e) { warning ("Problem saving note, %s", e.message); }
42 if (this.bookmarked.active)
43 app.sidebar.setName (app.sidebar.convertToFilter (this.bookmarked_iter), this.title.label);

Subscribers

People subscribed via source and target branches