{N_("Machine Black Ctrl+B"), "Machine Black", MachineBlackProc},
{N_("Two Machines Ctrl+T"), "Two Machines", TwoMachinesProc},
{N_("Analysis Mode Ctrl+A"), "Analysis Mode", AnalyzeModeProc},
- {N_("Analyze File Ctrl+F"), "Analyze File", AnalyzeFileProc },
+ {N_("Analyze Game Ctrl+G"), "Analyze File", AnalyzeFileProc },
{N_("Edit Game Ctrl+E"), "Edit Game", EditGameProc},
{N_("Edit Position Ctrl+Shift+E"), "Edit Position", EditPositionProc},
{N_("Training"), "Training", TrainingProc},
:Ctrl<Key>o: LoadGameProc() \n \
:Meta<Key>Next: LoadNextGameProc() \n \
:Meta<Key>Prior: LoadPrevGameProc() \n \
+ :Ctrl<Key>Down: LoadSelectedProc(3) \n \
+ :Ctrl<Key>Up: LoadSelectedProc(-3) \n \
:Ctrl<Key>s: SaveGameProc() \n \
:Ctrl<Key>c: CopyGameProc() \n \
:Ctrl<Key>v: PasteGameProc() \n \
:Ctrl<Key>b: MachineBlackProc() \n \
:Ctrl<Key>t: TwoMachinesProc() \n \
:Ctrl<Key>a: AnalysisModeProc() \n \
- :Ctrl<Key>f: AnalyzeFileProc() \n \
+ :Ctrl<Key>g: AnalyzeFileProc() \n \
:Ctrl<Key>e: EditGameProc() \n \
:Ctrl<Key>E: EditPositionProc() \n \
:Meta<Key>O: EngineOutputProc() \n \
:Meta<Key>Right: ForwardProc() \n \
:Meta<Key>Home: ToStartProc() \n \
:Meta<Key>Left: BackwardProc() \n \
+ :<Key>Left: BackwardProc() \n \
+ :<Key>Right: ForwardProc() \n \
:<Key>Home: RevertProc() \n \
:<Key>End: TruncateGameProc() \n \
:Ctrl<Key>m: MoveNowProc() \n \
Any<Btn3Down>: XawPositionSimpleMenu(menuB) XawPositionSimpleMenu(menuD) \
PieceMenuPopup(menuB) \n";
-char whiteTranslations[] = "<BtnDown>: WhiteClock()\n";
-char blackTranslations[] = "<BtnDown>: BlackClock()\n";
+char whiteTranslations[] =
+ "Shift<BtnDown>: WhiteClock(1)\n \
+ <BtnDown>: WhiteClock(0)\n";
+char blackTranslations[] =
+ "Shift<BtnDown>: BlackClock(1)\n \
+ <BtnDown>: BlackClock(0)\n";
char ICSInputTranslations[] =
"<Key>Up: UpKeyProc() \n "
{
XpmAttributes attr;
attr.valuemask = 0;
- if(s == NULL || *s == 0 || *s == '*') { useTexture &= ~(kind+1); return; }
+ if(!appData.useBitmaps || s == NULL || *s == 0 || *s == '*') { useTexture &= ~(kind+1); return; }
if (XpmReadFileToPixmap(xDisplay, xBoardWindow, s, &(xpmBoardBitmap[kind]), NULL, &attr) == 0) {
useTexture |= kind + 1; textureW[kind] = attr.width; textureH[kind] = attr.height;
}
String *prms;
Cardinal *nprms;
{
+ shiftKey = prms[0][0] & 1;
ClockClick(0);
}
String *prms;
Cardinal *nprms;
{
+ shiftKey = prms[0][0] & 1;
ClockClick(1);
}
PopDown(1);
}
+static char *openName;
+FILE *openFP;
+
+void DelayedLoad()
+{
+ (void) (*fileProc)(openFP, 0, openName);
+}
+
void FileNamePopUp(label, def, filter, proc, openMode)
char *label;
char *def;
fileProc = proc; /* I can't see a way not */
fileOpenMode = openMode; /* to use globals here */
{ // [HGM] use file-selector dialog stolen from Ghostview
- char *name;
int index; // this is not supported yet
- FILE *f;
- if(f = XsraSelFile(shellWidget, label, NULL, NULL, "could not open: ",
- (def[0] ? def : NULL), filter, openMode, NULL, &name))
- (void) (*fileProc)(f, index=0, name);
+ if(openFP = XsraSelFile(shellWidget, label, NULL, NULL, "could not open: ",
+ (def[0] ? def : NULL), filter, openMode, NULL, &openName))
+ // [HGM] delay to give expose event opportunity to redraw board after browser-dialog popdown before lengthy load starts
+ ScheduleDelayedEvent(&DelayedLoad, 50);
}
}
void CopySomething()
{
- int ret;
-
/*
* Set both PRIMARY (the selection) and CLIPBOARD, since we don't
* have a notion of a game that is selected but not copied.
DisplayError(buf, 0);
return;
}
- Reset(FALSE, TRUE);
+// Reset(FALSE, TRUE);
#ifndef OPTIONSDIALOG
if (!appData.showThinking)
ShowThinkingProc(w,event,prms,nprms);
#endif
AnalyzeFileEvent();
- FileNamePopUp(_("File to analyze"), "", ".pgn .game", LoadGamePopUp, "rb");
+// FileNamePopUp(_("File to analyze"), "", ".pgn .game", LoadGamePopUp, "rb");
AnalysisPeriodicEvent(1);
}
XtSetArg(args[i], XtNiconName, (XtArgVal) icon); i++;
XtSetArg(args[i], XtNtitle, (XtArgVal) title); i++;
XtSetValues(shellWidget, args, i);
+ XSync(xDisplay, False);
}
} else {
char buf[2048];
char *prefix = "", *sep = "";
+ if(appData.soundProgram[0] == NULLCHAR) return;
if(!strchr(name, '/')) { prefix = appData.soundDirectory; sep = "/"; }
snprintf(buf, sizeof(buf), "%s '%s%s%s' &", appData.soundProgram, prefix, sep, name);
system(buf);
}
void
+RunCommand(char *buf)
+{
+ system(buf);
+}
+
+void
Colorize(cc, continuation)
ColorClass cc;
int continuation;
struct addrinfo hints;
struct addrinfo *ais, *ai;
int error;
- int s;
+ int s=0;
ChildProc *cp;
memset(&hints, 0, sizeof(hints));
#endif
+void
+DoSleep(int n)
+{
+ FrameDelay(n);
+}
+
/* Convert board position to corner of screen rect and color */
static void
}
void
-DragPieceBegin(x, y)
- int x; int y;
+DragPieceBegin(x, y, instantly)
+ int x; int y; Boolean instantly;
{
int boardX, boardY, color;
XPoint corner;