[gnome-clocks] timer: Fix incorrect minutes reset
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] timer: Fix incorrect minutes reset
- Date: Fri, 9 Dec 2016 20:37:13 +0000 (UTC)
commit b0ce274b8119c24291c4c459050fc20c821bc237
Author: Josh Brobst <josh brob st>
Date: Tue Dec 6 22:14:37 2016 -0500
timer: Fix incorrect minutes reset
When resetting the timer, the values for the spinbuttons are determined
from the timer starting amount in seconds. In order to get the correct
number of minutes from this value, we must first account for the number
of hours present (mod 3600) before converting from seconds to minutes
(truncated division by 60).
https://bugzilla.gnome.org/show_bug.cgi?id=774479
src/timer.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/timer.vala b/src/timer.vala
index 783e452..8d7e23d 100644
--- a/src/timer.vala
+++ b/src/timer.vala
@@ -230,7 +230,7 @@ public class Face : Gtk.Stack, Clocks.Clock {
remove_tick ();
span = settings.get_uint ("timer");
h_spinbutton.value = (int) span / 3600;
- m_spinbutton.value = (int) span / 60;
+ m_spinbutton.value = (int) span % 3600 / 60;
s_spinbutton.value = span % 60;
left_button.get_style_context ().remove_class("clocks-go");
countdown_frame.get_style_context ().remove_class ("clocks-paused");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]