// don't unref the builder, since we use it to get references to widgets
// g_object_unref (G_OBJECT (builder));
- printf("DEBUG:finished building gtk\n");
/* end parse glade file */
if (argc > 1) {
tinyLayout = szd->tinyLayout;
}
- printf("DEBUG::main: squareSize %d\n",squareSize);
-
boardWidth = lineGap + BOARD_WIDTH * (squareSize + lineGap);
boardHeight = lineGap + BOARD_HEIGHT * (squareSize + lineGap);
if (appData.showJail == 1) {
textColors[ColorNone].fg = textColors[ColorNone].bg = -1;
textColors[ColorNone].attr = 0;
- printf("DEBUG: I'm here 0\n");
-
// XtAppAddActions(appContext, boardActions, XtNumber(boardActions));
/*
XtSetArg(args[1], XtNtop, XtChainTop);
XtSetArg(args[2], XtNbottom, XtChainTop);
XtSetValues(blackTimerWidget, args, 3);
- printf("DEBUG: I'm here 1\n");
if (appData.titleInWindow) {
widgetList[j++] = titleWidget =
/* end gtk set properties of widgets */
- printf("DEBUG: made it.\n");
-
/*
* formWidget uses these constraints but they are stored
* in the children.
// XtSetValues(menuBarWidget, args, i);
// if (appData.titleInWindow) {
// if (smallLayout) {
-// printf("DEBUG: made it a.\n");
// i = 0;
// XtSetArg(args[i], XtNfromVert, menuBarWidget); i++;
// XtSetValues(whiteTimerWidget, args, i);
// XtSetValues(buttonBarWidget, args, i);
// }
// } else {
-// printf("DEBUG: made it b.\n");
// i = 0;
// XtSetArg(args[i], XtNfromVert, titleWidget); i++;
// XtSetValues(whiteTimerWidget, args, i);
// XtSetValues(buttonBarWidget, args, i);
// }
// }
-// } else { printf("DEBUG: made it c.\n");
+// } else {
//
// i = 0;
// XtSetArg(args[i], XtNfromVert, menuBarWidget); i++;
// XtSetValues(buttonBarWidget, args, i);
// }
// }
-// printf("DEBUG: made it 1.\n");
// i = 0;
// XtSetArg(args[0], XtNfromVert, messageWidget);
// XtSetArg(args[1], XtNtop, XtChainTop);
//
// XtRealizeWidget(shellWidget);
//
- printf("DEBUG: made it 2.\n");
/*
* Correct the width of the message and title widgets.
// XtSetValues(shellWidget, args, i);
//
- printf("DEBUG: creating svgs.\n");
-
/* load square colors */
SVGLightSquare = load_pixbuf("svg/LightSquare.svg",squareSize);
SVGDarkSquare = load_pixbuf("svg/DarkSquare.svg",squareSize);
/* realize window */
gtk_widget_show (GUI_Window);
- printf("DEBUG: before created stuff squareSize %d.\n",squareSize);
-
CreateGCs();
CreateGrid();
CreatePieces();
if (appData.animate || appData.animateDragging)
CreateAnimVars();
- printf("DEBUG: created stuff squareSize %d.\n",squareSize);
-
-
// XtAugmentTranslations(formWidget,
// XtParseTranslationTable(globalTranslations));
// XtAugmentTranslations(boardWidget,
//
InitBackEnd2();
- printf("DEBUG: back end initiated.\n");
-
if (errorExitStatus == -1) {
if (appData.icsActive) {
/* We now wait until we see "login:" from the ICS before
gdk_cursor_destroy(BoardCursor);
/* end cursor */
- printf("DEBUG: going into gtk-main.\n");
-
gtk_main ();
if (appData.debugMode) fclose(debugFP); // [DM] debug
int square_color, x, y;
Drawable dest;
{
- printf("DEBUG::colorDrawPiece: piece %d square_color %d x %d y %d \n",piece,square_color,x,y);
gdk_draw_pixbuf(GDK_WINDOW(GUI_Board->window),NULL,GDK_PIXBUF(SVGpieces[piece]),0,0,x,y,-1,-1, GDK_RGB_DITHER_NORMAL, 0, 0);
return ;
DrawFunc ChooseDrawFunc()
{
- printf("DEBUG::ChooseDrawFunc: appData.monoMode %d useImages %d\n",appData.monoMode,useImages);
if (appData.monoMode) {
if (DefaultDepth(xDisplay, xScreen) == 1) {
return monoDrawPiece_1bit;
/* Calculate delay in milliseconds (2-delays per complete flash) */
flash_delay = 500 / appData.flashRate;
- printf("DEBUG: linegap %d squareSize %d \n",lineGap,squareSize);
-
/* calculate x and y coordinates from row and column */
if (flipView) {
x = lineGap + ((BOARD_WIDTH-1)-column) *
square_color = SquareColor(row, column);
- printf("DEBUG::DrawSquare: row %d column %d piece %d do_flash %d square_color %d x %d y %d\n",row,column,piece,do_flash,square_color,x,y);
-
if ( // [HGM] holdings: blank out area between board and holdings
column == BOARD_LEFT-1 || column == BOARD_RGHT
|| (column == BOARD_LEFT-2 && row < BOARD_HEIGHT-gameInfo.holdingsSize)
Arg args[16];
int rrow, rcol;
- printf ("DEBUG::DrawPosition: start\n");
-
-
if (board == NULL) {
if (!lastBoardValid) return;
board = lastBoard;
* but this causes a very distracting flicker.
*/
- printf ("DEBUG::DrawPosition: in draw position 0.1\n");
- printf("DEBUG::DrawPosition: squareSize %d\n",squareSize);
-
-
if (!repaint && lastBoardValid && lastFlipView == flipView) {
-
- printf ("DEBUG::DrawPosition: in draw position 0.1a\n");
/* If too much changes (begin observing new game, etc.), don't
do flashing */
do_flash = too_many_diffs(board, lastBoard) ? 0 : 1;
DrawSquare(i, j, board[i][j], do_flash);
}
} else {
- printf("DEBUG::DrawPosition: in else linegap %d squareSize %d\n",lineGap,squareSize);
if (lineGap > 0)
{
/* todo move GC to setupgc */
squareSize=108;
for (i = 0; i < BOARD_HEIGHT; i++)
for (j = 0; j < BOARD_WIDTH; j++) {
- printf("DEBUG::DrawPosition: squareSize %d\n",squareSize);
DrawSquare(i, j, board[i][j], 0);
damage[i][j] = False;
}
{
GtkWidget *dialog;
- printf ("DEBUG: error %s %s\n\n",title,label);
-
dialog = gtk_message_dialog_new(GTK_WINDOW(GUI_Window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
// todo this toggling of the pause button doesn't seem to work?
// e.g. select pause from buttonbar doesn't activate menumode.pause
- // fprintf(stderr,"DEBUG: oldmode %d newmode %d oldpause %d newpause %d\n",oldmode,gameMode,oldPausing,pausing);
- //fflush(stderr);
-
// if (!boardWidget || !XtIsRealized(boardWidget)) return;
if (pausing != oldPausing) {
message = extMessage;
}
}
-
- printf("TODO: message %s\n",message);
gtk_label_set_text( GTK_LABEL(gtk_builder_get_object (builder, "Messages")),message);
}