X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=db7e249f24bba8ac082f923743523f0092545dfd;hb=21a44c336aa8cd16a38f3c682386528c8f112650;hp=eda07e3f53b2aad30aff0ee7f9dcfa8e57cb26dc;hpb=c18e1d1cc90c5871b7d245d423c4b0f80b1fa6ca;p=xboard.git diff --git a/dialogs.c b/dialogs.c index eda07e3..db7e249 100644 --- a/dialogs.c +++ b/dialogs.c @@ -48,8 +48,9 @@ extern char *getenv(); #include #include "common.h" +#include "frontend.h" #include "backend.h" -#include "xboard.h" +#include "xboard2.h" #include "menus.h" #include "dialogs.h" #include "gettext.h" @@ -805,8 +806,8 @@ static Option boardOptions[] = { { 0, 0, 0, NULL, (void*) &appData.monoMode, "", NULL, CheckBox, N_("Mono Mode") }, { 0,-1, 5, NULL, (void*) &appData.overrideLineGap, "", NULL, Spin, N_("Line Gap ( -1 = default for board size):") }, { 0, 0, 0, NULL, (void*) &appData.useBitmaps, "", NULL, CheckBox, N_("Use Board Textures") }, -{ 0, 0, 0, NULL, (void*) &appData.liteBackTextureFile, ".xpm", NULL, FileName, N_("Light-Squares Texture File:") }, -{ 0, 0, 0, NULL, (void*) &appData.darkBackTextureFile, ".xpm", NULL, FileName, N_("Dark-Squares Texture File:") }, +{ 0, 0, 0, NULL, (void*) &appData.liteBackTextureFile, ".png", NULL, FileName, N_("Light-Squares Texture File:") }, +{ 0, 0, 0, NULL, (void*) &appData.darkBackTextureFile, ".png", NULL, FileName, N_("Dark-Squares Texture File:") }, { 0, 0, 0, NULL, (void*) &appData.trueColors, "", NULL, CheckBox, N_("Use external piece bitmaps with their own colors") }, { 0, 0, 0, NULL, (void*) &appData.pieceDirectory, "", NULL, PathName, N_("Directory with Pieces Images:") }, { 0, 0, 0, NULL, (void*) &BoardOptionsOK, "", NULL, EndMark , "" } @@ -1014,6 +1015,31 @@ NewTagsPopup (char *text, char *msg) GenericPopUp(tagsOptions, title, TagsDlg, BoardWindow, NONMODAL, 1); } +void +TagsPopUp (char *tags, char *msg) +{ + NewTagsPopup(tags, cmailMsgLoaded ? msg : NULL); +} + +void +EditTagsPopUp (char *tags, char **dest) +{ // wrapper to preserve old name used in back-end + NewTagsPopup(tags, NULL); +} + +void +TagsPopDown() +{ + PopDown(TagsDlg); + bookUp = False; +} + +void +EditTagsProc () +{ + if (bookUp || !PopDown(TagsDlg)) EditTagsEvent(); +} + //---------------------------------------------- ICS Input Box ---------------------------------- char *icsText; @@ -1173,6 +1199,7 @@ BoxAutoPopUp (char *buf) void SettingsPopUp (ChessProgramState *cps) { + if(!cps->nrOptions) { DisplayNote(_("Engine has no options")); return; } currentCps = cps; GenericPopUp(cps->option, _("Engine Settings"), TransientDlg, BoardWindow, MODAL, 0); } @@ -1400,6 +1427,7 @@ TimeControlProc () tmpOdds1 = tmpOdds2 = 1; tcType = 0; tmpTc = atoi(appData.timeControl); GenericPopUp(tcOptions, _("Time Control"), TransientDlg, BoardWindow, MODAL, 0); + SetTcType(searchTime ? 2 : appData.timeIncrement < 0 ? 0 : 1); } //------------------------------- Ask Question -----------------------------------------