Fix multi-leg promotions
[xboard.git] / gtk / xengineoutput.c
index 34a960c..374cbc1 100644 (file)
@@ -5,7 +5,8 @@
  *
  * Copyright 2005 Alessandro Scotti
  *
- * Enhancements Copyright 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ * Enhancements Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015,
+ * 2016 Free Software Foundation, Inc.
  *
  * ------------------------------------------------------------------------
  *
@@ -77,10 +78,7 @@ static GdkPixbuf *iconsGTK[8];
 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
@@ -90,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
@@ -111,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 = ' ';
@@ -135,4 +133,3 @@ ResizeWindowControls (int mode)
     if(mode) gtk_widget_show(engoutOptions[13].handle);
     else     gtk_widget_hide(engoutOptions[13].handle);
 }
-