[gnome-clocks/wip/analogtimer] Reset the analog timer
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks/wip/analogtimer] Reset the analog timer
- Date: Fri, 2 Aug 2013 14:40:45 +0000 (UTC)
commit af724f458cc1af2d64414e965f72d88ae5b92fd4
Author: Paolo Borelli <pborelli gnome org>
Date: Fri Aug 2 16:39:42 2013 +0200
Reset the analog timer
src/timer.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/timer.vala b/src/timer.vala
index 0b18ccf..317da3a 100644
--- a/src/timer.vala
+++ b/src/timer.vala
@@ -20,7 +20,7 @@ namespace Clocks {
namespace Timer {
public class CountdownFrame : Gtk.Frame {
- private const int RADIUS_PAD = 36;
+ private const int RADIUS_PAD = 128;
public double span { get; set; default = 0; }
@@ -54,6 +54,11 @@ public class CountdownFrame : Gtk.Frame {
elapsed = 0;
}
+ public void reset () {
+ elapsed_before_pause = 0;
+ elapsed = 0;
+ }
+
public override void get_preferred_width (out int min_w, out int natural_w) {
var d = calculate_diameter ();
min_w = d;
@@ -272,6 +277,7 @@ public class MainPanel : Gtk.Stack, Clocks.Clock {
m_spinbutton.value = (int) span / 60;
s_spinbutton.value = span % 60;
start_button.set_sensitive (span > 0);
+ countdown_frame.reset ();
visible_child = setup_panel;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]