fix for last commit. forgot to include Widget
[xboard.git] / callback.c
index 45500e3..eb9b4da 100644 (file)
@@ -14,6 +14,7 @@
 
 extern GtkWidget  *about;
 extern GtkWidget  *GUI_Window;
+extern GtkWidget  *GUI_Aspect;
 extern GtkWidget  *GUI_Menubar;
 extern GtkWidget  *GUI_Timer;
 extern GtkWidget  *GUI_Buttonbar;
@@ -60,12 +61,13 @@ ExposeProc(object, user_data)
       gtk_widget_size_request(GTK_WIDGET(GUI_Buttonbar),   &w);
       totalh += w.height;
       
-      ratio  = (totalh+boardHeight)/(boardWidth) ;
+      ratio  = ((float)totalh+boardHeight)/((float)boardWidth) ;
             
       gtk_widget_set_size_request(GTK_WIDGET(GUI_Board),
                                  boardWidth,boardHeight);
       
-      GUI_SetAspectRatio(ratio);
+      gtk_aspect_frame_set (GTK_ASPECT_FRAME(GUI_Aspect),0,0,ratio,TRUE);
+
       /* recreate pieces with new size... TODO: keep svg in memory and just recreate pixmap instead of reloading files */
       CreatePieces();
     } 
@@ -441,6 +443,14 @@ void AutoflagProc(object, user_data)
     return;
 }
 
+void AutoflipProc(object, user_data)
+     GtkObject *object;
+     gpointer user_data;
+{
+    appData.autoFlipView = !appData.autoFlipView;
+    return;
+}
+
 void ShowThinkingProc(object, user_data)
      GtkObject *object;
      gpointer user_data;
@@ -483,7 +493,7 @@ ResetProc (object, user_data)
      gpointer user_data;
 {
   ResetGameEvent();
-  AnalysisPopDown();
+  EngineOutputPopDown();
 }
 
 void WhiteClockProc(object, user_data)