[iagno] Use Source.REMOVE and Source.CONTINUE
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno] Use Source.REMOVE and Source.CONTINUE
- Date: Sat, 20 Sep 2014 16:53:23 +0000 (UTC)
commit fe6bca951f25ed24b9e0dbc1bf05a845f33d48eb
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Sep 20 11:53:08 2014 -0500
Use Source.REMOVE and Source.CONTINUE
src/game-view.vala | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/src/game-view.vala b/src/game-view.vala
index 4d3108c..d863ae1 100644
--- a/src/game-view.vala
+++ b/src/game-view.vala
@@ -224,13 +224,11 @@ public class GameView : Gtk.DrawingArea
* Show the actual final positions of the pieces before flipping the board.
* Otherwise, it could seem like the final player placed the other's piece.
*/
- Timeout.add_seconds (2, () =>
- {
- flip_final_result_now = true;
- square_changed_cb (x, y);
- /* Disconnect from mainloop */
- return false;
- });
+ Timeout.add_seconds (2, () => {
+ flip_final_result_now = true;
+ square_changed_cb (x, y);
+ return Source.REMOVE;
+ });
}
}
@@ -271,10 +269,10 @@ public class GameView : Gtk.DrawingArea
if (!animating)
{
animate_timeout = 0;
- return false;
+ return Source.REMOVE;
}
- return true;
+ return Source.CONTINUE;
}
private int get_pixmap (Player color)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]