diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:56:15 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:56:15 +0100 |
commit | 1542c122b3672fe83e027411ad2445772e2d0ed3 (patch) | |
tree | e535bc621bd7ffa9d5ce89e0d495df5d1c4ab6fd /app/bin/smalldlg.c | |
parent | 773810e6583142d7d15263e6481c42aebed6d7f1 (diff) | |
parent | d1a8285f818eb7e5c3d6a05709ea21a808490b8c (diff) |
Update upstream source from tag 'upstream/5.1.0'
Update to upstream version '5.1.0'
with Debian dir 93ca74b8b4602fce4c9c7740e0cfdde25f086673
Diffstat (limited to 'app/bin/smalldlg.c')
-rw-r--r-- | app/bin/smalldlg.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/app/bin/smalldlg.c b/app/bin/smalldlg.c index e4213a5..7828912 100644 --- a/app/bin/smalldlg.c +++ b/app/bin/smalldlg.c @@ -1,7 +1,5 @@ /** \file smalldlg.c * Several simple and smaller dialogs. - * - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/smalldlg.c,v 1.6 2009-09-21 18:24:33 m_fischer Exp $ */ /* XTrkCad - Model Railroad CAD @@ -38,23 +36,22 @@ #ifdef WINDOWS #include <io.h> #include <windows.h> -#if _MSC_VER >1300 - #define strdup _strdup -#endif #else #include <sys/stat.h> #endif -#include "wlib.h" #include "common.h" +#include "custom.h" #include "draw.h" +#include "fileio.h" +#include "i18n.h" #include "misc.h" -#include "custom.h" +#include "paths.h" #include "param.h" - #include "smalldlg.h" -#include "i18n.h" +#include "wlib.h" +extern char *sTipF; wWin_p aboutW; static wWin_p tipW; /**< window handle for tip dialog */ @@ -86,13 +83,14 @@ static void CreateTipW( void ) { FILE * tipF; char buff[4096]; + char *filename; char * cp; tipW = ParamCreateDialog( &tipPG, MakeWindowTitle(_("Tip of the Day")), _("Ok"), (paramActionOkProc)wHide, NULL, FALSE, NULL, F_CENTER, NULL ); /* open the tip file */ - sprintf( buff, "%s%s%s.tip", libDir, FILE_SEP_CHAR, sProdNameLower ); - tipF = fopen( buff, "r" ); + MakeFullpath(&filename, libDir, sTipF, NULL); + tipF = fopen( filename, "r" ); /* if tip file could not be opened, the only tip is an error message for the situation */ if (tipF == NULL) { @@ -146,6 +144,7 @@ static void CreateTipW( void ) tips(tips_da.cnt-1) = strdup( buff ); } } + free(filename); } /** @@ -221,11 +220,12 @@ void CreateAboutW( void *ptr ) aboutW = ParamCreateDialog( &aboutPG, MakeWindowTitle(_("About")), _("Ok"), (paramActionOkProc)wHide, NULL, FALSE, NULL, F_TOP|F_CENTER, NULL ); ParamLoadMessage( &aboutPG, I_ABOUTVERSION, sAboutProd ); wTextAppend( COPYRIGHT_T, DESCRIPTION ); - wTextAppend( COPYRIGHT_T, "\n\nXTrackCAD is Copyright 2003 by Sillub Technology and 2007 by Martin Fischer and Bob Blackwell." ); - wTextAppend( COPYRIGHT_T, "\n\nIcons by: Tango Desktop Project (http://tango.freedesktop.org)"); - wTextAppend( COPYRIGHT_T, "\n\nContributions by: Robert Heller, Mikko Nissinen, Timothy M. Shead, Daniel Luis Spagnol" ); - wTextAppend( COPYRIGHT_T, "\n\nParameter Files by: Ralph Boyd, Dwayne Ward" ); - wTextAppend( COPYRIGHT_T, "\n\nuthash Copyright notice:" ); + wTextAppend( COPYRIGHT_T, "\n\nXTrackCAD is Copyright 2003 by Sillub Technology and 2017 by Bob Blackwell, Martin Fischer and Adam Richards." ); + wTextAppend( COPYRIGHT_T, "\nIcons by: Tango Desktop Project (http://tango.freedesktop.org)"); + wTextAppend( COPYRIGHT_T, "\nContributions by: Robert Heller, Mikko Nissinen, Timothy M. Shead, Daniel Luis Spagnol" ); + wTextAppend( COPYRIGHT_T, "\nParameter Files by: Ralph Boyd, Dwayne Ward" ); + wTextAppend( COPYRIGHT_T, "\nCornu Algorithm and Implementation by: Raph Levien"); + wTextAppend( COPYRIGHT_T, "\nuthash Copyright notice:" ); wTextAppend( COPYRIGHT_T, "\nCopyright (c) 2005-2015, Troy D. Hanson http://troydhanson.github.com/uthash/"); wTextAppend( COPYRIGHT_T, "\nAll rights reserved."); } |