X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xengineoutput.c;h=57a32d360d3dea5bfe65fea66dafa546a297e8ea;hb=407cd1126c6c24d890359f1fe1686f6d90c0ad61;hp=02446e16e62b3b5bb8874dbdb0f18e71dc83692e;hpb=b382d988c6f886f3a49483df9e3e36de0b6b0824;p=xboard.git diff --git a/xengineoutput.c b/xengineoutput.c index 02446e1..57a32d3 100644 --- a/xengineoutput.c +++ b/xengineoutput.c @@ -100,14 +100,6 @@ extern char *getenv(); #define _LL_ 100 -// imports from xboard.c -extern Widget formWidget, shellWidget, boardWidget, menuBarWidget; -extern Display *xDisplay; -extern Window xBoardWindow; -extern int squareSize; -extern Pixmap xMarkPixmap, wIconPixmap, bIconPixmap; -extern char *layoutName; - Pixmap icons[8]; // [HGM] this front-end array translates back-end icon indicator to handle Widget outputField[2][7]; // [HGM] front-end array to translate output field to window handle @@ -116,12 +108,6 @@ void engineOutputPopUp(); int EngineOutputIsUp(); void SetEngineColorIcon( int which ); -/* Imports from backend.c */ -extern int opponentKibitzes; - -/* Imports from xboard.c */ -extern Arg layoutArgs[2], formArgs[2], messageArgs[4]; - //extern WindowPlacement wpEngineOutput; Position engineOutputX = -1, engineOutputY = -1; @@ -221,8 +207,6 @@ void DoClearMemo(int which) // cloned from CopyPositionProc. Abuse selected_fen_position to hold selection -extern char *selected_fen_position; - Boolean SendPositionSelection(Widget w, Atom *selection, Atom *target, Atom *type_return, XtPointer *value_return, unsigned long *length_return, int *format_return); // from xboard.c @@ -231,7 +215,8 @@ void SetFocus(Widget w, XtPointer data, XEvent *event, Boolean *b); // from xopt char memoTranslations[] = ":Ctrlc: CopyMemoProc() \n \ : HandlePV() \n \ -: select-start() SelectPV() \n \ +Shift: select-start() SelectPV(1) \n \ +Any: select-start() SelectPV(0) \n \ : extend-end() StopPV() \n"; void @@ -248,6 +233,7 @@ SelectPV (Widget w, XEvent * event, String * params, Cardinal * nParams) XawTextGetSelectionPos(w, &index, &dummy); XtSetArg(arg, XtNstring, &val); XtGetValues(w, &arg, 1); + shiftKey = strcmp(params[0], "0"); if(LoadMultiPV(x, y, val, index, &start, &end)) { XawTextSetSelection( outputField[currentPV][nMemo], start, end ); highTextStart[currentPV] = start; highTextEnd[currentPV] = end; @@ -540,11 +526,11 @@ EngineOutputPopUp() int j; Widget edit; static int needInit = TRUE; - static char *title = _("Engine output"), *text = _("This feature is experimental"); + static char *title = N_("Engine output"), *text = N_("This feature is experimental"); if (engineOutputShell == NULL) { engineOutputShell = - EngineOutputCreate(title, text); + EngineOutputCreate(_(title), _(text)); XtRealizeWidget(engineOutputShell); CatchDeleteWindow(engineOutputShell, "EngineOutputPopDown"); if( needInit ) { @@ -561,8 +547,8 @@ EngineOutputPopUp() XtSetArg(args[j], XtNstring, text); j++; XtSetValues(edit, args, j); j = 0; - XtSetArg(args[j], XtNiconName, (XtArgVal) title); j++; - XtSetArg(args[j], XtNtitle, (XtArgVal) title); j++; + XtSetArg(args[j], XtNiconName, (XtArgVal) _(title)); j++; + XtSetArg(args[j], XtNtitle, (XtArgVal) _(title)); j++; XtSetValues(engineOutputShell, args, j); }