diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:00 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:00 +0200 |
commit | b623f5953691b2a0614e6f1f4def86bdbb9a4113 (patch) | |
tree | 18102bd36f7e22eb2ba2b9f880e4cb29346f4cb8 /app/bin/custom.c | |
parent | 359b557176b9bb2ff1aed2082641eed39c358d0d (diff) |
New upstream version 5.2.0Beta2.1upstream/5.2.0Beta2.1
Diffstat (limited to 'app/bin/custom.c')
-rw-r--r-- | app/bin/custom.c | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/app/bin/custom.c b/app/bin/custom.c index 618a8ac..68a996b 100644 --- a/app/bin/custom.c +++ b/app/bin/custom.c @@ -53,7 +53,6 @@ #define product "xtrkcad" #define PRODUCT "XTRKCAD" #define Version VERSION -#define KEYCODE "x" #define PARAMKEY (0) @@ -68,15 +67,18 @@ char * sTurnoutDesignerW = NULL; char * sAboutProd = NULL; char * sCustomF = product ".cus"; -char * sCheckPointF = product ".ckp"; -char * sCheckPoint1F = product ".ck1"; +char * sCheckPointF = product Version ".ckp"; +char * sCheckPoint1F = product Version ".ck1"; + char * sClipboardF = product ".clp"; -char * sParamQF = product "." KEYCODE "tq"; +char * sParamQF = product ".xtq"; char * sUndoF = product ".und"; char * sAuditF = product ".aud"; char * sTipF = product ".tip"; char * sSourceFilePattern = NULL; +char * sSaveFilePattern = NULL; +char * sImageFilePattern = NULL; char * sImportFilePattern = NULL; char * sDXFFilePattern = NULL; char * sRecordFilePattern = NULL; @@ -137,13 +139,14 @@ BOOL_T Initialize( void ) InitTrkStruct(); InitTrkText(); InitTrkDraw(); - InitTrkNote(); + InitTrkBlock(); InitTrkSwitchMotor(); InitTrkSignal(); InitTrkControl(); InitTrkSensor(); InitCarDlg(); + InitCmdNote(); memset( message, 0, sizeof message ); @@ -156,7 +159,7 @@ BOOL_T Initialize( void ) void InitCustom( void ) { - char buf[STR_SHORT_SIZE]; + char *buf = malloc(1024); /* Initialize some localized strings */ if (sTurnoutDesignerW == NULL) @@ -171,38 +174,60 @@ void InitCustom( void ) } if (sSourceFilePattern == NULL) { - sprintf(buf, _("%s Files|*.xtc"), Product); + sprintf(buf, _("All %s Files (*.xtc,*.xtce)|*.xtc;*.xtce|" + "%s Trackplan (*.xtc)|*.xtc|" + "%s Extended Trackplan (*.xtce)|*.xtce|" + "All Files (*)|*"), + Product, + Product, + Product ); sSourceFilePattern = strdup(buf); } + if (sSaveFilePattern == NULL) + { + sprintf(buf, _("%s Trackplan (*.xtc)|*.xtc|" + "%s Extended Trackplan (*.xtce)|*.xtce|" + "All Files (*)|*"), + Product, + Product ); + sSaveFilePattern = strdup(buf); + } + if (sImageFilePattern == NULL) + { + sprintf(buf,_("All Files (*)|*")); + sImageFilePattern = strdup(buf); + } if (sImportFilePattern == NULL) { - sprintf(buf, _("%s Import Files|*.%sti"), Product, KEYCODE); + sprintf(buf, _("%s Import Files (*.xti)|*.xti"), Product ); sImportFilePattern = strdup(buf); } if (sDXFFilePattern == NULL) { - sDXFFilePattern = strdup(_("Data Exchange Format Files|*.dxf")); + sDXFFilePattern = strdup(_("Data Exchange Format Files (*.dxf)|*.dxf")); } if (sRecordFilePattern == NULL) { - sprintf(buf, _("%s Record Files|*.%str"), Product, KEYCODE); + sprintf(buf, _("%s Record Files (*.xtr)|*.xtr"), Product); sRecordFilePattern = strdup(buf); } if (sNoteFilePattern == NULL) { - sprintf(buf, _("%s Note Files|*.not"), Product); + sprintf(buf, _("%s Note Files (*.not)|*.not"), Product); sNoteFilePattern = strdup(buf); } if (sLogFilePattern == NULL) { - sprintf(buf, _("%s Log Files|*.log"), Product); + sprintf(buf, _("%s Log Files (*.log)|*.log"), Product); sLogFilePattern = strdup(buf); } if (sPartsListFilePattern == NULL) { - sprintf(buf, _("%s PartsList Files|*.txt"), Product); + sprintf(buf, _("%s PartsList Files (*.txt)|*.txt"), Product); sPartsListFilePattern = strdup(buf); } + + free(buf); } |