[gnome-clocks/bilelmoussaoui/redesign-timer] Timer: don't allow setting an empty timer
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks/bilelmoussaoui/redesign-timer] Timer: don't allow setting an empty timer
- Date: Tue, 28 Jan 2020 05:24:15 +0000 (UTC)
commit 6a746bc59802f8ca4faf956d5cc7d8004126523d
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Tue Jan 28 06:23:52 2020 +0100
Timer: don't allow setting an empty timer
src/timer.vala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/timer.vala b/src/timer.vala
index c3667b7..813fd2f 100644
--- a/src/timer.vala
+++ b/src/timer.vala
@@ -463,7 +463,10 @@ public class Face : Gtk.Stack, Clocks.Clock {
no_timer_container.reorder_child(timer_setup, 0);
set_visible_child_name ("empty");
- // start_button.set_sensitive(false);
+ start_button.set_sensitive(false);
+ timer_setup.duration_changed.connect ((duration) => {
+ start_button.set_sensitive (duration.get_total_seconds () != 0);
+ });
start_button.clicked.connect(() => {
var timer = this.timer_setup.get_timer();
this.add_timer(timer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]