better init for random number generator
[xboard.git] / xengineoutput.c
index 455453d..2df13d3 100644 (file)
@@ -132,7 +132,7 @@ Pixmap icons[8]; // [HGM] this front-end array translates back-end icon indicato
 Widget outputField[2][7]; // [HGM] front-end array to translate output field to window handle
 
 void EngineOutputPopDown();
-void engineOutputPopUp(char *title, char *text);
+void engineOutputPopUp();
 int  EngineOutputIsUp();
 static void SetEngineColorIcon( int which );
 
@@ -381,7 +381,11 @@ Widget EngineOutputCreate(name, text)
     j = 0;
     XtSetArg(args[j], XtNresizable, True);  j++;
     shell =
+#if TOPLEVEL 
+     XtCreatePopupShell(name, topLevelShellWidgetClass,
+#else
       XtCreatePopupShell(name, transientShellWidgetClass,
+#endif
                         shellWidget, args, j);
     layout =
       XtCreateManagedWidget(layoutName, formWidgetClass, shell,
@@ -483,12 +487,13 @@ void ResizeWindowControls(shell, mode)
     }
 }
 
-void EngineOutputPopUp(title, text)
-     char *title, *text;
+void 
+EngineOutputPopUp()
 {
     Arg args[16];
     int j;
     Widget edit;
+    static char *title = _("Engine output"), *text = _("This feature is experimental");
 
     if (engineOutputShell == NULL) {
        engineOutputShell =
@@ -846,7 +851,8 @@ static void UpdateControls( EngineOutputData * ed )
             strncpy( mov, ed->hint, sizeof(mov) );
             mov[ sizeof(mov)-1 ] = '\0';
 
-            sprintf( buf, "%d/%d: %s [%02d:%02d:%02d]", ed->an_move_index, ed->an_move_count, mov, time_mins / 60, time_mins % 60, time_secs % 60 );
+           sprintf( buf, "[%d] %d/%d: %s [%02d:%02d:%02d]", ed->depth, ed->an_move_index,
+                       ed->an_move_count, mov, time_mins / 60, time_mins % 60, time_secs % 60 );
         }
 
         SetEngineState( ed->which, STATE_ANALYZING, buf );
@@ -937,7 +943,7 @@ EngineOutputProc(w, event, prms, nprms)
   if (engineOutputDialogUp) {
     EngineOutputPopDown();
   } else {
-    EngineOutputPopUp(_("engine output"),_("This feature is experimental"));
+    EngineOutputPopUp();
   }
 //  ToNrEvent(currentMove);
 }