Prevent changing time control during game (XB)
[xboard.git] / dialogs.c
index a5e42c5..ea0ece7 100644 (file)
--- a/dialogs.c
+++ b/dialogs.c
@@ -1671,6 +1671,10 @@ SetTcType (int n)
 void
 TimeControlProc ()
 {
+   if(gameMode != BeginningOfGame) {
+       DisplayError(_("Changing time control during a game is not implemented"), 0);
+       return;
+   }
    tmpMoves = appData.movesPerSession;
    tmpInc = appData.timeIncrement; if(tmpInc < 0) tmpInc = 0;
    tmpOdds1 = tmpOdds2 = 1; tcType = 0;
@@ -2264,8 +2268,8 @@ ErrorPopUp (char *title, char *label, int modal)
 {
     errorUp = True;
     errorOptions[1].name = label;
-    if(dialogError = shellUp[TransientDlg])
-       GenericPopUp(errorOptions+1, title, FatalDlg, TransientDlg, MODAL, 0); // pop up as daughter of the transient dialog
+    if(dialogError = shellUp[MasterDlg])
+       GenericPopUp(errorOptions+1, title, FatalDlg, MasterDlg, MODAL, 0); // pop up as daughter of the transient dialog
     else
        GenericPopUp(errorOptions+modal, title, modal ? FatalDlg: ErrorDlg, BoardWindow, modal, 0); // kludge: option start address indicates modality
 }