Fix multi-leg promotions
[xboard.git] / gtk / xengineoutput.c
index 576d58b..374cbc1 100644 (file)
@@ -5,7 +5,8 @@
  *
  * Copyright 2005 Alessandro Scotti
  *
- * Enhancements Copyright 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ * Enhancements Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015,
+ * 2016 Free Software Foundation, Inc.
  *
  * ------------------------------------------------------------------------
  *
@@ -69,20 +70,15 @@ extern char *getenv();
 extern Option engoutOptions[]; // must go in header, but which?
 
 /* Module variables */
-static int currentPV, highTextStart[2], highTextEnd[2];
 #ifdef TODO_GTK
 static Widget memoWidget;
 #endif
 static GdkPixbuf *iconsGTK[8];
-static GtkWidget *outputFieldGTK[2][7]; // [HGM] front-end array to translate output field to window handlestatic void *memoWidget;
 
 static void
 ReadIcon (gchar *svgFilename, int iconNr)
 {
-    char buf[MSG_SIZ];
-
-    snprintf(buf, MSG_SIZ, "%s/%s", SVGDIR, svgFilename);
-    iconsGTK[iconNr] = gdk_pixbuf_new_from_file(buf, NULL);
+    iconsGTK[iconNr] = LoadIconFile(svgFilename);
 }
 
 void
@@ -92,14 +88,14 @@ InitEngineOutput (Option *opt, Option *memo2)
        Widget w = opt->handle;
        memoWidget = memo2->handle;
 #endif
-    ReadIcon("eo_White.svg", nColorWhite);
-    ReadIcon("eo_Black.svg", nColorBlack);
-    ReadIcon("eo_Unknown.svg", nColorUnknown);
-
-    ReadIcon("eo_Clear.svg", nClear);
-    ReadIcon("eo_Ponder.svg", nPondering);
-    ReadIcon("eo_Thinking.svg", nThinking);
-    ReadIcon("eo_Analyzing.svg", nAnalyzing);
+    ReadIcon("eo_White", nColorWhite);
+    ReadIcon("eo_Black", nColorBlack);
+    ReadIcon("eo_Unknown", nColorUnknown);
+
+    ReadIcon("eo_Clear", nClear);
+    ReadIcon("eo_Ponder", nPondering);
+    ReadIcon("eo_Thinking", nThinking);
+    ReadIcon("eo_Analyzing", nAnalyzing);
 }
 
 void
@@ -113,7 +109,7 @@ InsertIntoMemo (int which, char * text, int where)
 {
     char *p;
     GtkTextIter start;
+
     /* the backend adds \r\n, which is needed for winboard,
      * for xboard we delete them again over here */
     if(p = strchr(text, '\r')) *p = ' ';
@@ -128,15 +124,6 @@ InsertIntoMemo (int which, char * text, int where)
     }
 }
 
-//--------------------------------- PV walking ---------------------------------------
-
-char memoTranslations[] =
-":Ctrl<Key>c: CopyMemoProc() \n \
-<Btn3Motion>: HandlePV() \n \
-Shift<Btn3Down>: select-start() extend-end() SelectPV(1) \n \
-Any<Btn3Down>: select-start() extend-end() SelectPV(0) \n \
-<Btn3Up>: StopPV() \n";
-
 //------------------------------- pane switching -----------------------------------
 
 void
@@ -146,4 +133,3 @@ ResizeWindowControls (int mode)
     if(mode) gtk_widget_show(engoutOptions[13].handle);
     else     gtk_widget_hide(engoutOptions[13].handle);
 }
-