Rename ChessEngine.stopped() to ChessEngine.stopped_unexpectedly()

Actually, this comment was not true prior to the previous commit:
ChessEngine.stopped() would always be called because
ChessEngine.engine_stopped_cb() would be called after
ChessEngine.stop(). But there really is no need to call it in that case,
so rename the signal. This is clearer anyway.
This commit is contained in:
Michael Catanzaro 2015-07-19 14:01:01 -05:00
parent fe2a655aa9
commit 20452ab1b9
2 changed files with 3 additions and 5 deletions

View file

@ -31,7 +31,7 @@ public abstract class ChessEngine : Object
public signal void ready_changed ();
public signal void moved (string move);
public signal void resigned ();
public signal void stopped ();
public signal void stopped_unexpectedly ();
public signal void error ();
public signal void claim_draw ();
public signal void offer_draw ();
@ -110,9 +110,7 @@ public abstract class ChessEngine : Object
// ChessEngine.stop(). If it quit on its own, we need to clean up here.
if (started) {
stop (false);
// This signal is only to be emitted when the chess engine stops
// itself, not when another class calls ChessEngine.stop ().
stopped ();
stopped_unexpectedly ();
}
}

View file

@ -771,7 +771,7 @@ public class ChessApplication : Gtk.Application
opponent.resign ();
}
private void engine_stopped_cb (ChessEngine engine)
private void engine_stopped_unexpectedly_cb (ChessEngine engine)
{
/*
* Many engines close themselves immediately after the end of the game.