void
BoardToTop ()
{
- gtk_window_present(GTK_WINDOW(mainwindow));
+ gtk_window_present(GTK_WINDOW(shells[BoardWindow]));
}
//---------------------------------------------------------------------------------------------------------
busy = 0; return; // false alarm
}
ReSize(&wpNew);
- if(shellUp[EngOutDlg]) CoDrag(shells[EngOutDlg], &wpEngineOutput);
- if(shellUp[HistoryDlg]) CoDrag(shells[HistoryDlg], &wpMoveHistory);
- if(shellUp[EvalGraphDlg]) CoDrag(shells[EvalGraphDlg], &wpEvalGraph);
- if(shellUp[GameListDlg]) CoDrag(shells[GameListDlg], &wpGameList);
+ if(appData.useStickyWindows) {
+ if(shellUp[EngOutDlg]) CoDrag(shells[EngOutDlg], &wpEngineOutput);
+ if(shellUp[HistoryDlg]) CoDrag(shells[HistoryDlg], &wpMoveHistory);
+ if(shellUp[EvalGraphDlg]) CoDrag(shells[EvalGraphDlg], &wpEvalGraph);
+ if(shellUp[GameListDlg]) CoDrag(shells[GameListDlg], &wpGameList);
+ }
wpMain = wpNew;
DrawPosition(True, NULL);
if(delayedDragTag) g_source_remove(delayedDragTag);
wpNew.y = event->configure.y;
wpNew.width = event->configure.width;
wpNew.height = event->configure.height;
- if(appData.useStickyWindows)
- DelayedDrag(); // as long as events keep coming in faster than 50 msec, they destroy each other
+ DelayedDrag(); // as long as events keep coming in faster than 50 msec, they destroy each other
return FALSE;
}
/* Always toggle, don't set. Previous code messes up when
invoked while the button is pressed, as releasing it
toggles the state again. */
- GdkColor color;
+ GdkColor color;
gdk_color_parse( pausing ? "#808080" : "#F0F0F0", &color );
gtk_widget_modify_bg ( GTK_WIDGET(optList[W_PAUSE].handle), GTK_STATE_NORMAL, &color );
}
return;
}
selection_tmp[len] = NULLCHAR; // file is now in selection_tmp
-
+
// copy selection_tmp to clipboard
GdkDisplay *gdisp = gdk_display_get_default();
if (!gdisp) {
}
cb = gtk_clipboard_get_for_display(gdisp, GDK_SELECTION_CLIPBOARD);
gtk_clipboard_set_text(cb, selection_tmp, -1);
- g_free(selection_tmp);
+ g_free(selection_tmp);
}
void
gchar *fenstr;
if (gdisp == NULL) return;
- cb = gtk_clipboard_get_for_display(gdisp, GDK_SELECTION_CLIPBOARD);
+ cb = gtk_clipboard_get_for_display(gdisp, GDK_SELECTION_CLIPBOARD);
fenstr = gtk_clipboard_wait_for_text(cb);
- if (fenstr==NULL) return; // nothing had been selected to copy
+ if (fenstr==NULL) return; // nothing had been selected to copy
EditPositionPasteFEN(fenstr);
return;
}
// get game from clipboard
GdkDisplay *gdisp = gdk_display_get_default();
if (gdisp == NULL) return;
- cb = gtk_clipboard_get_for_display(gdisp, GDK_SELECTION_CLIPBOARD);
+ cb = gtk_clipboard_get_for_display(gdisp, GDK_SELECTION_CLIPBOARD);
text = gtk_clipboard_wait_for_text(cb);
- if (text == NULL) return; // nothing to paste
+ if (text == NULL) return; // nothing to paste
len = strlen(text);
// write to temp file
if (text == NULL || len == 0) {
- return; //nothing to paste
+ return; //nothing to paste
}
f = fopen(gamePasteFilename, "w");
if (f == NULL) {
fwrite(text, 1, len, f);
fclose(f);
- // load from file
+ // load from file
LoadGameFromFile(gamePasteFilename, 0, gamePasteFilename, TRUE);
return;
}
buf[0]=eventkey->keyval;
buf[1]='\0';
- if (*buf >= 32)
+ if (*buf >= 32)
BoxAutoPopUp (buf);
}
return;
}
-void FileNamePopUpGTK(label, def, filter, proc, pathFlag, openMode, name, fp)
+void FileNamePopUpWrapper(label, def, filter, proc, pathFlag, openMode, name, fp)
char *label;
char *def;
char *filter;
return;
}
-