Merge lp:~mefrio-g/pantheon-calculator/close-button-fix into lp:~elementary-apps/pantheon-calculator/legacy-trunk

Proposed by Mario Guerriero
Status: Merged
Merged at revision: 18
Proposed branch: lp:~mefrio-g/pantheon-calculator/close-button-fix
Merge into: lp:~elementary-apps/pantheon-calculator/legacy-trunk
Diff against target: 40 lines (+8/-1)
2 files modified
Calculator/Widgets/CalculatorWindow.vala (+5/-0)
Calculator/Widgets/CloseButton.vala (+3/-1)
To merge this branch: bzr merge lp:~mefrio-g/pantheon-calculator/close-button-fix
Reviewer Review Type Date Requested Status
David Gomes (community) Approve
Review via email: mp+151395@code.launchpad.net
To post a comment you must log in.
Revision history for this message
David Gomes (davidgomes) wrote :

It does fix the bug, good code style too.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Calculator/Widgets/CalculatorWindow.vala'
2--- Calculator/Widgets/CalculatorWindow.vala 2011-07-06 03:20:57 +0000
3+++ Calculator/Widgets/CalculatorWindow.vala 2013-03-03 19:28:20 +0000
4@@ -67,10 +67,15 @@
5
6 add (Utilities.set_paddings (vbox, 7, 18, 7, 18));
7
8+ close_button.clicked.connect (on_close_clicked);
9 drag_panel.button_press_event.connect (on_drag_panel_button_press);
10 draw.connect (on_draw);
11 }
12
13+ private void on_close_clicked () {
14+ destroy ();
15+ }
16+
17 private bool on_drag_panel_button_press (EventButton event) {
18
19 if (event.button == 1)
20
21=== modified file 'Calculator/Widgets/CloseButton.vala'
22--- Calculator/Widgets/CloseButton.vala 2011-06-20 02:32:54 +0000
23+++ Calculator/Widgets/CloseButton.vala 2013-03-03 19:28:20 +0000
24@@ -25,6 +25,8 @@
25
26 public class CloseButton : Gtk.EventBox {
27
28+ public signal void clicked ();
29+
30 public CloseButton () {
31
32 // EventBox properties
33@@ -45,7 +47,7 @@
34 }
35
36 protected override bool button_release_event (EventButton event) {
37- Gtk.main_quit ();
38+ clicked ();
39 return true;
40 }
41

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: