From: H.G. Muller Date: Fri, 19 Oct 2012 15:29:40 +0000 (+0200) Subject: Add hiding / showing second Engine Output pane X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=b3272a37874cfe99409e5caef1547746cf5fd646;p=xboard.git Add hiding / showing second Engine Output pane The handle of the GTK table for the second engine is stored in the EndMark handle by GenericPopUp, so it can be used later to hise/show that table. --- diff --git a/xengineoutput.c b/xengineoutput.c index 4d94616..b19b77e 100644 --- a/xengineoutput.c +++ b/xengineoutput.c @@ -166,39 +166,7 @@ void ResizeWindowControls (int mode) { // another hideous kludge: to have only a single pane, we resize the // second to 5 pixels (which makes it too small to display anything) -#ifdef TODO_GTK - Widget form1, form2; - Arg args[16]; - int j; - Dimension ew_height, tmp; - Widget shell = shells[EngOutDlg]; - - form1 = XtNameToWidget(shell, "*paneA"); - form2 = XtNameToWidget(shell, "*paneB"); - - j = 0; - XtSetArg(args[j], XtNheight, (XtArgVal) &ew_height); j++; - XtGetValues(form1, args, j); - j = 0; - XtSetArg(args[j], XtNheight, (XtArgVal) &tmp); j++; - XtGetValues(form2, args, j); - ew_height += tmp; // total height - - if(mode==0) { - j = 0; - XtSetArg(args[j], XtNheight, (XtArgVal) 5); j++; - XtSetValues(form2, args, j); - j = 0; - XtSetArg(args[j], XtNheight, (XtArgVal) (ew_height-5)); j++; - XtSetValues(form1, args, j); - } else { - j = 0; - XtSetArg(args[j], XtNheight, (XtArgVal) (ew_height/2)); j++; - XtSetValues(form1, args, j); - j = 0; - XtSetArg(args[j], XtNheight, (XtArgVal) (ew_height/2)); j++; - XtSetValues(form2, args, j); - } -#endif + if(mode) gtk_widget_show(engoutOptions[13].handle); + else gtk_widget_hide(engoutOptions[13].handle); } diff --git a/xoptions.c b/xoptions.c index b823553..5fb0e49 100644 --- a/xoptions.c +++ b/xoptions.c @@ -1470,6 +1470,8 @@ printf("n=%d, h=%d, w=%d\n",n,height,width); else gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, TRUE, TRUE, 0); + option[i].handle = (void *) table; // remember last table in EndMark handle (for hiding Engine-Output pane). + /* Show dialog */ gtk_widget_show_all( dialog );