fixed Makefile.am to include gtk-interface.xml and svg files
[xboard.git] / xhistory.c
index 1a29626..6bf4ad0 100644 (file)
@@ -63,12 +63,16 @@ extern GtkWidget               *GUI_History;
 extern GtkListStore            *LIST_MoveHistory;
 
 String dots=" ... ";
+Position gameHistoryX, gameHistoryY;
+Dimension gameHistoryW, gameHistoryH;
 
 void
 HistoryPopDown(object, user_data)
      GtkObject *object;
      gpointer user_data;
 {
+  /* hides the history window */
+
   gtk_widget_hide (GUI_History);
   return;
 }
@@ -147,7 +151,8 @@ void HistorySet(char movelist[][2*MOVE_LEN],int first,int last,int current)
          strcpy(moveblack,"");
        };
     }
-  /* check if ther is a white move left */
+
+  /* check if there is a white move left */
   if(movewhite[0])
     {
       i++;
@@ -160,6 +165,9 @@ void HistorySet(char movelist[][2*MOVE_LEN],int first,int last,int current)
                          2, moveblack,
                          -1);
     };
+
+  //TODO
+  //  EvalGraphSet( first, last, current, pvInfoList ); // piggy-backed
   
   return;
 }
@@ -173,15 +181,30 @@ void HistoryCreate()
              <Key>Right: ForwardProc() \n";
 
     return;
+//    if(wpMoveHistory.width > 0) {
+//      gameHistoryW = wpMoveHistory.width;
+//      gameHistoryH = wpMoveHistory.height;
+//      gameHistoryX = wpMoveHistory.x;
+//      gameHistoryY = wpMoveHistory.y;
+//    }
+//
+//  // [HGM] restore old position
+//  if(gameHistoryW > 0) {
+//  j = 0;
+//    XtSetArg(args[j], XtNx, gameHistoryX);  j++;
+//  XtSetArg(args[j], XtNy, gameHistoryY);  j++;
+//    XtSetArg(args[j], XtNwidth, gameHistoryW);  j++;
+//    XtSetArg(args[j], XtNheight, gameHistoryH);  j++;
+//  XtSetValues(hist->sh, args, j);
+//  }
 }
 
 void
 HistoryPopUp()
 {
-  //  if(!hist) HistoryCreate();
+  /* show history window */
 
   gtk_widget_show (GUI_History);
-  
   return;
 }
 
@@ -198,3 +221,10 @@ HistoryShowProc(object, user_data)
   return;
 }
 
+Boolean
+MoveHistoryIsUp()
+{
+  /* return status of history window */
+  
+  return gtk_widget_get_visible (GUI_History);
+}