Created
December 17, 2018 15:40
-
-
Save naaando/24dff4e4f53756d0a3075196a2d5ddaa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public virtual signal void start (State state = State.WORKING) { | |
running = true; | |
if (current_pomodoro != null) { | |
current_pomodoro.end (); | |
} | |
current_pomodoro = new Pomodoro (state); | |
seq.push_state (state); | |
if (timer != null) { | |
timer.cancel (); | |
} | |
timer = create_timer (state); | |
timer.finished.connect (() => stop ()); | |
timer.start (); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public signal void started (State state); | |
public void start (State state = State.WORKING) { | |
started (); | |
running = true; | |
if (current_pomodoro != null) { | |
current_pomodoro.end (); | |
} | |
current_pomodoro = new Pomodoro (state); | |
seq.push_state (state); | |
if (timer != null) { | |
timer.cancel (); | |
} | |
timer = create_timer (state); | |
timer.finished.connect (() => stop ()); | |
timer.start (); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment