if(colorVariable[n]) *(char**)colorVariable[n] = strdup(name);
}
+char *
+Col2Text (int n)
+{
+ return *(char**)colorVariable[n];
+}
+
void
ParseTextAttribs (ColorClass cc, char *s)
{
programName, appData.boardSize);
exit(2);
}
+ if(BOARD_WIDTH > 8)
+ squareSize = (squareSize*8 + BOARD_WIDTH/2)/BOARD_WIDTH; // scale height
if (i < 7) {
/* Find some defaults; use the nearest known size */
SizeDefaults *szd, *nearest;
} else {
SizeDefaults *szd = sizeDefaults;
if (*appData.boardSize == NULLCHAR) {
- GdkScreen *screen = gtk_window_get_screen(GTK_WINDOW(mainwindow));
+ GdkScreen *screen = gtk_window_get_screen(GTK_WINDOW(mainwindow)); // TODO: this does not work, as no mainwindow yet
guint screenwidth = gdk_screen_get_width(screen);
guint screenheight = gdk_screen_get_height(screen);
- while (screenwidth < szd->minScreenSize ||
- screenheight < szd->minScreenSize) {
+ while (screenwidth < (szd->minScreenSize*BOARD_WIDTH + 4)/8 ||
+ screenheight < (szd->minScreenSize*BOARD_HEIGHT + 4)/8) {
szd++;
}
if (szd->name == NULL) szd--;
buf[0]=eventkey->keyval;
buf[1]='\0';
if (eventkey->keyval > 32 && eventkey->keyval < 256)
- BoxAutoPopUp (buf);
+ ConsoleAutoPopUp (buf);
}
#ifdef TODO_GTK
count = read(is->fd, is->unused,
INPUT_SOURCE_BUF_SIZE - (is->unused - is->buf));
if (count <= 0) {
+ if(count == 0 && is->kind == CPReal && shells[ChatDlg]) { // [HGM] absence of terminal is no error if ICS Console present
+ RemoveInputSource(is); // cease reading stdin
+ stdoutClosed = TRUE; // suppress future output
+ return True;
+ }
(is->func)(is, is->closure, is->buf, count, count ? errno : 0);
return True;
}