Compare commits

...

14 Commits

Author SHA1 Message Date
Tomasz Sowa d54ebd1ae7 changed: names of locale files (in creating the setup program)
git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@452 e52654a7-88a9-db11-a3e9-0013d4bc506e
2014-05-20 15:35:39 +00:00
Tomasz Sowa af26634fb7 changed: some paths in the setup config file (for locale files)
git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@440 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-06-03 11:29:40 +00:00
Tomasz Sowa 89741a880e changed: the version of the program: 0.9.3 now
git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@354 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-06-04 00:12:11 +00:00
Tomasz Sowa 14f987012d changed: the way how the mouse selection works when you have clicked a button (sin/cos/..)
now if there is no selection and the last character is an operator: + - / * % ^ (
         then the text is append at the end (instead of looking for beginning of the expression)
         this seems to be more comfortable


git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@353 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-06-03 23:24:32 +00:00
Tomasz Sowa c4f316d7d3 changed: now ttcalc only once a three days checks for an update
fixed:   option: "parameters separated by" was not correctly read from the config file
added:   the setup program now addes language.setup key to the ttcalc.ini
         (it creates ttcalc.ini if it doesn't exist)
         so when ttcalc starts for the first time it can choose the same language



git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@352 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-06-03 22:41:55 +00:00
Tomasz Sowa 547f01bf34 fixed: ttcalc didn't correctly delete variables/functions from its config file
so when you restarted the program you still had the deleted variables/functions



git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@347 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-05-28 23:53:03 +00:00
Tomasz Sowa c4bcecc029 updated: Chinese translation
changed: release script now creates *.zip files instead of *.tar.gz


git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@346 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-05-28 22:43:35 +00:00
Tomasz Sowa af2f173a82 changed: the way how buttons on display tab work
suppose we have "123+34+56" in the first edit, then select
         (bo mouse or a keyboard) "123+34" similar as you would like
         to copy them to the clipboard, then press a button let we say
         "sin" - the result is: "sin(123+34)+56"



git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@343 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-03-07 20:36:25 +00:00
Tomasz Sowa 6c0a4b110e added: ttcalc can be start with option: createconfig, e.g.
./ttcalc createconfig
       it creates a config file in the current directory and exists
added: on variables and functions tab the carret is set at the end
       of a variable/function value (when edit)
changed: column 'parameters' on functions tab has been enlarged
changed: locales: "param." to "parameters" (english and german)



git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@341 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-02-08 16:15:35 +00:00
Tomasz Sowa 8e9a459c9c added makerelease.sh
a shell script for making release packages



git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@339 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-01-30 21:07:50 +00:00
Tomasz Sowa 844f79b793 added: on display tab: an option how many digits should be grouped
git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@337 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-01-30 17:30:10 +00:00
Tomasz Sowa 21372faa56 changed: translation: "pad" to "calcpad"
git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@336 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-01-30 15:22:27 +00:00
Tomasz Sowa ac8574e9da changed Changelog and other docs
git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@335 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-01-30 15:01:57 +00:00
Tomasz Sowa 7c62d9eae0 added: a new language: German
translation made by: Moritz Beleites <morbel at gmx dot net>


git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@334 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-01-30 15:00:07 +00:00
31 changed files with 1464 additions and 489 deletions

View File

@ -1,3 +1,18 @@
Version 0.9.3 (2011.06.04):
* added: German translation made by
Moritz Beleites <morbel at gmx.net>
* added: on display tab: an option how many digits should be grouped
* changed: the way how buttons on display tab work
suppose we have "123+34+56" in the first edit, then select
(by mouse or a keyboard) "123+34" similar as you would like
to copy them to the clipboard, then press a button let we say
"sin" - the result is: "sin(123+34)+56"
* updated: Chinese translation
* fixed: ttcalc didn't correctly delete variables/functions from its config file
so when you restarted the program you still had the deleted variables/functions
* fixed: option: "parameters separated by" was not correctly read from the config file
Version 0.9.2 (2010.09.24):
* added: Italian translation made by
Damiano Monaco <dmonax at gmail.com>

View File

@ -1,4 +1,4 @@
Copyright (c) 2006-2010, Tomasz Sowa
Copyright (c) 2006-2011, Tomasz Sowa
All rights reserved.
Redistribution and use in source and binary forms, with or without

2
README
View File

@ -18,7 +18,7 @@ Author: Tomasz Sowa
Contact: t.sowa@ttmath.org
Licence: BSD (open source)
Interface: English, Polish, Spanish, Danish, Chinese, Russian,
Swedish, Italian
Swedish, Italian, German
Project page: http://ttcalc.sourceforge.net/
Bignum library: TTMath http://www.ttmath.org/
Operating systems: Microsoft Windows 9x/Me/NT/2000/XP/Vista/7

View File

@ -44,7 +44,7 @@ display values with the base (radix) from two to sixteen.
<tr><td>Author:</td><td>Tomasz Sowa</td></tr>
<tr><td>Contact:</td><td>t.sowa@ttmath.org</td></tr>
<tr><td>Licence:</td><td>BSD (open source)</td></tr>
<tr><td>Interface:</td><td>English, Polish, Spanish, Danish, Chinese, Russian, Swedish, Italian</td></tr>
<tr><td>Interface:</td><td>English, Polish, Spanish, Danish, Chinese, Russian, Swedish, Italian, German</td></tr>
<tr><td>Project page:</td><td><a href="http://ttcalc.sourceforge.net/">http://ttcalc.sourceforge.net/</a></td></tr>
<tr><td>Bignum library:</td><td>TTMath <a href="http://ttmath.org/">http://www.ttmath.org/</a></td></tr>
<tr><td>Operating systems:</td><td>Microsoft Windows 9x/Me/NT/2000/XP/Vista/7</td></tr>

View File

@ -62,13 +62,13 @@ sgn(5)=1</dd>
<dt>max(x1; x2; ...)</dt>
<dd>This functions takes any number of arguments. It returns the max value of them. If there aren't arguments
<dd>This functions takes any number of arguments. It returns the max value of them. If there are not any arguments
the function returns the max value which can be held in this precision.<br>
max(2;5;8;3)=8<br>
max()=6.97846825730330952352039893e+646457021 (assuming the small precision is selected)</dd>
<dt>min(x1; x2; ...)</dt>
<dd>This functions takes any number of arguments. It returns the min value of them. If there aren't arguments
<dd>This functions takes any number of arguments. It returns the min value of them. If there are not any arguments
the function returns the min value which can be held in this precision.<br>
min(45;-23;18;19)=-23<br>
min()=-6.97846825730330952352039893e+646457021 (assuming the small precision is selected)

268
makerelease.sh Normal file
View File

@ -0,0 +1,268 @@
#!/bin/sh
a=""
b=""
c=""
p=""
d=""
# reading until not empty
while [ -z $a ]
do
echo -n "Major: " ; read a
done
while [ -z $b ]
do
echo -n "Minor: " ; read b;
done
while [ -z $c ]
do
echo -n "Revision: " ; read c;
done
while [ -z $p ]
do
echo -n "Prerelease? (y/n): " ; read p;
done
while [ -z $d ]
do
echo -n "Add date? (y/n): " ; read d;
done
dir=$a.$b.$c
datestr=""
if [ $p = "y" -o $p = "Y" ]
then
dir=$dir.prerelease
fi
if [ $d = "y" -o $d = "Y" ]
then
datestr="("`/bin/date "+%G.%m.%d"`")";
dir=$dir.$datestr
fi
if [ -d $dir ]
then
echo "Directory $dir exists! (exiting)";
exit 1;
fi
mkdir $dir
echo "------------------------------------------------------"
echo "compiling normal version"
echo "------------------------------------------------------"
cd src
make clean
make
echo "------------------------------------------------------"
echo "creating help"
echo "------------------------------------------------------"
make help
echo "------------------------------------------------------"
echo "creating install program (setup)"
echo "------------------------------------------------------"
make setup
cd ../$dir
echo "------------------------------------------------------"
echo "making binary package"
echo "------------------------------------------------------"
n="ttcalc-$a.$b.$c";
if [ $p = "y" -o $p = "Y" ]
then
n="$n.prerelease"
fi
if [ $d = "y" -o $d = "Y" ]
then
ntar="$n-bin.$datestr.zip";
else
ntar="$n-bin.zip";
fi
mkdir $n
cp ../help/ttcalc.chm $n
cp ../src/ttcalc.exe $n
cp ../COPYRIGHT $n
cp ../README $n
cp ../CHANGELOG $n
#tar -zcf $ntar $n
zip -r -9 $ntar $n
rm -r $n
echo "------------------------------------------------------"
echo "copying the setup program"
echo "------------------------------------------------------"
n="ttcalc-$a.$b.$c"
if [ $p = "y" -o $p = "Y" ]
then
n="$n.prerelease"
fi
if [ $d = "y" -o $d = "Y" ]
then
cp ../setup/ttcalc-setup.exe ./$n-setup.$datestr.exe
else
cp ../setup/ttcalc-setup.exe ./$n-setup.exe
fi
echo "------------------------------------------------------"
echo "compiling portable version"
echo "------------------------------------------------------"
# preserve ttcalc.chm because would be erased by 'make clean'
cp ../help/ttcalc.chm ./
cd ../src/
make clean
make -f Makefileportable
cd ../$dir
echo "------------------------------------------------------"
echo "making portable binary package"
echo "------------------------------------------------------"
n="ttcalc-portable-$a.$b.$c";
if [ $p = "y" -o $p = "Y" ]
then
n="$n.prerelease"
fi
if [ $d = "y" -o $d = "Y" ]
then
ntar="$n-bin.$datestr.zip";
else
ntar="$n-bin.zip";
fi
mkdir $n
cp ../src/ttcalcp.exe $n
$n/ttcalcp.exe createconfig
mv ttcalc.ini $n
mv ttcalc.chm $n
cp ../COPYRIGHT $n
cp ../README $n
cp ../CHANGELOG $n
#tar -zcf $ntar $n
zip -r -9 $ntar $n
rm -r $n
echo "------------------------------------------------------"
echo "creating source package"
echo "------------------------------------------------------"
n="ttcalc-$a.$b.$c";
if [ $p = "y" -o $p = "Y" ]
then
n="$n.prerelease"
fi
if [ $d = "y" -o $d = "Y" ]
then
ntar="$n-src.$datestr.zip";
else
ntar="$n-src.zip";
fi
mkdir $n
mkdir $n/ttmath
mkdir $n/ttcalc
mkdir $n/ttmath/ttmath
mkdir $n/ttmath/samples
mkdir $n/ttcalc/help
mkdir $n/ttcalc/res
mkdir $n/ttcalc/setup
mkdir $n/ttcalc/src
cp ../../ttmath/ttmath/* $n/ttmath/ttmath
cp ../../ttmath/samples/* $n/ttmath/samples
cp ../../ttmath/COPYRIGHT $n/ttmath
cp ../../ttmath/README $n/ttmath
cp ../../ttmath/CHANGELOG $n/ttmath
cd ../src
make clean
cd ../$dir
cp ../help/* $n/ttcalc/help
cp ../res/* $n/ttcalc/res
cp ../setup/* $n/ttcalc/setup
cp ../src/* $n/ttcalc/src
cp ../COPYRIGHT $n/ttcalc
cp ../README $n/ttcalc
cp ../CHANGELOG $n/ttcalc
#tar -zcf $ntar $n
zip -r -9 $ntar $n
rm -r $n
echo "------------------------------------------------------"
echo "calculating md5 hashes"
echo "------------------------------------------------------"
md5sum * > note.txt.md5
echo "MD5 SUMS" > note.txt
echo "--------" >> note.txt
cat note.txt.md5 >> note.txt
echo "" >> note.txt
echo "" >> note.txt
echo "CHANGELOG" >> note.txt
echo "---------" >> note.txt
cat ../CHANGELOG >> note.txt
rm note.txt.md5
unix2dos note.txt
echo "done"
exit 0

View File

@ -1,4 +1,4 @@
Copyright (c) 2006-2010, Tomasz Sowa
Copyright (c) 2006-2011, Tomasz Sowa
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -1,10 +1,9 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
; innosetup script
[Setup]
AppName=TTCalc
AppVerName=TTCalc 0.9.2
AppVersion=0.9.2
AppVerName=TTCalc 0.9.3
AppVersion=0.9.3
AppPublisher=Tomasz Sowa
AppPublisherURL=http://ttcalc.sourceforge.net
AppSupportURL=http://ttcalc.sourceforge.net
@ -12,7 +11,7 @@ AppUpdatesURL=http://ttcalc.sourceforge.net
DefaultDirName={pf}\TTCalc
DefaultGroupName=TTCalc
AllowNoIcons=yes
; special COPYRIGHT version (without a new line characters in the clause -- it is better displayed in the setup window)
; special COPYRIGHT version (without new line characters in the clause -- it is better displayed in the setup window)
LicenseFile=COPYRIGHT
OutputDir=..\setup
OutputBaseFilename=ttcalc-setup
@ -24,13 +23,14 @@ UsePreviousAppDir=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "chinese"; MessagesFile: "compiler:Languages\ChineseSimp-12-5.1.11.isl"
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "chinese"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "swedish"; MessagesFile: "compiler:Languages\Swedish.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
[InstallDelete]
; prior to 0.8.3 we were using mingwm10.dll (now it is not needed and will be deleted if exists)
@ -41,16 +41,22 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
[Files]
Source: "..\src\ttcalc.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\help\ttcalc.chm"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\COPYRIGHT"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\CHANGELOG"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\README"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\help\ttcalc.chm"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\COPYRIGHT"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\CHANGELOG"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\README"; DestDir: "{app}"; Flags: ignoreversion
; now we do not use *.ini file in the installer
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Dirs]
Name: "{userappdata}/TTCalc" ; Flags: uninsneveruninstall
[INI]
Filename: "{userappdata}/TTCalc/ttcalc.ini"; Section: "GLOBAL"; Key: "language.setup"; String: "{language}"
[Icons]
Name: "{group}\TTCalc"; Filename: "{app}\ttcalc.exe"; WorkingDir: "{app}"
Name: "{group}\Help"; Filename: "{app}\ttcalc.chm"; WorkingDir: "{app}"
Name: "{group}\Help"; Filename: "{app}\ttcalc.chm"; WorkingDir: "{app}"
Name: "{group}\{cm:UninstallProgram,TTCalc}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\TTCalc"; Filename: "{app}\ttcalc.exe"; WorkingDir: "{app}"; Tasks: desktopicon

View File

@ -1,6 +1,9 @@
include Makefile.o.dep
include Makefile.help.dep
CC = g++
#CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../ttmath -DTTCALC_CONVERT
CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../ttmath
CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../ttmath -DTTMATH_DONT_USE_WCHAR
name = ttcalc.exe
# the name of the help is also set in the html help workshop project file
@ -14,10 +17,14 @@ setupname = ttcalc-setup.exe
all: ttcalc
include Makefile.dep
%.o: %.cpp
$(CC) -c $(CFLAGS) $<
ttcalc: $(o)
ttcalc: $(name)
$(name): $(o)
$(CC) -o $(name) $(CFLAGS) $(o) -lcomctl32 -lwininet
@ -26,18 +33,34 @@ resource.o: resource.rc
windres resource.rc resource.o
help: $(helpdep)
help: ../help/$(helpname)
../help/$(helpname): $(helpsrc)
Makefile.help.sh
setup: ../setup/$(setupname)
setup: $(setupdep)
../setup/$(setupname): $(name) ../help/$(helpname) ../setup/innosetup.iss ../setup/COPYRIGHT ../COPYRIGHT ../CHANGELOG ../README
iscc ../setup/innosetup.iss
depend:
makedepend -Y. -I../../ttmath -f- *.cpp | sed "s/[\\]/\//g" > Makefile.cpp.dep
echo -n "o = resource.o " > Makefile.o.dep
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
echo -n "helpsrc = " > Makefile.help.dep
ls -1 ../help/*.html ../help/*.css ../help/*.hhp ../help/*.hhk ../help/*.hhc | xargs -I foo echo -n foo " " >> Makefile.help.dep
clean:
rm -f *.o
rm -f $(name)
rm -f ttcalcp.exe
rm -f ../help/$(helpname)
rm -f ../setup/$(setupname)
include Makefile.cpp.dep

176
src/Makefile.cpp.dep Normal file
View File

@ -0,0 +1,176 @@
# DO NOT DELETE
calculation.o: compileconfig.h parsermanager.h resource.h programresources.h
calculation.o: iniparser.h languages.h bigtypes.h
calculation.o: ../../ttmath/ttmath/ttmath.h ../../ttmath/ttmath/ttmathbig.h
calculation.o: ../../ttmath/ttmath/ttmathint.h
calculation.o: ../../ttmath/ttmath/ttmathuint.h
calculation.o: ../../ttmath/ttmath/ttmathtypes.h
calculation.o: ../../ttmath/ttmath/ttmathmisc.h
calculation.o: ../../ttmath/ttmath/ttmathuint_x86.h
calculation.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
calculation.o: ../../ttmath/ttmath/ttmathuint_noasm.h
calculation.o: ../../ttmath/ttmath/ttmaththreads.h
calculation.o: ../../ttmath/ttmath/ttmathobjects.h
calculation.o: ../../ttmath/ttmath/ttmathparser.h
calculation.o: ../../ttmath/ttmath/ttmath.h threadcontroller.h
calculation.o: ../../ttmath/ttmath/ttmathobjects.h stopcalculating.h
calculation.o: ../../ttmath/ttmath/ttmathtypes.h convert.h tabs.h messages.h
convert.o: convert.h compileconfig.h bigtypes.h ../../ttmath/ttmath/ttmath.h
convert.o: ../../ttmath/ttmath/ttmathbig.h ../../ttmath/ttmath/ttmathint.h
convert.o: ../../ttmath/ttmath/ttmathuint.h ../../ttmath/ttmath/ttmathtypes.h
convert.o: ../../ttmath/ttmath/ttmathmisc.h
convert.o: ../../ttmath/ttmath/ttmathuint_x86.h
convert.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
convert.o: ../../ttmath/ttmath/ttmathuint_noasm.h
convert.o: ../../ttmath/ttmath/ttmaththreads.h
convert.o: ../../ttmath/ttmath/ttmathobjects.h
convert.o: ../../ttmath/ttmath/ttmathparser.h ../../ttmath/ttmath/ttmath.h
download.o: compileconfig.h download.h
functions.o: compileconfig.h tabs.h resource.h messages.h
functions.o: ../../ttmath/ttmath/ttmathtypes.h programresources.h iniparser.h
functions.o: languages.h bigtypes.h ../../ttmath/ttmath/ttmath.h
functions.o: ../../ttmath/ttmath/ttmathbig.h ../../ttmath/ttmath/ttmathint.h
functions.o: ../../ttmath/ttmath/ttmathuint.h
functions.o: ../../ttmath/ttmath/ttmathtypes.h
functions.o: ../../ttmath/ttmath/ttmathmisc.h
functions.o: ../../ttmath/ttmath/ttmathuint_x86.h
functions.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
functions.o: ../../ttmath/ttmath/ttmathuint_noasm.h
functions.o: ../../ttmath/ttmath/ttmaththreads.h
functions.o: ../../ttmath/ttmath/ttmathobjects.h
functions.o: ../../ttmath/ttmath/ttmathparser.h ../../ttmath/ttmath/ttmath.h
functions.o: threadcontroller.h ../../ttmath/ttmath/ttmathobjects.h
functions.o: stopcalculating.h convert.h
iniparser.o: compileconfig.h iniparser.h
languages.o: compileconfig.h languages.h bigtypes.h
languages.o: ../../ttmath/ttmath/ttmath.h ../../ttmath/ttmath/ttmathbig.h
languages.o: ../../ttmath/ttmath/ttmathint.h ../../ttmath/ttmath/ttmathuint.h
languages.o: ../../ttmath/ttmath/ttmathtypes.h
languages.o: ../../ttmath/ttmath/ttmathmisc.h
languages.o: ../../ttmath/ttmath/ttmathuint_x86.h
languages.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
languages.o: ../../ttmath/ttmath/ttmathuint_noasm.h
languages.o: ../../ttmath/ttmath/ttmaththreads.h
languages.o: ../../ttmath/ttmath/ttmathobjects.h
languages.o: ../../ttmath/ttmath/ttmathparser.h ../../ttmath/ttmath/ttmath.h
mainwindow.o: compileconfig.h winmain.h programresources.h iniparser.h
mainwindow.o: languages.h bigtypes.h ../../ttmath/ttmath/ttmath.h
mainwindow.o: ../../ttmath/ttmath/ttmathbig.h ../../ttmath/ttmath/ttmathint.h
mainwindow.o: ../../ttmath/ttmath/ttmathuint.h
mainwindow.o: ../../ttmath/ttmath/ttmathtypes.h
mainwindow.o: ../../ttmath/ttmath/ttmathmisc.h
mainwindow.o: ../../ttmath/ttmath/ttmathuint_x86.h
mainwindow.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
mainwindow.o: ../../ttmath/ttmath/ttmathuint_noasm.h
mainwindow.o: ../../ttmath/ttmath/ttmaththreads.h
mainwindow.o: ../../ttmath/ttmath/ttmathobjects.h
mainwindow.o: ../../ttmath/ttmath/ttmathparser.h ../../ttmath/ttmath/ttmath.h
mainwindow.o: threadcontroller.h ../../ttmath/ttmath/ttmathobjects.h
mainwindow.o: stopcalculating.h ../../ttmath/ttmath/ttmathtypes.h convert.h
mainwindow.o: resource.h messages.h tabs.h pad.h update.h download.h misc.h
pad.o: ../../ttmath/ttmath/ttmath.h ../../ttmath/ttmath/ttmathbig.h
pad.o: ../../ttmath/ttmath/ttmathint.h ../../ttmath/ttmath/ttmathuint.h
pad.o: ../../ttmath/ttmath/ttmathtypes.h ../../ttmath/ttmath/ttmathmisc.h
pad.o: ../../ttmath/ttmath/ttmathuint_x86.h
pad.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
pad.o: ../../ttmath/ttmath/ttmathuint_noasm.h
pad.o: ../../ttmath/ttmath/ttmaththreads.h
pad.o: ../../ttmath/ttmath/ttmathobjects.h ../../ttmath/ttmath/ttmathparser.h
pad.o: ../../ttmath/ttmath/ttmath.h programresources.h compileconfig.h
pad.o: iniparser.h languages.h bigtypes.h threadcontroller.h
pad.o: ../../ttmath/ttmath/ttmathobjects.h stopcalculating.h
pad.o: ../../ttmath/ttmath/ttmathtypes.h convert.h resource.h messages.h
pad.o: pad.h
parsermanager.o: compileconfig.h parsermanager.h resource.h
parsermanager.o: programresources.h iniparser.h languages.h bigtypes.h
parsermanager.o: ../../ttmath/ttmath/ttmath.h ../../ttmath/ttmath/ttmathbig.h
parsermanager.o: ../../ttmath/ttmath/ttmathint.h
parsermanager.o: ../../ttmath/ttmath/ttmathuint.h
parsermanager.o: ../../ttmath/ttmath/ttmathtypes.h
parsermanager.o: ../../ttmath/ttmath/ttmathmisc.h
parsermanager.o: ../../ttmath/ttmath/ttmathuint_x86.h
parsermanager.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
parsermanager.o: ../../ttmath/ttmath/ttmathuint_noasm.h
parsermanager.o: ../../ttmath/ttmath/ttmaththreads.h
parsermanager.o: ../../ttmath/ttmath/ttmathobjects.h
parsermanager.o: ../../ttmath/ttmath/ttmathparser.h
parsermanager.o: ../../ttmath/ttmath/ttmath.h threadcontroller.h
parsermanager.o: ../../ttmath/ttmath/ttmathobjects.h stopcalculating.h
parsermanager.o: ../../ttmath/ttmath/ttmathtypes.h convert.h tabs.h
parsermanager.o: messages.h
programresources.o: compileconfig.h programresources.h iniparser.h
programresources.o: languages.h bigtypes.h ../../ttmath/ttmath/ttmath.h
programresources.o: ../../ttmath/ttmath/ttmathbig.h
programresources.o: ../../ttmath/ttmath/ttmathint.h
programresources.o: ../../ttmath/ttmath/ttmathuint.h
programresources.o: ../../ttmath/ttmath/ttmathtypes.h
programresources.o: ../../ttmath/ttmath/ttmathmisc.h
programresources.o: ../../ttmath/ttmath/ttmathuint_x86.h
programresources.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
programresources.o: ../../ttmath/ttmath/ttmathuint_noasm.h
programresources.o: ../../ttmath/ttmath/ttmaththreads.h
programresources.o: ../../ttmath/ttmath/ttmathobjects.h
programresources.o: ../../ttmath/ttmath/ttmathparser.h
programresources.o: ../../ttmath/ttmath/ttmath.h threadcontroller.h
programresources.o: ../../ttmath/ttmath/ttmathobjects.h stopcalculating.h
programresources.o: ../../ttmath/ttmath/ttmathtypes.h convert.h
tabs.o: compileconfig.h tabs.h resource.h messages.h
tabs.o: ../../ttmath/ttmath/ttmathtypes.h programresources.h iniparser.h
tabs.o: languages.h bigtypes.h ../../ttmath/ttmath/ttmath.h
tabs.o: ../../ttmath/ttmath/ttmathbig.h ../../ttmath/ttmath/ttmathint.h
tabs.o: ../../ttmath/ttmath/ttmathuint.h ../../ttmath/ttmath/ttmathtypes.h
tabs.o: ../../ttmath/ttmath/ttmathmisc.h ../../ttmath/ttmath/ttmathuint_x86.h
tabs.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
tabs.o: ../../ttmath/ttmath/ttmathuint_noasm.h
tabs.o: ../../ttmath/ttmath/ttmaththreads.h
tabs.o: ../../ttmath/ttmath/ttmathobjects.h
tabs.o: ../../ttmath/ttmath/ttmathparser.h ../../ttmath/ttmath/ttmath.h
tabs.o: threadcontroller.h ../../ttmath/ttmath/ttmathobjects.h
tabs.o: stopcalculating.h convert.h
threadcontroller.o: threadcontroller.h ../../ttmath/ttmath/ttmathobjects.h
threadcontroller.o: stopcalculating.h compileconfig.h
threadcontroller.o: ../../ttmath/ttmath/ttmathtypes.h
update.o: compileconfig.h update.h download.h programresources.h iniparser.h
update.o: languages.h bigtypes.h ../../ttmath/ttmath/ttmath.h
update.o: ../../ttmath/ttmath/ttmathbig.h ../../ttmath/ttmath/ttmathint.h
update.o: ../../ttmath/ttmath/ttmathuint.h ../../ttmath/ttmath/ttmathtypes.h
update.o: ../../ttmath/ttmath/ttmathmisc.h
update.o: ../../ttmath/ttmath/ttmathuint_x86.h
update.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
update.o: ../../ttmath/ttmath/ttmathuint_noasm.h
update.o: ../../ttmath/ttmath/ttmaththreads.h
update.o: ../../ttmath/ttmath/ttmathobjects.h
update.o: ../../ttmath/ttmath/ttmathparser.h ../../ttmath/ttmath/ttmath.h
update.o: threadcontroller.h ../../ttmath/ttmath/ttmathobjects.h
update.o: stopcalculating.h ../../ttmath/ttmath/ttmathtypes.h convert.h
update.o: messages.h resource.h winmain.h tabs.h pad.h misc.h
variables.o: compileconfig.h tabs.h resource.h messages.h
variables.o: ../../ttmath/ttmath/ttmathtypes.h programresources.h iniparser.h
variables.o: languages.h bigtypes.h ../../ttmath/ttmath/ttmath.h
variables.o: ../../ttmath/ttmath/ttmathbig.h ../../ttmath/ttmath/ttmathint.h
variables.o: ../../ttmath/ttmath/ttmathuint.h
variables.o: ../../ttmath/ttmath/ttmathtypes.h
variables.o: ../../ttmath/ttmath/ttmathmisc.h
variables.o: ../../ttmath/ttmath/ttmathuint_x86.h
variables.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
variables.o: ../../ttmath/ttmath/ttmathuint_noasm.h
variables.o: ../../ttmath/ttmath/ttmaththreads.h
variables.o: ../../ttmath/ttmath/ttmathobjects.h
variables.o: ../../ttmath/ttmath/ttmathparser.h ../../ttmath/ttmath/ttmath.h
variables.o: threadcontroller.h ../../ttmath/ttmath/ttmathobjects.h
variables.o: stopcalculating.h convert.h
winmain.o: compileconfig.h winmain.h programresources.h iniparser.h
winmain.o: languages.h bigtypes.h ../../ttmath/ttmath/ttmath.h
winmain.o: ../../ttmath/ttmath/ttmathbig.h ../../ttmath/ttmath/ttmathint.h
winmain.o: ../../ttmath/ttmath/ttmathuint.h ../../ttmath/ttmath/ttmathtypes.h
winmain.o: ../../ttmath/ttmath/ttmathmisc.h
winmain.o: ../../ttmath/ttmath/ttmathuint_x86.h
winmain.o: ../../ttmath/ttmath/ttmathuint_x86_64.h
winmain.o: ../../ttmath/ttmath/ttmathuint_noasm.h
winmain.o: ../../ttmath/ttmath/ttmaththreads.h
winmain.o: ../../ttmath/ttmath/ttmathobjects.h
winmain.o: ../../ttmath/ttmath/ttmathparser.h ../../ttmath/ttmath/ttmath.h
winmain.o: threadcontroller.h ../../ttmath/ttmath/ttmathobjects.h
winmain.o: stopcalculating.h ../../ttmath/ttmath/ttmathtypes.h convert.h
winmain.o: resource.h messages.h tabs.h pad.h update.h download.h

View File

@ -1,53 +0,0 @@
# add "resource.o" to "o" as well
o = resource.o calculation.o convert.o download.o functions.o iniparser.o languages.o mainwindow.o misc.o pad.o parsermanager.o programresources.o tabs.o threadcontroller.o update.o variables.o winmain.o
calculation.o: calculation.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h
convert.o: convert.cpp convert.h compileconfig.h bigtypes.h
download.o: download.cpp compileconfig.h download.h
functions.o: functions.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
iniparser.o: iniparser.cpp compileconfig.h iniparser.h
languages.o: languages.cpp compileconfig.h languages.h bigtypes.h
mainwindow.o: mainwindow.cpp compileconfig.h winmain.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h tabs.h pad.h update.h download.h misc.h
misc.o: misc.cpp
pad.o: pad.cpp programresources.h compileconfig.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h pad.h
parsermanager.o: parsermanager.cpp compileconfig.h parsermanager.h resource.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h tabs.h messages.h
programresources.o: programresources.cpp compileconfig.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
tabs.o: tabs.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
threadcontroller.o: threadcontroller.cpp threadcontroller.h stopcalculating.h compileconfig.h
update.o: update.cpp compileconfig.h update.h download.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h messages.h resource.h winmain.h tabs.h pad.h misc.h
variables.o: variables.cpp compileconfig.h tabs.h resource.h messages.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h
winmain.o: winmain.cpp compileconfig.h winmain.h programresources.h iniparser.h languages.h bigtypes.h threadcontroller.h stopcalculating.h convert.h resource.h messages.h tabs.h pad.h update.h download.h
.SUFFIXES: .cpp .o
.cpp.o:
$(CC) -c $(CFLAGS) $<
helpdep = ../help/accuracy.html \
../help/arithmetic_functions.html \
../help/bitwise_functions.html \
../help/conversions_deg_rad_grad.html \
../help/help.hhp \
../help/hyperbolic_functions.html \
../help/index.hhk \
../help/index.html \
../help/inverse_hyperbolic_functions.html \
../help/inverse_trigonometric_functions.html \
../help/logarithm_exponential.html \
../help/logical_functions.html \
../help/operators_priority.html \
../help/other_functions.html \
../help/rounding_functions.html \
../help/styles.css \
../help/tips.html \
../help/toc.hhc \
../help/trigonometric_functions.html \
../help/userfunctions.html \
../help/values_and_std_operators.html
setupdep = ttcalc help ../setup/innosetup.iss ../setup/COPYRIGHT ../COPYRIGHT ../CHANGELOG ../README

1
src/Makefile.help.dep Normal file
View File

@ -0,0 +1 @@
helpsrc = ../help/accuracy.html ../help/arithmetic_functions.html ../help/bitwise_functions.html ../help/conversions_deg_rad_grad.html ../help/help.hhp ../help/hyperbolic_functions.html ../help/index.hhk ../help/index.html ../help/inverse_hyperbolic_functions.html ../help/inverse_trigonometric_functions.html ../help/logarithm_exponential.html ../help/logical_functions.html ../help/operators_priority.html ../help/other_functions.html ../help/rounding_functions.html ../help/styles.css ../help/tips.html ../help/toc.hhc ../help/trigonometric_functions.html ../help/userfunctions.html ../help/values_and_std_operators.html

1
src/Makefile.o.dep Normal file
View File

@ -0,0 +1 @@
o = resource.o calculation.o convert.o download.o functions.o iniparser.o languages.o mainwindow.o misc.o pad.o parsermanager.o programresources.o tabs.o threadcontroller.o update.o variables.o winmain.o

View File

@ -1,21 +1,31 @@
include Makefile.o.dep
include Makefile.help.dep
CC = g++
CFLAGS = -Wall -pedantic -s -Os -fno-default-inline -mwindows -I../../ttmath -DTTCALC_PORTABLE
CFLAGS = -Wall -pedantic -s -Os -fno-default-inline -mwindows -I../../ttmath -DTTCALC_PORTABLE -DTTMATH_DONT_USE_WCHAR
name = ttcalcp.exe
compressor = upx
all: ttcalc
include Makefile.dep
ttcalc: $(o)
%.o: %.cpp
$(CC) -c $(CFLAGS) $<
ttcalc: $(name)
$(name): $(o)
$(CC) -o $(name) $(CFLAGS) $(o) -lcomctl32 -lwininet
$(compressor) -7 $(name)
resource.o: resource.rc
windres -DTTCALC_PORTABLE resource.rc resource.o
clean:
rm -f *.o
rm -f $(name)
rm -f ../help/$(helpname)
include Makefile.cpp.dep

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2010, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -55,7 +55,7 @@
*/
#define TTCALC_MAJOR_VER 0
#define TTCALC_MINOR_VER 9
#define TTCALC_REVISION_VER 2
#define TTCALC_REVISION_VER 3
#define TTCALC_PRERELEASE_VER 0

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2009, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -85,9 +85,14 @@ int i;
SendDlgItemMessage(hWnd,IDC_COMBO_FUNCTION_PARAM,CB_SETCURSEL,parameters,0);
if( adding )
{
SetFocus(GetDlgItem(hWnd,IDC_EDIT_FUNCTION_NAME));
}
else
{
SetFocus(GetDlgItem(hWnd,IDC_EDIT_FUNCTION_VALUE));
SendDlgItemMessage(hWnd, IDC_EDIT_FUNCTION_VALUE, EM_SETSEL, value.size(), value.size());
}
return false;
@ -232,6 +237,8 @@ BOOL WmTabCommand_AddFunction(HWND, UINT message, WPARAM wParam, LPARAM lParam)
{
int id = AddNewItemToFunctionList(list, name, value, parameters);
Variables::SelectOnlyOneItem(list,id);
GetPrgRes()->ReadVariablesFunctionsFromFile();
GetPrgRes()->SaveToFile();
}
}
@ -297,7 +304,11 @@ adding = false;
if( code != ttmath::err_ok )
ShowError(list, code);
else
{
ChangeItemInFunctionList(list, id, old_name, name, value, parameters);
GetPrgRes()->ReadVariablesFunctionsFromFile();
GetPrgRes()->SaveToFile();
}
}
while( code != ttmath::err_ok );
@ -330,6 +341,7 @@ int items = ListView_GetSelectedCount(list);
char * buffer = new char[buffer_size];
bool all_deleted = true;
GetPrgRes()->ReadVariablesFunctionsFromFile();
GetPrgRes()->GetThreadController()->StopCalculating();
for( id = ListView_GetItemCount(list)-1 ; id!=-1 ; --id )
@ -348,6 +360,7 @@ int items = ListView_GetSelectedCount(list);
GetPrgRes()->GetThreadController()->StartCalculating();
GetPrgRes()->SaveToFile();
delete [] buffer;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2010, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -37,9 +37,39 @@
#include "compileconfig.h"
#include "languages.h"
#include <string.h>
void Languages::SelectCurrentLanguage(const std::string & lang)
{
// those names should be the same as in [Languages] section in innosetup.iss file
const char * langtab[] = {
"english",
"polish",
"spanish",
"danish",
"chinese",
"russian",
"swedish",
"italian",
"german" };
current_country = en; // default is english
size_t len = sizeof(langtab) / sizeof(const char*);
size_t i;
for(i=0 ; i<len ; ++i)
{
if( strcmp(lang.c_str(), langtab[i]) == 0 )
{
SetCurrentLanguage((Languages::Country)i);
break;
}
}
}
const char * Languages::ErrorMessage(Country country, ttmath::ErrorCode code)
{
@ -220,7 +250,7 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_nothing_has_read,"");
InsertErrorPair(ttmath::err_unknown_character,"δ֪×Ö·û");
InsertErrorPair(ttmath::err_unexpected_final_bracket,"ÒâÍâ¶àÓàµÄÀ¨»¡");
InsertErrorPair(ttmath::err_stack_not_clear,"δ֪×Ö·ûûÓÐÇå¿Õ");
InsertErrorPair(ttmath::err_stack_not_clear,"堆栈没有清空");
InsertErrorPair(ttmath::err_unknown_variable,"δ֪±äÁ¿");
InsertErrorPair(ttmath::err_division_by_zero,"³ýÊý²»ÄÜΪÁã");
InsertErrorPair(ttmath::err_interrupt,"¼ÆËã±»ÖжÏ");
@ -336,6 +366,39 @@ void Languages::InitErrorMessagesTab()
InsertErrorPair(ttmath::err_must_be_only_one_value,"Le variabili o le funzioni devono dare come risultato un solo valore");
InsertErrorPair(ttmath::err_still_calculating,"Calcolo...");
InsertErrorPair(ttmath::err_percent_from,"Operatore percentuale non correttamente utilizzato");
/*
german messages relating to ttmath library
*/
error_messages_tab.push_back( std::map<ttmath::ErrorCode, std::string>() );
InsertErrorPair(ttmath::err_ok,"ok");
InsertErrorPair(ttmath::err_nothing_has_read,"");
InsertErrorPair(ttmath::err_unknown_character,"Unbekanntes Zeichen");
InsertErrorPair(ttmath::err_unexpected_final_bracket,"Unerwartete schlie遝nde Klammer");
InsertErrorPair(ttmath::err_stack_not_clear,"Unbekanntes Zeichen ist 黚rig");
InsertErrorPair(ttmath::err_unknown_variable,"Unbekannte Variable");
InsertErrorPair(ttmath::err_division_by_zero,"Division durch Null");
InsertErrorPair(ttmath::err_interrupt,"Berechnung unterbrochen");
InsertErrorPair(ttmath::err_overflow,"躡erlauf");
InsertErrorPair(ttmath::err_unknown_function,"Unbekannte Funktion");
InsertErrorPair(ttmath::err_unknown_operator,"Unbekannter Operator");
InsertErrorPair(ttmath::err_unexpected_semicolon_operator,"Unerwarteter Semikolon-Operator");
InsertErrorPair(ttmath::err_improper_amount_of_arguments,"Falsche Parameteranzahl");
InsertErrorPair(ttmath::err_improper_argument,"Unpassender Parameter");
InsertErrorPair(ttmath::err_unexpected_end,"Unerwartetes Ende");
InsertErrorPair(ttmath::err_internal_error,"Interner Fehler");
InsertErrorPair(ttmath::err_incorrect_name,"Ung黮tiger Name einer Variablen oder Funktion");
InsertErrorPair(ttmath::err_incorrect_value,"Ung黮tiger Wert einer Variablen oder Funktion");
InsertErrorPair(ttmath::err_variable_exists,"Diese Variable existiert bereits");
InsertErrorPair(ttmath::err_variable_loop,"Rekursion zwischen Variablen gefunden");
InsertErrorPair(ttmath::err_functions_loop,"Rekursion zwischen Funktionen gefunden");
InsertErrorPair(ttmath::err_must_be_only_one_value,"Variablen und Funktionen d黵fen nur einen R點kgabewert haben");
InsertErrorPair(ttmath::err_still_calculating,"Berechnung l鋟ft...");
InsertErrorPair(ttmath::err_percent_from,"Falsch angewandter Prozent-Operator");
}
@ -426,7 +489,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(list_variables_header_1,"Name");
InsertGuiPair(list_variables_header_2,"Value");
InsertGuiPair(list_functions_header_1,"Name");
InsertGuiPair(list_functions_header_2,"Param.");
InsertGuiPair(list_functions_header_2,"Parameters");
InsertGuiPair(list_functions_header_3,"Value");
InsertGuiPair(button_add,"Add");
@ -461,11 +524,13 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_rounding, "Rounding");
InsertGuiPair(display_always_scientific,"Always");
InsertGuiPair(display_not_always_scientific,"When the exponent is greater than:");
InsertGuiPair(display_group_scientific, "Print the result as the scientific value");
InsertGuiPair(display_as_scientific, "Print the result as the scientific value");
InsertGuiPair(display_deg_rad_grad, "Trigonometric functions");
InsertGuiPair(display_grouping, "Grouping"); // e.g. 1`000`000
InsertGuiPair(display_grouping_none, "none");
InsertGuiPair(display_grouping_space, "space");
InsertGuiPair(display_grouping_digits, "digit(s)");
InsertGuiPair(display_input_decimal_point, "Input decimal point"); // Decimal point in formula
InsertGuiPair(display_input_decimal_point_item1, " . or ,");
InsertGuiPair(display_output_decimal_point, "Output decimal point"); // Decimal point in result
@ -485,7 +550,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_new_window, "&New window");
InsertGuiPair(menu_view_normal_view, "No&rmal view");
InsertGuiPair(menu_view_compact_view, "C&ompact view");
InsertGuiPair(menu_view_pad, "&Pad");
InsertGuiPair(menu_view_pad, "&Calcpad"); // something like a notepad for calculating
InsertGuiPair(menu_view_always_on_top, "&Always on top");
InsertGuiPair(menu_view_lang_english, "&English");
InsertGuiPair(menu_view_lang_polish, "&Polish");
@ -495,6 +560,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_russian, "&Russian");
InsertGuiPair(menu_view_lang_swedish, "S&wedish");
InsertGuiPair(menu_view_lang_italian, "&Italian");
InsertGuiPair(menu_view_lang_german, "&German");
InsertGuiPair(menu_view_close_program, "&Close");
InsertGuiPair(menu_edit_undo, "&Undo \tCtrl+Z");
InsertGuiPair(menu_edit_cut, "Cu&t \tCtrl+X");
@ -554,9 +620,11 @@ void Languages::InitGuiMessagesTab()
" lars.gafvert@gmail.com\r\n"
"Italian Damiano Monaco\r\n"
" dmonax@gmail.com\r\n"
"German Moritz Beleites\r\n"
" morbel@gmx.net\r\n"
);
InsertGuiPair(about_text_portable_version, " portable version");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.04\r\n");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.07\r\n");
InsertGuiPair(about_box_title, "About");
InsertGuiPair(about_box_button_close, "Close");
InsertGuiPair(unknown_error, "An unknown error has occurred");
@ -566,7 +634,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_button_next, "Next");
InsertGuiPair(update_button_finish, "Finish");
InsertGuiPair(update_button_cancel, "Cancel");
InsertGuiPair(update_check_at_startup, "Always check for the update on startup");
InsertGuiPair(update_check_at_startup, "Once every three days check for an update automatically");
InsertGuiPair(update_check_for_info, "Press Next to check for the update...");
InsertGuiPair(update_is_new_version, "Version %d.%d.%d is available, press Next to download...");
InsertGuiPair(update_no_new_version1, "There is not a newer version available.");
@ -581,7 +649,7 @@ void Languages::InitGuiMessagesTab()
#endif
InsertGuiPair(update_download_error, "There was a problem with downloading, please try again later.");
InsertGuiPair(pad_title, "Pad");
InsertGuiPair(pad_title, "Calcpad");
InsertGuiPair(pad_menu_file, "&File");
InsertGuiPair(pad_menu_edit, "&Edit");
InsertGuiPair(pad_menu_file_new, "&New"); // temporarily not used
@ -665,11 +733,12 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_rounding,"Zaokr¹glenie");
InsertGuiPair(display_always_scientific,"Zawsze");
InsertGuiPair(display_not_always_scientific,"Jeœli eksponent jest wiêkszy ni¿:");
InsertGuiPair(display_group_scientific, "Wyœwietl wynik w postaci naukowej");
InsertGuiPair(display_as_scientific, "Wy渨ietl wynik w postaci naukowej");
InsertGuiPair(display_deg_rad_grad, "Funkcje trygonometryczne");
InsertGuiPair(display_grouping, "Grupowanie");
InsertGuiPair(display_grouping_none, "brak");
InsertGuiPair(display_grouping_space, "spacja");
InsertGuiPair(display_grouping_digits, "cyfr(y)");
InsertGuiPair(display_input_decimal_point, "Przecinek w formule");
InsertGuiPair(display_input_decimal_point_item1, " . lub ,");
InsertGuiPair(display_output_decimal_point, "Przecinek w wyniku");
@ -690,7 +759,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_normal_view, "Widok no&rmalny");
InsertGuiPair(menu_view_compact_view, "Widok &kompaktowy");
InsertGuiPair(menu_view_always_on_top, "Zawsze na &wierzchu");
InsertGuiPair(menu_view_pad, "&Pad");
InsertGuiPair(menu_view_pad, "&Calcpad");
InsertGuiPair(menu_view_lang_english, "&Angielski");
InsertGuiPair(menu_view_lang_polish, "&Polski");
InsertGuiPair(menu_view_lang_spanish, "&Hiszpañski");
@ -699,6 +768,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_russian, "&Rosyjski");
InsertGuiPair(menu_view_lang_swedish, "&Szwedzki");
InsertGuiPair(menu_view_lang_italian, "&W³oski");
InsertGuiPair(menu_view_lang_german, "&Niemiecki");
InsertGuiPair(menu_view_close_program, "&Zamknij");
InsertGuiPair(menu_edit_undo, "&Cofnij \tCtrl+Z");
InsertGuiPair(menu_edit_cut, "Wy&tnij \tCtrl+X");
@ -757,9 +827,11 @@ void Languages::InitGuiMessagesTab()
" lars.gafvert@gmail.com\r\n"
"W³oski Damiano Monaco\r\n"
" dmonax@gmail.com\r\n"
"Niemiecki Moritz Beleites\r\n"
" morbel@gmx.net\r\n"
);
InsertGuiPair(about_text_portable_version, " wersja portable");
InsertGuiPair(about_text_exe_packer, "Paker exe: UPX 3.04\r\n");
InsertGuiPair(about_text_exe_packer, "Paker exe: UPX 3.07\r\n");
InsertGuiPair(about_box_title, "O programie");
InsertGuiPair(about_box_button_close, "Zamknij");
InsertGuiPair(unknown_error, "Nieznany kod b³êdu");
@ -769,7 +841,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_button_next, "Dalej");
InsertGuiPair(update_button_finish, "Zakoñcz");
InsertGuiPair(update_button_cancel, "Anuluj");
InsertGuiPair(update_check_at_startup, "Zawsze sprawdzaj aktualizacje podczas uruchamiania");
InsertGuiPair(update_check_at_startup, "Raz na trzy dni sprawd<77> dost阷no滄 aktualizacji automatycznie");
InsertGuiPair(update_check_for_info, "Wciœnij Dalej aby sprawdziæ dostêpnoœæ aktualizacji...");
InsertGuiPair(update_is_new_version, "Wersja %d.%d.%d jest dostêpna, wciœnij Dalej aby j¹ pobraæ...");
InsertGuiPair(update_no_new_version1, "Nie ma dostêpnej nowszej wersji programu.");
@ -784,7 +856,7 @@ void Languages::InitGuiMessagesTab()
#endif
InsertGuiPair(update_download_error, "Wyst¹pi³y problemy ze œci¹gniêciem, proszê spróbowaæ ponownie póŸniej.");
InsertGuiPair(pad_title, "Pad");
InsertGuiPair(pad_title, "Calcpad");
InsertGuiPair(pad_menu_file, "&Plik");
InsertGuiPair(pad_menu_edit, "&Edycja");
InsertGuiPair(pad_menu_file_new, "&Nowy"); // temporarily not used
@ -871,11 +943,12 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_rounding, "Redondeo");
InsertGuiPair(display_always_scientific,"Siempre");
InsertGuiPair(display_not_always_scientific,"Cuando el exponente es mas grande que:");
InsertGuiPair(display_group_scientific, "Imprimir el resultado como valor científico");
InsertGuiPair(display_as_scientific, "Imprimir el resultado como valor cient韋ico");
InsertGuiPair(display_deg_rad_grad, "Funciones trigonométricas");
InsertGuiPair(display_grouping, "Agrupar"); // e.g. 1`000`000
InsertGuiPair(display_grouping_none, "Ninguno");
InsertGuiPair(display_grouping_space, "Espacio");
InsertGuiPair(display_grouping_digits, "digito(s)");
InsertGuiPair(display_input_decimal_point, "Símbolo decimal en fórmula"); // Decimal point in formula
InsertGuiPair(display_input_decimal_point_item1, " . o ,");
InsertGuiPair(display_output_decimal_point, "Símbolo decimal en resultado"); // Decimal point in result
@ -905,6 +978,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_russian, "&Ruso");
InsertGuiPair(menu_view_lang_swedish, "&Sueco");
InsertGuiPair(menu_view_lang_italian, "I&talian");
InsertGuiPair(menu_view_lang_german, "&Alem醤"); // is it a good translation?
InsertGuiPair(menu_view_close_program, "&Close");
InsertGuiPair(menu_edit_undo, "&Deshacer \tCtrl+Z");
@ -965,9 +1039,11 @@ void Languages::InitGuiMessagesTab()
" lars.gafvert@gmail.com\r\n"
"Italian Damiano Monaco\r\n"
" dmonax@gmail.com\r\n"
"Alem醤 Moritz Beleites\r\n"
" morbel@gmx.net\r\n"
);
InsertGuiPair(about_text_portable_version, " versión portatil");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.04\r\n");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.07\r\n");
InsertGuiPair(about_box_title, "Acerca de");
InsertGuiPair(about_box_button_close, "Cerrar");
InsertGuiPair(unknown_error, "Ocurrió un error desconocido");
@ -978,7 +1054,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_button_next, "Siguiente");
InsertGuiPair(update_button_finish, "Finalizar");
InsertGuiPair(update_button_cancel, "Cancelar");
InsertGuiPair(update_check_at_startup, "Comprobar siempre al comienzo si hay una nueva versión");
InsertGuiPair(update_check_at_startup, "Comprobar siempre al comienzo si hay una nueva versi"); // this text has been changed, need correction!
InsertGuiPair(update_check_for_info, "Pulse Siguiente para ver si hay actualizaciones...");
InsertGuiPair(update_is_new_version, "La versión %d.%d.%d está disponible, pulse Siguiente para descargar...");
InsertGuiPair(update_no_new_version1, "No hay versiones nuevas disponibles.");
@ -1079,11 +1155,12 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_rounding, "Afrunding");
InsertGuiPair(display_always_scientific,"Altid");
InsertGuiPair(display_not_always_scientific,"Når exponenten er større end:");
InsertGuiPair(display_group_scientific, "Print resultatet som den videnskablige værdi");
InsertGuiPair(display_as_scientific, "Print resultatet som den videnskablige v鎟di");
InsertGuiPair(display_deg_rad_grad, "Trigonometriske funktioner");
InsertGuiPair(display_grouping, "Gruppering"); // e.g. 1`000`000
InsertGuiPair(display_grouping_none, "Ingen");
InsertGuiPair(display_grouping_space, "Mellemrum");
InsertGuiPair(display_grouping_digits, "ciffer(cifre)");
InsertGuiPair(display_input_decimal_point, "Input decimal tegn"); // Decimal point in formula
InsertGuiPair(display_input_decimal_point_item1, " . eller ,");
InsertGuiPair(display_output_decimal_point, "Output decimal tegn"); // Decimal point in result
@ -1113,6 +1190,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_russian, "&Russisk");
InsertGuiPair(menu_view_lang_swedish, "S&vensk");
InsertGuiPair(menu_view_lang_italian, "&Italian");
InsertGuiPair(menu_view_lang_german, "&Tysk"); // is it a good translation?
InsertGuiPair(menu_view_close_program, "Afslu&t");
InsertGuiPair(menu_edit_undo, "&Fortryd \tCtrl+Z");
InsertGuiPair(menu_edit_cut, "Kli&p \tCtrl+X");
@ -1171,9 +1249,11 @@ void Languages::InitGuiMessagesTab()
" lars.gafvert@gmail.com\r\n"
"Italian Damiano Monaco\r\n"
" dmonax@gmail.com\r\n"
"Tysk Moritz Beleites\r\n"
" morbel@gmx.net\r\n"
);
InsertGuiPair(about_text_portable_version, " transportabel version");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.04\r\n");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.07\r\n");
InsertGuiPair(about_box_title, "Om");
InsertGuiPair(about_box_button_close, "Luk");
InsertGuiPair(unknown_error, "Der er sket en ukendt fejl");
@ -1184,7 +1264,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_button_next, "Næste");
InsertGuiPair(update_button_finish, "Færdig");
InsertGuiPair(update_button_cancel, "Annuler");
InsertGuiPair(update_check_at_startup, "Tjek altid for opdateringer ved opstart");
InsertGuiPair(update_check_at_startup, "Tjek altid for opdateringer ved opstart"); // this text has been changed, need correction!
InsertGuiPair(update_check_for_info, "Tryk på Næste for at tjekke for opdateringen...");
InsertGuiPair(update_is_new_version, "Version %d.%d.%d er tilgængelig, tryk på Næste for at downloade...");
InsertGuiPair(update_no_new_version1, "Der er ingen ny version tilgængelig.");
@ -1233,13 +1313,13 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(dialog_box_edit_variable_caption,"±à¼­±äÁ¿");
InsertGuiPair(dialog_box_add_variable_incorrect_name,"´íÎóµÄ±äÁ¿Ãû");
InsertGuiPair(dialog_box_add_variable_incorrect_value,"´íÎóµÄ±äÁ¿Öµ");
InsertGuiPair(dialog_box_add_variable_variable_exists,"Õâ¸ö±äÁ¿ÒѾ­´æÔÚ");
InsertGuiPair(dialog_box_add_variable_variable_exists,"此变量已存在");
InsertGuiPair(dialog_box_edit_variable_unknown_variable,"±í¸ñÖÐûÓд˱äÁ¿¡£¿ÉÄÜÊÇÄÚ²¿´íÎó£¡");
InsertGuiPair(dialog_box_delete_variable_confirm,"ÄãÈ·¶¨ÒªÉ¾³ýÕâЩ±äÁ¿Âð£¿");
InsertGuiPair(dialog_box_variable_not_all_deleted,"һЩ±äÁ¿²»ÄÜɾ³ý¡£¿ÉÄÜÊÇÄÚ²¿´íÎó£¡");
InsertGuiPair(dialog_box_add_function_caption,"Ìí¼Óк¯Êý");
InsertGuiPair(dialog_box_edit_function_caption,"±à¼­º¯Êý");
InsertGuiPair(dialog_box_add_function_function_exists,"Õâ¸öº¯ÊýÒѾ­´æÔÚ");
InsertGuiPair(dialog_box_add_function_function_exists,"此函数已存在");
InsertGuiPair(dialog_box_edit_function_unknown_function,"±í¸ñÖÐûÓд˺¯Êý¡£¿ÉÄÜÊÇÄÚ²¿´íÎó£¡");
InsertGuiPair(dialog_box_delete_function_confirm,"ÄãÈ·¶¨ÒªÉ¾³ýÕâЩº¯ÊýÂð£¿");
InsertGuiPair(dialog_box_function_not_all_deleted,"һЩº¯Êý²»ÄÜɾ³ý¡£¿ÉÄÜÊÇÄÚ²¿´íÎó£¡");
@ -1247,9 +1327,9 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(list_variables_header_1,"Ãû³Æ");
InsertGuiPair(list_variables_header_2,"Öµ");
InsertGuiPair(list_functions_header_1,"Ãû³Æ");
InsertGuiPair(list_functions_header_2,"񅧏");
InsertGuiPair(list_functions_header_3,"Öµ");
InsertGuiPair(list_functions_header_1,"函数名");
InsertGuiPair(list_functions_header_2,"参数个数");
InsertGuiPair(list_functions_header_3,"表达式");
InsertGuiPair(button_add,"Ìí¼Ó");
InsertGuiPair(button_edit,"±à¼­");
@ -1262,9 +1342,9 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(tab_display,"ÏÔʾ");
InsertGuiPair(tab_convert,"ת»»");
InsertGuiPair(radio_precision_1,"С - 96 bits βÊý, 32 bits Ö¸Êý");
InsertGuiPair(radio_precision_2,"ÖÐ - 512 bits βÊý, 64 bits Ö¸Êý");
InsertGuiPair(radio_precision_3,"´ó - 1024 bits βÊý, 128 bits for Ö¸Êý");
InsertGuiPair(radio_precision_1,"小 - 96 位 尾数, 32位 指数");
InsertGuiPair(radio_precision_2,"中 - 512 位 尾数, 64位 指数");
InsertGuiPair(radio_precision_3,"大 - 1024 位 尾数, 128位 指数");
InsertGuiPair(precision_1_info,"(+/-)6.97...e+646457021, 26λÓÐЧÊý×Ö(Ê®½øÖÆ)");
@ -1284,11 +1364,12 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_rounding, "ËÄÉáÎåÈë");
InsertGuiPair(display_always_scientific,"Ò»Ö±");
InsertGuiPair(display_not_always_scientific,"µ±Ö¸Êý´óÓÚ:");
InsertGuiPair(display_group_scientific, "°´¿Æѧ¼ÆÊý·¨Êä³ö½á¹û");
InsertGuiPair(display_as_scientific, "按科学计数法输出结果");
InsertGuiPair(display_deg_rad_grad, "Èý½Çº¯Êý");
InsertGuiPair(display_grouping, "·Ö×é·û"); // e.g. 1`000`000
InsertGuiPair(display_grouping_none, "ÎÞ");
InsertGuiPair(display_grouping_space, "¿Õ¸ñ");
InsertGuiPair(display_grouping_digits, "位数");
InsertGuiPair(display_input_decimal_point, "СÊýµãÊäÈë¸ñʽ"); // Decimal point in formula
InsertGuiPair(display_input_decimal_point_item1, " . or ,");
InsertGuiPair(display_output_decimal_point, "СÊýµãÊä³ö¸ñʽ"); // Decimal point in result
@ -1309,7 +1390,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_normal_view, "&ÆÕͨÊÓͼ");
InsertGuiPair(menu_view_compact_view, "&ÃÔÄãÊÓͼ");
InsertGuiPair(menu_view_always_on_top, "&×ÜÔÚ×îÇ°");
InsertGuiPair(menu_view_pad, "Õ³Ìù°å");
InsertGuiPair(menu_view_pad, "&文本计算器");
InsertGuiPair(menu_view_lang_english, "&Ó¢Óï");
InsertGuiPair(menu_view_lang_polish, "&²¨À¼Óï");
InsertGuiPair(menu_view_lang_spanish, "&Î÷°àÑÀÓï");
@ -1317,7 +1398,8 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_chinese, "&¼òÌåÖÐÎÄ");
InsertGuiPair(menu_view_lang_russian, "&¶íÓï");
InsertGuiPair(menu_view_lang_swedish, "&ÈðµäÓï");
InsertGuiPair(menu_view_lang_italian, "&Italian");
InsertGuiPair(menu_view_lang_italian, "&意大利语");
InsertGuiPair(menu_view_lang_german, "&德语");
InsertGuiPair(menu_view_close_program, "&¹Ø±Õ");
InsertGuiPair(menu_edit_undo, "&È¡Ïû \tCtrl+Z");
InsertGuiPair(menu_edit_cut, "&¼ôÇÐ \tCtrl+X");
@ -1329,7 +1411,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_edit_copy_result, "&¸´Öƽá¹û \tCtrl+R");
InsertGuiPair(menu_edit_select_all, "&È«Ñ¡\tEsc");
InsertGuiPair(menu_edit_bracket, "&¼ÓÀ¨ºÅ \tCtrl+0"); // inserting brackets: (...)
InsertGuiPair(menu_edit_swap, "&Swap \tCtrl+W"); // swapping input edit for output edit
InsertGuiPair(menu_edit_swap, "&输入计算结果 \tCtrl+W"); // swapping input edit for output edit
InsertGuiPair(menu_help_help, "&°ïÖú");
InsertGuiPair(menu_help_project_page, "&Èí¼þÖ÷Ò³");
InsertGuiPair(menu_help_about, "&¹ØÓÚ");
@ -1340,9 +1422,9 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(cant_init_calculations, "²»Äܳõʼ»¯¼ÆËãÆ÷Ä£ÐÍ");
InsertGuiPair(message_box_error_caption,"TTCalc");
InsertGuiPair(cant_create_thread, "²»ÄÜ´´½¨Á½¸öÏß³ÌÀ´ÔËËã");
InsertGuiPair(cant_create_pad, "I could not create the pad window");
InsertGuiPair(cant_create_pad, "不能创建文本计算窗口");
InsertGuiPair(cant_create_main_window, "²»ÄÜ´´½¨Ó¦ÓóÌÐòÖ÷´°¿Ú");
InsertGuiPair(cant_init_common_controls,"²»Äܳõʼ»¯Í¨Óÿؼþ(InitCommonControlsEx)");
InsertGuiPair(cant_init_common_controls,"不能初始化通用控件");
InsertGuiPair(about_text,
"Mathematical calculator TTCalc %d.%d.%d%s%s\r\n\r\n"
"¿ª·¢ÈË: Tomasz Sowa\r\n"
@ -1351,8 +1433,8 @@ void Languages::InitGuiMessagesTab()
"Ö÷Ò³: http://ttcalc.sourceforge.net\r\n"
"Bignum library: TTMath %d.%d.%d%s (%s)\r\n"
"Bignum type: binary floating point numbers\r\n"
"Programming language: C++\r\n"
"Compiler: %s\r\n"
"编程语言: C++\r\n"
"编译器: %s\r\n"
"%s" // for upx
"\r\n"
"TTCalc uses the TTMath bignum library"
@ -1375,11 +1457,13 @@ void Languages::InitGuiMessagesTab()
" vdgladilovich@gmail.com\r\n"
"ÈðµäÓï Lars 'Bafvert' Gafvert\r\n"
" lars.gafvert@gmail.com\r\n"
"Italian Damiano Monaco\r\n"
"意大利语 Damiano Monaco\r\n"
" dmonax@gmail.com\r\n"
"德语 Moritz Beleites\r\n"
" morbel@gmx.net\r\n"
);
InsertGuiPair(about_text_portable_version, " portable version");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.04\r\n");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.07\r\n");
InsertGuiPair(about_box_title, "¹ØÓÚ");
InsertGuiPair(about_box_button_close, "¹Ø±Õ");
InsertGuiPair(unknown_error, "·¢Éúδ֪´íÎó");
@ -1390,7 +1474,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_button_next, "ÏÂÒ»²½");
InsertGuiPair(update_button_finish, "Íê³É");
InsertGuiPair(update_button_cancel, "È¡Ïû");
InsertGuiPair(update_check_at_startup, "Æô¶¯Ê±×ÜÊǼì²é¸üÐÂ");
InsertGuiPair(update_check_at_startup, "启动时总是检查更新"); // this text has been changed, need correction!
InsertGuiPair(update_check_for_info, "°´\"ÏÂÒ»²½\"½øÐиüÐÂ...");
InsertGuiPair(update_is_new_version, "°æ±¾ %d.%d.%d ¿ÉÓÃ, °´\"ÏÂÒ»²½\"ÏÂÔØ...");
InsertGuiPair(update_no_new_version1, "ûÓпÉÓõÄа汾¡£");
@ -1405,7 +1489,7 @@ void Languages::InitGuiMessagesTab()
#endif
InsertGuiPair(update_download_error, "ÏÂÔØʱ³öÏÖ´íÎó£¬ÇëÉÔºóÖØÊÔ¡£");
InsertGuiPair(pad_title, "Õ³Ìù°å");
InsertGuiPair(pad_title, "&文本计算器");
InsertGuiPair(pad_menu_file, "&Îļþ");
InsertGuiPair(pad_menu_edit, "&±à¼­");
InsertGuiPair(pad_menu_file_new, "&н¨"); // temporarily not used
@ -1419,9 +1503,9 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(pad_menu_edit_del, "&ɾ³ý \tDel");
InsertGuiPair(pad_menu_edit_select_all, "&È«Ñ¡ \tCtrl+A");
InsertGuiPair(cannot_open_file, "I cannot open the file");
InsertGuiPair(cannot_save_file, "I cannot save to such a file");
InsertGuiPair(file_too_long, "The file is too long");
InsertGuiPair(cannot_open_file, "未能打开文件");
InsertGuiPair(cannot_save_file, "不能保存文件");
InsertGuiPair(file_too_long, "文件太长");
InsertGuiPair(other_error, "There was a problem with this operation"); // for other kinds of errors
@ -1491,12 +1575,13 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_rounding, "Îêðóãëåíèå");
InsertGuiPair(display_always_scientific,"Âñåãäà");
InsertGuiPair(display_not_always_scientific,"Êîãäà ïîêàçàòåëü ñòåïåíè áîëüøå");
InsertGuiPair(display_group_scientific, "Âûâîäèòü ðåçóëüòàò â ýêñïîíåíöèàëüíîì âèäå");
InsertGuiPair(display_as_scientific, "蔓忸滂螯 疱珞朦蜞<E69CA6> <20> <20>耧铐屙鲨嚯<E9B2A8>铎 忤溴");
InsertGuiPair(display_deg_rad_grad, "Òðèãîíîìåòðèÿ");
InsertGuiPair(display_grouping, "Ðàçä. ãðóïï"); // e.g. 1`000`000
InsertGuiPair(display_grouping_none, "Íè÷åãî");
InsertGuiPair(display_grouping_space, "Ïðîáåë");
InsertGuiPair(display_grouping_digits, "珥嚓<EFBFBD>");
InsertGuiPair(display_input_decimal_point, "Äåñÿòè÷íàÿ òî÷êà (ââîä)"); // Decimal point in formula
InsertGuiPair(display_input_decimal_point_item1, " . èëè ,");
InsertGuiPair(display_output_decimal_point, "Äåñÿòè÷íàÿ òî÷êà (âûâîä)"); // Decimal point in result
@ -1525,7 +1610,8 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_chinese, "&Êèòàéñêèé");
InsertGuiPair(menu_view_lang_russian, "&Ðóññêèé");
InsertGuiPair(menu_view_lang_swedish, "&Øâåäñêèé");
InsertGuiPair(menu_view_lang_italian, "&Italian");
InsertGuiPair(menu_view_lang_italian, "&Italian"); // to translate
InsertGuiPair(menu_view_lang_german, "&German"); // to translate
InsertGuiPair(menu_view_close_program, "&Çàêðûòü");
InsertGuiPair(menu_edit_undo, "&Îòìåíèòü äåéñòâèå \tCtrl+Z");
@ -1587,9 +1673,11 @@ void Languages::InitGuiMessagesTab()
" lars.gafvert@gmail.com\r\n"
"Italian Damiano Monaco\r\n"
" dmonax@gmail.com\r\n"
"German Moritz Beleites\r\n"
" morbel@gmx.net\r\n"
);
InsertGuiPair(about_text_portable_version, " ïåðåíîñíàÿ âåðñèÿ");
InsertGuiPair(about_text_exe_packer, "óïàêîâùèê EXE: UPX 3.04\r\n");
InsertGuiPair(about_text_exe_packer, "箫嚓钼<EFBFBD><EFBFBD> EXE: UPX 3.07\r\n");
InsertGuiPair(about_box_title, "Î ïðîãðàììå");
InsertGuiPair(about_box_button_close, "Çàêðûòü");
InsertGuiPair(unknown_error, "Íåèçâåñòíàÿ îøèáêà");
@ -1601,7 +1689,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_button_next, "Äàëåå");
InsertGuiPair(update_button_finish, "Ãîòîâî");
InsertGuiPair(update_button_cancel, "Îòìåíà");
InsertGuiPair(update_check_at_startup, "Ïðîâåðÿòü íàëè÷èå îáíîâëåíèé ïðè çàãðóçêå ïðîãðàììû");
InsertGuiPair(update_check_at_startup, "橡钼屦<EFBFBD>螯 磬腓麒<E88593> 钺眍怆屙栝 镳<> 玎沭箸赍 镳钽疣祆<E796A3>"); // this text has been changed, need correction!
InsertGuiPair(update_check_for_info, "Íàæìèòå Äàëåå, ÷òîáû ïðîâåðèòü íàëè÷èå îáíîâëåíèé...");
InsertGuiPair(update_is_new_version, "Äîñòóïíà âåðñèÿ %d.%d.%d, íàæìèòå Äàëåå, ÷òîáû ñêà÷àòü å¸...");
InsertGuiPair(update_no_new_version1, "Íåò íîâûõ âåðñèé.");
@ -1704,7 +1792,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_rounding, "Avrundning");
InsertGuiPair(display_always_scientific,"Alltid");
InsertGuiPair(display_not_always_scientific,"När exponenten är större än:");
InsertGuiPair(display_group_scientific, "Visa resultatet som vetenskapligt värde");
InsertGuiPair(display_as_scientific, "Visa resultatet som vetenskapligt v鋜de");
InsertGuiPair(display_deg_rad_grad, "Trigonometric functions");
InsertGuiPair(convert_type, "Type");
InsertGuiPair(convert_input, "Input");
@ -1713,6 +1801,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_grouping, "Grouping");
InsertGuiPair(display_grouping_none, "None");
InsertGuiPair(display_grouping_space, "Space");
InsertGuiPair(display_grouping_digits, "siffror(cifre)");
InsertGuiPair(display_input_decimal_point, "Input decimal point");
InsertGuiPair(display_input_decimal_point_item1, " . or ,");
InsertGuiPair(display_output_decimal_point, "Output decimal point");
@ -1737,6 +1826,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_russian, "&Ryska");
InsertGuiPair(menu_view_lang_swedish, "S&venska");
InsertGuiPair(menu_view_lang_italian, "&Italian");
InsertGuiPair(menu_view_lang_german, "&Tyska"); // is it a good translation?
InsertGuiPair(menu_view_close_program, "A&vsluta");
InsertGuiPair(menu_edit_undo, "&Ångra \tCtrl+Z");
InsertGuiPair(menu_edit_cut, "Cu&t \tCtrl+X");
@ -1795,9 +1885,11 @@ void Languages::InitGuiMessagesTab()
" lars.gafvert@gmail.com\r\n"
"Italian Damiano Monaco\r\n"
" dmonax@gmail.com\r\n"
"Tyska Moritz Beleites\r\n"
" morbel@gmx.net\r\n"
);
InsertGuiPair(about_text_portable_version, " transportabel version");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.04\r\n");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.07\r\n");
InsertGuiPair(about_box_title, "Om");
InsertGuiPair(about_box_button_close, "Bäver");
InsertGuiPair(unknown_error, "Det har inträffat ett okänt fel");
@ -1907,11 +1999,12 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(display_rounding, "Arrotonda");
InsertGuiPair(display_always_scientific,"Sempre");
InsertGuiPair(display_not_always_scientific,"Quando l'esponente e maggiore di:");
InsertGuiPair(display_group_scientific, "Stampa il risultato in notazione scientifica");
InsertGuiPair(display_as_scientific, "Stampa il risultato in notazione scientifica");
InsertGuiPair(display_deg_rad_grad, "Funzioni trigonometriche");
InsertGuiPair(display_grouping, "Raggruppo");
InsertGuiPair(display_grouping_none, "nessuno");
InsertGuiPair(display_grouping_space, "spazio");
InsertGuiPair(display_grouping_digits, "cifra/e");
InsertGuiPair(display_input_decimal_point, "Punto decimale in input"); // Decimal point in formula
InsertGuiPair(display_input_decimal_point_item1, " . oppure ,");
InsertGuiPair(display_output_decimal_point, "Punto decimale in output"); // Decimal point in result
@ -1940,8 +2033,9 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(menu_view_lang_danish, "&Danese");
InsertGuiPair(menu_view_lang_chinese, "&Cinese");
InsertGuiPair(menu_view_lang_russian, "&Russo");
InsertGuiPair(menu_view_lang_swedish, "&Svedese");
InsertGuiPair(menu_view_lang_swedish, "S&vedese");
InsertGuiPair(menu_view_lang_italian, "I&taliano");
InsertGuiPair(menu_view_lang_german, "&Tedesco"); // is it a good translation?
InsertGuiPair(menu_view_close_program, "&Esci");
InsertGuiPair(menu_edit_undo, "&Annulla \tCtrl+Z");
InsertGuiPair(menu_edit_cut, "&Taglia \tCtrl+X");
@ -2001,9 +2095,11 @@ void Languages::InitGuiMessagesTab()
" lars.gafvert@gmail.com\r\n"
"Italian Damiano Monaco\r\n"
" dmonax@gmail.com\r\n"
"Tedesco Moritz Beleites\r\n"
" morbel@gmx.net\r\n"
);
InsertGuiPair(about_text_portable_version, " versione portabile");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.04\r\n");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.07\r\n");
InsertGuiPair(about_box_title, "Informazioni su");
InsertGuiPair(about_box_button_close, "Esci");
InsertGuiPair(unknown_error, "Si e verificato un errore sconosciuto");
@ -2013,7 +2109,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(update_button_next, "Continua");
InsertGuiPair(update_button_finish, "Finito");
InsertGuiPair(update_button_cancel, "Annulla");
InsertGuiPair(update_check_at_startup, "Controlla sempre aggiornamenti all'avvio");
InsertGuiPair(update_check_at_startup, "Controlla sempre aggiornamenti all'avvio"); // this text has been changed, need correction!
InsertGuiPair(update_check_for_info, "Premi Continua per controllare gli aggiornamenti...");
InsertGuiPair(update_is_new_version, "Versione %d.%d.%d disponibile, premi Continua per scaricare...");
InsertGuiPair(update_no_new_version1, "Nessuna versione nuova disponibile.");
@ -2046,5 +2142,214 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(cannot_save_file, "Non posso salvare in tale file");
InsertGuiPair(file_too_long, "Il file e troppo lungo");
InsertGuiPair(other_error, "Si e verificato un problema con questa operazione"); // for other kinds of errors
/*
german gui messages
*/
gui_messages_tab.push_back( std::map<GuiMsg, std::string>() );
InsertGuiPair(button_ok,"Ok");
InsertGuiPair(button_cancel,"Abbrechen");
InsertGuiPair(message_box_caption,"TTCalc");
InsertGuiPair(dialog_box_add_variable_caption,"Variable hinzuf黦en");
InsertGuiPair(dialog_box_edit_variable_caption,"Variable bearbeiten");
InsertGuiPair(dialog_box_add_variable_incorrect_name,"Ung黮tiger Variablenname");
InsertGuiPair(dialog_box_add_variable_incorrect_value,"Ung黮tiger Wert der Variablen");
InsertGuiPair(dialog_box_add_variable_variable_exists,"Diese Variable existiert bereits");
InsertGuiPair(dialog_box_edit_variable_unknown_variable,"Variable unbekannt - vermutlich interner Fehler!");
InsertGuiPair(dialog_box_delete_variable_confirm,"Diese Variablen l鰏chen?");
InsertGuiPair(dialog_box_variable_not_all_deleted,"Variablen konnten nicht alle gel鰏cht werden - vermutlich interner Fehler!");
InsertGuiPair(dialog_box_add_function_caption,"Funktion hinzuf黦en");
InsertGuiPair(dialog_box_edit_function_caption,"Funktion bearbeiten");
InsertGuiPair(dialog_box_add_function_function_exists,"Diese Funktion existiert bereits");
InsertGuiPair(dialog_box_edit_function_unknown_function,"Funktion unbekannt - vermutlich interner Fehler!");
InsertGuiPair(dialog_box_delete_function_confirm,"Diese Funktionen l鰏chen?");
InsertGuiPair(dialog_box_function_not_all_deleted,"Funktionen konnten nicht alle gel鰏cht werden - vermutlich interner Fehler!");
InsertGuiPair(dialog_box_add_function_incorrect_name,"Ung黮tiger Funktionsname");
InsertGuiPair(list_variables_header_1,"Name");
InsertGuiPair(list_variables_header_2,"Wert");
InsertGuiPair(list_functions_header_1,"Name");
InsertGuiPair(list_functions_header_2,"Parameter");
InsertGuiPair(list_functions_header_3,"Wert");
InsertGuiPair(button_add,"Hinzuf黦en");
InsertGuiPair(button_edit,"Bearbeiten");
InsertGuiPair(button_delete,"L鰏chen");
InsertGuiPair(button_clear,"C");
InsertGuiPair(tab_standard,"Standard");
InsertGuiPair(tab_variables,"Variablen");
InsertGuiPair(tab_functions,"Funktionen");
InsertGuiPair(tab_precision,"Genauigkeit");
InsertGuiPair(tab_display,"Anzeige");
InsertGuiPair(tab_convert,"Konvertieren");
InsertGuiPair(radio_precision_1,"Klein - 96 bit f黵 Mantisse, 32 bit f黵 Exponenten");
InsertGuiPair(radio_precision_2,"Mittel - 512 bit f黵 Mantisse, 64 bit f黵 Exponenten");
InsertGuiPair(radio_precision_3,"Gro<EFBFBD> - 1024 bit f黵 Mantisse, 128 bit f黵 Exponenten");
InsertGuiPair(precision_1_info,"(+/-)6.97...e+646457021, 26 g黮tige Dezimalstellen");
InsertGuiPair(precision_2_info,"(+/-)9.25...e+2776511644261678719, 152 g黮tige Dezimalstellen");
InsertGuiPair(precision_3_info,"(+/-)9.80...*10^(10^37), 306 g黮tige Dezimalstellen");
InsertGuiPair(overflow_during_printing,"躡erlauf w鋒rend der Ausgabe");
InsertGuiPair(combo_rounding_none,"keine");
InsertGuiPair(combo_rounding_integer,"auf Ganzzahl");
InsertGuiPair(combo_rounding_to_number,"auf");
InsertGuiPair(combo_rounding_after_comma,"Stelle(n)");
InsertGuiPair(check_remove_zeroes,"Nur signifikante Nachkommastellen");
InsertGuiPair(display_input, "Eingabebasis");
InsertGuiPair(display_output, "Ergebnisbasis");
InsertGuiPair(display_rounding, "Rundung");
InsertGuiPair(display_always_scientific,"Immer");
InsertGuiPair(display_not_always_scientific,"Wenn der Exponent gr鲞er ist als:");
InsertGuiPair(display_as_scientific, "Ergebnis in wissenschaftlicher Schreibweise");
InsertGuiPair(display_deg_rad_grad, "Winkelma<EFBFBD>");
InsertGuiPair(display_grouping, "Gruppierung"); // e.g. 1`000`000
InsertGuiPair(display_grouping_none, "keine");
InsertGuiPair(display_grouping_space, "Leerzeichen");
InsertGuiPair(display_grouping_digits, "Stelle(n)");
InsertGuiPair(display_input_decimal_point, "Dezimaltrennz. Eingabe"); // Decimal point in formula
InsertGuiPair(display_input_decimal_point_item1, " . oder ,");
InsertGuiPair(display_output_decimal_point, "Dezimaltrennz. Ergebnis"); // Decimal point in result
InsertGuiPair(display_param_sep, "Parameter getrennt durch");
InsertGuiPair(display_param_sep_item2, " ; oder .");
InsertGuiPair(display_param_sep_item3, " ; oder ,");
InsertGuiPair(convert_type, "Typ");
InsertGuiPair(convert_input, "Eingabe");
InsertGuiPair(convert_output, "Ergebnis");
InsertGuiPair(convert_dynamic_output, "Auto pr鋐ix");
InsertGuiPair(menu_view, "&Ansicht");
InsertGuiPair(menu_edit, "&Bearbeiten");
InsertGuiPair(menu_help, "&Hilfe");
InsertGuiPair(menu_language, "&Sprache");
InsertGuiPair(menu_view_new_window, "&Neues Fenster");
InsertGuiPair(menu_view_normal_view, "No&rmale Ansicht");
InsertGuiPair(menu_view_compact_view, "&Kompakte Ansicht");
InsertGuiPair(menu_view_pad, "&Rechenblock");
InsertGuiPair(menu_view_always_on_top, "Immer im &Vordergrund");
InsertGuiPair(menu_view_lang_english, "&Englisch");
InsertGuiPair(menu_view_lang_polish, "&Polnisch");
InsertGuiPair(menu_view_lang_spanish, "&Spanisch");
InsertGuiPair(menu_view_lang_danish, "&D鋘isch");
InsertGuiPair(menu_view_lang_chinese, "&Chinesisch");
InsertGuiPair(menu_view_lang_russian, "&Russisch");
InsertGuiPair(menu_view_lang_swedish, "Sch&wedisch");
InsertGuiPair(menu_view_lang_italian, "&Italienisch");
InsertGuiPair(menu_view_lang_german, "De&utsch");
InsertGuiPair(menu_view_close_program, "&Beenden");
InsertGuiPair(menu_edit_undo, "&R點kg鋘gig \tStrg+Z");
InsertGuiPair(menu_edit_cut, "&Ausschneiden \tStrg+X");
InsertGuiPair(menu_edit_copy, "&Kopieren \tStrg+C");
InsertGuiPair(menu_edit_paste, "&Einf黦en"); // cutting, copying, pasting the the edit which has a focus
InsertGuiPair(menu_edit_del, "&L鰏chen \tEntf");
InsertGuiPair(menu_edit_paste_formula, "&Formel einf黦en \tStrg+V"); // pasting directly to input edit
InsertGuiPair(menu_edit_copy_result, "E&rgebnis kopieren \tStrg+R");
InsertGuiPair(menu_edit_copy_both, "&Beides kopieren \tStrg+B"); // copying in this way: "input edit = output edit"
InsertGuiPair(menu_edit_select_all, "Alles a&usw鋒len \tEsc");
InsertGuiPair(menu_edit_bracket, "Eingabe eink&lammern \tStrg+0"); // inserting brackets: (...)
InsertGuiPair(menu_edit_swap, "&Vertauschen \tStrg+W"); // swapping input edit for output edit
InsertGuiPair(menu_help_help, "&Hilfe");
InsertGuiPair(menu_help_project_page, "&Projektseite aufrufen");
InsertGuiPair(menu_help_check_update, "Nach &Updates suchen...");
InsertGuiPair(menu_help_about, "&躡er TTCalc");
InsertGuiPair(menu_update_available, "&Neue Version ist verf黦bar");
// this will be a new main menu item (one after 'help') visible only if there is an update
InsertGuiPair(cant_init_calculations, "Konnte Modul f黵 die Berechnungen nicht initialisieren");
InsertGuiPair(message_box_error_caption,"TTCalc");
InsertGuiPair(cant_create_thread, "Konnte zweiten Thread f黵 die Berechung nicht erzeugen");
InsertGuiPair(cant_create_pad, "Konnte Fenster f黵 Rechenblock nicht erzeugen");
InsertGuiPair(cant_create_main_window, "Konnte das Hauptfenster nicht erzeugen");
InsertGuiPair(cant_init_common_controls,"Konnte die \"common controls\" nicht initialisieren (InitCommonControlsEx)");
InsertGuiPair(about_text,
"Mathematischer Taschenrechner TTCalc %d.%d.%d%s%s\r\n\r\n"
"Autor: Tomasz Sowa\r\n"
"Kontakt: t.sowa@ttmath.org\r\n"
"Lizenz: BSD (open source)\r\n"
"Projektseite: http://ttcalc.sourceforge.net\r\n"
"Bignum library: TTMath %d.%d.%d%s (%s)\r\n"
"Bignum Typ: binary floating point numbers\r\n"
"Programmiersprache: C++\r\n"
"Compiler: %s\r\n"
"%s" // for upx
"\r\n"
"TTCalc verwendet das TTMath bignum library,"
" welches auf http://www.ttmath.org verf黦bar ist.\r\n"
"\r\n"
#ifdef TTCALC_PORTABLE
"Dies ist die portable Version des Programms TTCalc. In dieser Version "
"kann nur mit einer einzigen Pr鋤ision gerechnet werden (96 bit f黵 die "
"Mantisse und 32 bit f黵 den Exponenten) ungef鋒r +/-6.9e+646457021.\r\n"
"\r\n"
#endif
"躡ersetzungen:\r\n"
"Spanisch Alejandro S. Valdezate\r\n"
" alesanval@gmail.com\r\n"
"D鋘isch Rune Bisgaard Vammen\r\n"
" runebisgaard@gmail.com\r\n"
"Chinesisch Juis\r\n"
" zsyfly@gmail.com\r\n"
"Russisch Vladimir Gladilovich\r\n"
" vdgladilovich@gmail.com\r\n"
"Schwedisch Lars 'Bafvert' Gafvert\r\n"
" lars.gafvert@gmail.com\r\n"
"Italienisch Damiano Monaco\r\n"
" dmonax@gmail.com\r\n"
"Deutsch Moritz Beleites\r\n"
" morbel@gmx.net\r\n"
);
InsertGuiPair(about_text_portable_version, " portable Version");
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.07\r\n");
InsertGuiPair(about_box_title, "躡er TTCalc");
InsertGuiPair(about_box_button_close, "Schlie遝n");
InsertGuiPair(unknown_error, "Ein unbekannter Fehler ist aufgetreten");
InsertGuiPair(cant_find_help, "Hilfe-Dateien k鰊nen nicht gefunden werden");
InsertGuiPair(cant_open_project_page, "Projektseite kann nicht ge鰂fnet werden");
InsertGuiPair(update_title, "Nach neuer Version suchen");
InsertGuiPair(update_button_next, "Weiter");
InsertGuiPair(update_button_finish, "Ende");
InsertGuiPair(update_button_cancel, "Abbrechen");
InsertGuiPair(update_check_at_startup, "Beim Start des Programms immer nach Update suchen"); // this text has been changed, need correction!
InsertGuiPair(update_check_for_info, "\"Weiter\", um die Update-Suche zu starten...");
InsertGuiPair(update_is_new_version, "Version %d.%d.%d ist verf黦bar \"Weiter\", um den Download zu starten...");
InsertGuiPair(update_no_new_version1, "Es ist keine neuere Version verf黦bar.");
InsertGuiPair(update_no_new_version2, "Die neueste Version ist bereits installiert.");
InsertGuiPair(update_download_from, "Download l鋟ft...");
#ifndef TTCALC_PORTABLE
InsertGuiPair(update_downloaded_info1, "Eine neue Setup-Datei wurde heruntergeladen.");
InsertGuiPair(update_downloaded_info2, "\"Ende\", um TTCalc zu beenden und die neue version zu installieren.");
#else
InsertGuiPair(update_downloaded_info1, "Eine neue Version wurde heruntergeladen.");
InsertGuiPair(update_downloaded_info2, "");
#endif
InsertGuiPair(update_download_error, "Problem beim Download - bitte sp鋞er erneut versuchen.");
InsertGuiPair(pad_title, "Notizblock");
InsertGuiPair(pad_menu_file, "&Datei");
InsertGuiPair(pad_menu_edit, "&Bearbeiten");
InsertGuiPair(pad_menu_file_new, "&Neu"); // temporarily not used
InsertGuiPair(pad_menu_file_open, "<EFBFBD>&ffnen...");
InsertGuiPair(pad_menu_file_saveas, "Speichern &als...");
InsertGuiPair(pad_menu_file_close, "&Beenden");
InsertGuiPair(pad_menu_edit_undo, "&R點kg鋘gig \tStrg+Z");
InsertGuiPair(pad_menu_edit_cut, "&Ausschneiden \tStrg+X");
InsertGuiPair(pad_menu_edit_copy, "&Kopieren \tStrg+C");
InsertGuiPair(pad_menu_edit_paste, "&Einf黦en \tStrg+V");
InsertGuiPair(pad_menu_edit_del, "&L鰏chen \tEntf");
InsertGuiPair(pad_menu_edit_select_all, "Alles a&usw鋒len \tStrg+A");
InsertGuiPair(cannot_open_file, "Datei kann nicht ge鰂fnet werden");
InsertGuiPair(cannot_save_file, "Datei kann nicht gespeichert werden");
InsertGuiPair(file_too_long, "Datei ist zu lang");
InsertGuiPair(other_error, "Unbekannter Fehler aufgetreten"); // for other kinds of errors
}

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2010, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -105,6 +105,7 @@ public:
display_grouping,
display_grouping_none,
display_grouping_space,
display_grouping_digits,
display_input_decimal_point,
display_input_decimal_point_item1,
display_output_decimal_point,
@ -132,6 +133,7 @@ public:
menu_view_lang_russian,
menu_view_lang_swedish,
menu_view_lang_italian,
menu_view_lang_german,
menu_view_close_program,
menu_edit_undo,
menu_edit_cut,
@ -175,7 +177,7 @@ public:
about_text_exe_packer,
about_box_title,
about_box_button_close,
display_group_scientific,
display_as_scientific,
pad_title,
pad_menu_file,
pad_menu_edit,
@ -199,9 +201,11 @@ public:
// the first item must be with zero index
// and next items must be about one greater (0,1,2,3..)
// (after conversion to 'int' we pass it into the std::vector)
// lastnotexisting should be the last item
// make sure SelectCurrentLanguage(const std::string & lang) is able to recognize a language
enum Country
{
en = 0, pl, sp, da, chn, ru, swe, it
en = 0, pl, sp, da, chn, ru, swe, it, ger, lastnotexisting
};
@ -236,9 +240,18 @@ public:
void SetCurrentLanguage(Country c)
{
// we are reading a language from *.ini file
// and it is stored as a number
if( int(c) < 0 || int(c) >= (int)Languages::lastnotexisting )
c = en;
current_country = c;
}
void SelectCurrentLanguage(const std::string & lang);
Country GetCurrentLanguage()
{
return current_country;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2010, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -408,6 +408,7 @@ HMENU menu = GetMenu(hWnd);
SetMenuLanguageItem(menu, IDM_LANGUAGE_RUSSIAN, Languages::menu_view_lang_russian);
SetMenuLanguageItem(menu, IDM_LANGUAGE_SWEDISH, Languages::menu_view_lang_swedish);
SetMenuLanguageItem(menu, IDM_LANGUAGE_ITALIAN, Languages::menu_view_lang_italian);
SetMenuLanguageItem(menu, IDM_LANGUAGE_GERMAN, Languages::menu_view_lang_german);
SetMenuLanguageItem(menu, IDM_CLOSE_PROGRAM, Languages::menu_view_close_program);
SetMenuLanguageItem(menu, IDM_EDIT_UNDO, Languages::menu_edit_undo);
SetMenuLanguageItem(menu, IDM_EDIT_CUT, Languages::menu_edit_cut);
@ -819,6 +820,9 @@ void WmInitMenuPopUpView(HMENU menu)
else
if( lang == Languages::it )
CheckMenuItem(menu, IDM_LANGUAGE_ITALIAN, MF_BYCOMMAND|MF_CHECKED);
else
if( lang == Languages::ger )
CheckMenuItem(menu, IDM_LANGUAGE_GERMAN, MF_BYCOMMAND|MF_CHECKED);
}
@ -1352,6 +1356,18 @@ return true;
}
BOOL WmCommand_LanguageGerman(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
GetPrgRes()->GetLanguages()->SetCurrentLanguage(Languages::ger);
SetMenuLanguage(hWnd);
SetOutputEditLanguage(hWnd);
TabWindowFunctions::SetLanguage( GetDlgItem(hWnd, IDC_TAB) );
SetPadLanguage();
return true;
}
BOOL WmHelp(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
SHELLEXECUTEINFO exec;
@ -1413,10 +1429,13 @@ MENUITEMINFO mi;
mi.dwTypeData = const_cast<char*>(GetPrgRes()->GetLanguages()->GuiMessage(Languages::menu_update_available));
mi.cch = 0;
mi.wID = IDM_UPDATE_AVAILABLE;
HMENU menu = GetMenu(hWnd);
InsertMenuItem(menu, IDM_UPDATE_AVAILABLE_INDEX, true, &mi);
if( !menu )
return true;
InsertMenuItem(menu, IDM_UPDATE_AVAILABLE_INDEX, true, &mi);
GetPrgRes()->SetUpdateExists(true); // used for the dynamic menu (for changing languages)
DrawMenuBar(hWnd);
@ -1456,6 +1475,7 @@ void CreateCommandMessagesTable(Messages<BOOL> & cmessages)
cmessages.Associate(IDM_LANGUAGE_RUSSIAN, WmCommand_LanguageRussian);
cmessages.Associate(IDM_LANGUAGE_SWEDISH, WmCommand_LanguageSwedish);
cmessages.Associate(IDM_LANGUAGE_ITALIAN, WmCommand_LanguageItalian);
cmessages.Associate(IDM_LANGUAGE_GERMAN, WmCommand_LanguageGerman);
cmessages.Associate(IDM_HELP_HELP, WmHelp);
cmessages.Associate(IDM_HELP_PROJECT_PAGE, WmProjectPage);
}

View File

@ -68,6 +68,8 @@ char input_comma1;
char input_comma2;
char param_sep;
int grouping_digits;
Languages::Country country;
int last_variables_id;
@ -133,6 +135,7 @@ unsigned int i = 0;
conv.trim_zeroes = remove_zeroes;
conv.comma = decimal_point;
conv.group = grouping;
conv.group_digits = grouping_digits;
if( result.ToString(res2, conv) )
res2 = GetPrgRes()->GetLanguages()->GuiMessage(country, Languages::overflow_during_printing);
@ -263,6 +266,7 @@ void SetParameters()
country = GetPrgRes()->GetLanguages()->GetCurrentLanguage();
decimal_point = GetPrgRes()->GetDecimalPointChar();
grouping = GetPrgRes()->GetGroupingChar();
grouping_digits = GetPrgRes()->GetGroupingDigits();
param_sep = GetPrgRes()->GetParamSepChar();
GetPrgRes()->GetInputDecimalPointChar(&input_comma1, &input_comma2);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2009, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -45,11 +45,6 @@
ParserManager::ParserManager() : buffer_len(20480)
{
buffer = 0;
base_input = base_output = 10;
always_scientific = 0;
when_scientific = 15;
rounding = -1;
remove_zeroes = true;
last_variables_id = 0;
last_functions_id = 0;
}
@ -57,15 +52,7 @@ ParserManager::ParserManager() : buffer_len(20480)
ParserManager::ParserManager(const ParserManager & p) : buffer_len(p.buffer_len)
{
buffer = 0;
base_input = p.base_input;
base_output = p.base_output;
always_scientific = p.always_scientific;
when_scientific = p.when_scientific;
rounding = p.rounding;
remove_zeroes = p.remove_zeroes;
last_variables_id = p.last_variables_id;
last_functions_id = p.last_functions_id;
buffer = 0;
}
@ -164,6 +151,7 @@ unsigned int i;
country = GetPrgRes()->GetLanguages()->GetCurrentLanguage();
decimal_point = GetPrgRes()->GetDecimalPointChar();
grouping = GetPrgRes()->GetGroupingChar();
grouping_digits = GetPrgRes()->GetGroupingDigits();
param_sep = GetPrgRes()->GetParamSepChar();
GetPrgRes()->GetInputDecimalPointChar(&input_comma1, &input_comma2);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2010, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -142,6 +142,8 @@ private:
char input_comma2;
char param_sep;
int grouping_digits;
/*
some buffers which we use in some method in the second thread,
it's better to have those buffers outside those methods -
@ -206,6 +208,7 @@ private:
conv.trim_zeroes = remove_zeroes;
conv.comma = decimal_point;
conv.group = grouping;
conv.group_digits = grouping_digits;
if( result.ToString(buffer2, conv) )
{

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2009, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -614,6 +614,22 @@ int ProgramResources::GetGrouping()
}
void ProgramResources::SetGroupingDigits(int digits)
{
grouping_digits = digits;
if( grouping_digits < 1 || grouping_digits > 9 )
grouping_digits = 3; // 3 by default
}
int ProgramResources::GetGroupingDigits()
{
return grouping_digits;
}
void ProgramResources::SetInputDecimalPoint(int p)
{
input_decimal_point = p;
@ -740,6 +756,7 @@ ProgramResources::ProgramResources()
decimal_point = 0; // output decimal point
angle_deg_rad_grad = 1; // rad is default
grouping = 0;
grouping_digits = 3;
input_decimal_point = 0; // dot or comma
param_sep = 0;
@ -916,6 +933,17 @@ static const char help_name[] = "ttcalc.chm";
/*
it is used when 'createconfig' parameter has been passed to the ttcalc program
*/
void ProgramResources::SetConfigName()
{
configuration_file = "ttcalc.ini";
}
bool ProgramResources::CreateDirIfNotExists(const std::string & app_dir)
{
bool success = false;
@ -1078,6 +1106,7 @@ IniParser iparser;
IniParser::Section temp_variables, temp_functions;
IniParser::Section::iterator ic;
std::string ini_value[30];
std::string language_setup;
iparser.ConvertValueToSmallLetters(false);
iparser.SectionCaseSensitive(false);
@ -1085,6 +1114,7 @@ std::string ini_value[30];
// we have variables and functions case-sensitive
iparser.PatternCaseSensitive(true);
iparser.Associate( "global|language.setup", &language_setup );
iparser.Associate( "global|always.on.top", &ini_value[0] );
iparser.Associate( "global|view", &ini_value[1] );
iparser.Associate( "global|maximized", &ini_value[2] );
@ -1113,6 +1143,7 @@ std::string ini_value[30];
iparser.Associate( "global|disp.param_sep", &ini_value[25] );
iparser.Associate( "global|update.onstartup", &ini_value[26] );
iparser.Associate( "global|update.last", &ini_value[27] );
iparser.Associate( "global|disp.grouping.digits", &ini_value[28] );
iparser.Associate( "variables", &temp_variables );
iparser.Associate( "functions", &temp_functions );
@ -1123,84 +1154,94 @@ std::string ini_value[30];
if( err == IniParser::err_cant_open_file )
return err;
AddVariablesFunctions(temp_variables, temp_functions, false);
// we're setting various values
always_on_top = bool( atoi(ini_value[0].c_str()) );
view = atoi(ini_value[1].c_str()) == 0 ? view_normal : view_compact;
maximized = bool( atoi(ini_value[2].c_str()) );
x_pos = atoi( ini_value[3].c_str() );
y_pos = atoi( ini_value[4].c_str() );
x_size = atoi( ini_value[5].c_str() );
y_size = atoi( ini_value[12].c_str() );
CheckCoordinates();
SetPrecision( atoi(ini_value[6].c_str()) );
SetBaseInput( atoi(ini_value[7].c_str()) );
SetBaseOutput( atoi(ini_value[8].c_str()) );
SetDisplayAlwaysScientific( bool(atoi(ini_value[9].c_str())) );
SetDisplayWhenScientific( atoi(ini_value[10].c_str()) );
SetDisplayRounding( atoi(ini_value[11].c_str()) );
// remove zeroes - in there is not in the config then will be true by default
// (from the constructor)
if( !ini_value[15].empty() )
SetRemovingZeroes( bool(atoi(ini_value[15].c_str())) );
if( ini_value[13] == "7" )
languages.SetCurrentLanguage(Languages::it);
else
if( ini_value[13] == "6" )
languages.SetCurrentLanguage(Languages::swe);
else
if( ini_value[13] == "5" )
languages.SetCurrentLanguage(Languages::ru);
else
if( ini_value[13] == "4" )
languages.SetCurrentLanguage(Languages::chn);
else
if( ini_value[13] == "3" )
languages.SetCurrentLanguage(Languages::da);
else
if( ini_value[13] == "2" )
languages.SetCurrentLanguage(Languages::sp);
else
if( ini_value[13] == "1" )
languages.SetCurrentLanguage(Languages::pl);
else
languages.SetCurrentLanguage(Languages::en);
SetDecimalPoint( atoi(ini_value[14].c_str()) );
SetDegRadGrad( atoi(ini_value[16].c_str()) );
pad_x_pos = atoi( ini_value[17].c_str() );
pad_y_pos = atoi( ini_value[18].c_str() );
pad_x_size = atoi( ini_value[19].c_str() );
pad_y_size = atoi( ini_value[20].c_str() );
pad_maximized = bool( atoi(ini_value[21].c_str()) );
show_pad = bool( atoi(ini_value[22].c_str()) );
CheckPadCoordinates();
SetGrouping( atoi(ini_value[23].c_str()) );
SetInputDecimalPoint( atoi(ini_value[24].c_str()) );
SetParamSep( atoi(ini_value[24].c_str()) );
if( err != IniParser::err_ok )
bad_line = iparser.GetBadLine();
// check update at startup - true by default (if there is not in the config)
// (default from the constructor)
if( !ini_value[26].empty() )
check_update_startup = bool( atoi(ini_value[26].c_str()) );
AddVariablesFunctions(temp_variables, temp_functions, false);
last_update = (time_t)atol(ini_value[27].c_str());
// the first file is created by the installer and has only language.setup option
// if the rest options are not set then we are not calling ReadGlobalSection()
if( IsGlobalSectionSet(ini_value, sizeof(ini_value)/sizeof(std::string)) )
ReadGlobalSection(ini_value);
if( !language_setup.empty() )
languages.SelectCurrentLanguage(language_setup); // we don't have to remember this variable
return err;
}
int ProgramResources::Int(const std::string & text)
{
return atoi(text.c_str());
}
bool ProgramResources::IsGlobalSectionSet(std::string * ini_value, size_t len)
{
for(size_t i=0 ; i<len ; ++i)
if( !ini_value[i].empty() )
return true;
return false;
}
void ProgramResources::ReadGlobalSection(std::string * ini_value)
{
always_on_top = Int(ini_value[0]) == 1;
view = Int(ini_value[1]) == 0 ? view_normal : view_compact;
maximized = Int(ini_value[2]) == 1;
x_pos = Int( ini_value[3] );
y_pos = Int( ini_value[4] );
x_size = Int( ini_value[5] );
y_size = Int( ini_value[12] );
CheckCoordinates();
SetPrecision( Int(ini_value[6]) );
SetBaseInput( Int(ini_value[7]) );
SetBaseOutput( Int(ini_value[8]) );
SetDisplayAlwaysScientific( Int(ini_value[9]) == 1 );
SetDisplayWhenScientific( Int(ini_value[10]) );
SetDisplayRounding( Int(ini_value[11]) );
languages.SetCurrentLanguage((Languages::Country)Int(ini_value[13]));
SetDecimalPoint( Int(ini_value[14]) );
// remove zeroes - if there is not in the config then will be true by default
// (from the constructor)
if( !ini_value[15].empty() )
SetRemovingZeroes( Int(ini_value[15]) == 1 );
SetDegRadGrad( Int(ini_value[16]) );
pad_x_pos = Int( ini_value[17] );
pad_y_pos = Int( ini_value[18] );
pad_x_size = Int( ini_value[19] );
pad_y_size = Int( ini_value[20] );
pad_maximized = Int(ini_value[21]) == 1;
show_pad = Int(ini_value[22]) == 1;
CheckPadCoordinates();
SetGrouping( Int(ini_value[23]) );
SetInputDecimalPoint( Int(ini_value[24]) );
SetParamSep( Int(ini_value[25]) );
// check update once a three day - true by default (if there is not in the config)
// (default from the constructor)
if( !ini_value[26].empty() )
check_update_startup = Int(ini_value[26]) == 1;
last_update = (time_t)atol(ini_value[27].c_str());
SetGroupingDigits( Int(ini_value[28]) );
}
void ProgramResources::SaveToFile()
{
@ -1241,6 +1282,7 @@ std::ofstream file( configuration_file.c_str() );
file << "disp.output_comma = " << decimal_point << std::endl;
file << "disp.deg_rad_grad = " << angle_deg_rad_grad << std::endl;
file << "disp.grouping = " << grouping << std::endl;
file << "disp.grouping.digits = " << grouping_digits << std::endl;
file << "disp.param_sep = " << param_sep << std::endl;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2009, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -336,6 +336,12 @@ public:
*/
void SetNameOfFiles();
/*!
it is used when 'createconfig' parameter has been passed to the ttcalc program
*/
void SetConfigName();
/*!
returning the name of the help file
@ -410,6 +416,14 @@ public:
int GetGrouping();
/*!
setting/getting how many digits should be groupped
digits can be from 1 to 9
*/
void SetGroupingDigits(int digits);
int GetGroupingDigits();
/*!
returning the grouping character
*/
@ -491,7 +505,9 @@ private:
void CheckCoordinates();
void CheckPadCoordinates();
void AddVariablesFunctions(IniParser::Section & temp_variables, IniParser::Section & temp_functions, bool if_not_exist);
void ReadGlobalSection(std::string * ini_value);
int Int(const std::string & text);
bool IsGlobalSectionSet(std::string * ini_value, size_t len);
ttmath::Objects variables;
ttmath::Objects functions;
@ -546,6 +562,7 @@ private:
bool remove_zeroes;
int angle_deg_rad_grad;
int grouping; // 0 - none, 1 - space, 2 - '`', 3 - '\'', 4 - '.', 5 - ','
int grouping_digits; // from 1 to 9
int input_decimal_point; // 0 - dot or comma, 1 - dot, 2 - comma
int param_sep; // parameters separator: 0 - semicolon, 1 - dot, 2 - comma

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2010, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -176,18 +176,19 @@
#define IDC_LABEL_DISPLAY_ROUNDING 1163
#define IDC_UPDOWN_DISPLAY_WHEN_SCIENTIFIC 1164
#define IDC_EDIT_DISPLAY_WHEN_SCIENTIFIC 1165
#define IDC_LABEL_GROUP_SCIENTIFIC 1166
#define IDC_LABEL_DISPLAY_SCIENTIFIC 1166
#define IDC_LABEL_OUTPUT_DECIMAL_POINT 1167
#define IDC_COMBO_OUTPUT_DECIMAL_POINT 1168
#define IDC_CHECK_REMOVE_ZEROES 1169
#define IDC_LABEL_DISPLAY_DEG_RAD_GRAD 1170
#define IDC_COMBO_DEG_RAD_GRAD 1171
#define IDC_COMBO_DISPLAY_GROUPING 1172
#define IDC_LABEL_DISPLAY_GROUPING 1173
#define IDC_COMBO_INPUT_DECIMAL_POINT 1174
#define IDC_LABEL_INPUT_DECIMAL_POINT 1175
#define IDC_LABEL_PARAM_SEPARATE 1176
#define IDC_COMBO_PARAM_SEPARATE 1177
#define IDC_COMBO_DISPLAY_GROUPING_DIGITS 1173
#define IDC_LABEL_DISPLAY_GROUPING 1174
#define IDC_COMBO_INPUT_DECIMAL_POINT 1175
#define IDC_LABEL_INPUT_DECIMAL_POINT 1176
#define IDC_LABEL_PARAM_SEPARATE 1177
#define IDC_COMBO_PARAM_SEPARATE 1178
// convert tab
#define IDC_LIST_UNIT_TYPE 1200
@ -223,6 +224,7 @@
#define IDM_LANGUAGE_RUSSIAN 40015
#define IDM_LANGUAGE_SWEDISH 40016
#define IDM_LANGUAGE_ITALIAN 40017
#define IDM_LANGUAGE_GERMAN 40018
#define IDM_CLOSE_PROGRAM 40020
#define IDM_EDIT_UNDO 40030

View File

@ -35,6 +35,7 @@ BEGIN
MENUITEM "Russian", IDM_LANGUAGE_RUSSIAN
MENUITEM "Swedish", IDM_LANGUAGE_SWEDISH
MENUITEM "Italian", IDM_LANGUAGE_ITALIAN
MENUITEM "German", IDM_LANGUAGE_GERMAN
END
MENUITEM SEPARATOR
MENUITEM "Close", IDM_CLOSE_PROGRAM
@ -92,7 +93,7 @@ BEGIN
END
101 DIALOGEX 0, 0, 295, 189
IDD_MAIN_DIALOG DIALOGEX 0, 0, 295, 189
STYLE DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION |
WS_SYSMENU | WS_THICKFRAME
CAPTION "TTCalc"
@ -106,7 +107,7 @@ BEGIN
END
102 DIALOG DISCARDABLE 0, 0, 358, 61
IDD_DIALOG_ADD_VARIABLE DIALOG DISCARDABLE 0, 0, 358, 61
STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU
CAPTION "Add a new variable"
@ -120,7 +121,7 @@ BEGIN
LTEXT "value:",IDC_STATIC_VARIABLE_VALUE,7,30,38,8
END
103 DIALOG DISCARDABLE 0, 0, 370, 74
IDD_DIALOG_ADD_FUNCTION DIALOG DISCARDABLE 0, 0, 370, 74
STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU
FONT 8, "Ms Shell Dlg"
@ -136,7 +137,7 @@ BEGIN
END
110 DIALOG DISCARDABLE 0, 0, 288, 107
IDD_DIALOG_STANDARD DIALOG DISCARDABLE 0, 0, 288, 107
STYLE DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_GROUP | WS_TABSTOP
FONT 8, "Ms Shell Dlg"
BEGIN
@ -195,7 +196,7 @@ BEGIN
END
111 DIALOG 0, 0, 288, 107
IDD_DIALOG_VARIABLES DIALOG 0, 0, 288, 107
STYLE DS_3DLOOK |DS_FIXEDSYS |DS_SETFONT |WS_CHILD | WS_TABSTOP |WS_GROUP
CAPTION "tab2"
FONT 8, "Ms Shell Dlg"
@ -206,7 +207,7 @@ BEGIN
CONTROL "",IDC_VARIABLES_LIST,"SysListView32",LVS_REPORT |LVS_SHOWSELALWAYS |LVS_SORTASCENDING |LVS_ALIGNLEFT |WS_CHILD |WS_BORDER |WS_TABSTOP |WS_VISIBLE ,57,3,223,85
END
112 DIALOG 0, 0, 288, 107
IDD_DIALOG_FUNCTIONS DIALOG 0, 0, 288, 107
STYLE DS_3DLOOK |DS_FIXEDSYS |DS_SETFONT |WS_CHILD | WS_TABSTOP |WS_GROUP
CAPTION "tab3"
FONT 8, "Ms Shell Dlg"
@ -219,7 +220,7 @@ END
#ifndef TTCALC_PORTABLE
113 DIALOG DISCARDABLE 0, 0, 288, 107
IDD_DIALOG_PRECISION DIALOG DISCARDABLE 0, 0, 288, 107
STYLE DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_CAPTION | WS_GROUP |
WS_TABSTOP
CAPTION "tab4"
@ -243,7 +244,7 @@ END
#endif
114 DIALOG DISCARDABLE 0, 0, 288, 107
IDD_DIALOG_DISPLAY DIALOG DISCARDABLE 0, 0, 288, 107
STYLE DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_CAPTION | WS_GROUP |
WS_TABSTOP
CAPTION "tab5"
@ -271,7 +272,9 @@ BEGIN
WS_TABSTOP
COMBOBOX IDC_COMBO_DISPLAY_ROUNDING,61,30,59,200,CBS_DROPDOWNLIST |
WS_TABSTOP
COMBOBOX IDC_COMBO_DISPLAY_GROUPING,61,44,59,112,CBS_DROPDOWNLIST |
COMBOBOX IDC_COMBO_DISPLAY_GROUPING,61,44,59,100,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COMBO_DISPLAY_GROUPING_DIGITS,61,58,59,100,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COMBO_INPUT_DECIMAL_POINT,234,2,49,56,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@ -295,14 +298,13 @@ BEGIN
CONTROL "",IDC_UPDOWN_DISPLAY_WHEN_SCIENTIFIC,"msctls_updown32",
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS,276,84,
11,14
GROUPBOX "Print scientific value",IDC_LABEL_GROUP_SCIENTIFIC,8,75,
275,27
GROUPBOX "Print scientific value",IDC_LABEL_DISPLAY_SCIENTIFIC,8,76,275,26
END
#ifdef TTCALC_CONVERT
115 DIALOG DISCARDABLE 0, 0, 288, 107
IDD_DIALOG_CONVERT DIALOG DISCARDABLE 0, 0, 288, 107
STYLE DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_CAPTION | WS_GROUP |
WS_TABSTOP
CAPTION "tab6"
@ -335,7 +337,7 @@ END
#endif
#ifndef TTCALC_PORTABLE
200 DIALOG DISCARDABLE 0, 0, 349, 284
IDD_ABOUT_DIALOG DIALOG DISCARDABLE 0, 0, 349, 284
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CAPTION "About"
@ -347,32 +349,32 @@ BEGIN
DEFPUSHBUTTON "Close",IDOK,191,259,86,14
END
#else
200 DIALOG DISCARDABLE 0, 0, 268, 322
IDD_ABOUT_DIALOG DIALOG DISCARDABLE 0, 0, 268, 362
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CAPTION "About"
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT IDC_ABOUT_TEXT,16,18,234,269,ES_MULTILINE | ES_READONLY |
EDITTEXT IDC_ABOUT_TEXT,16,18,234,315,ES_MULTILINE | ES_READONLY |
NOT WS_BORDER | NOT WS_TABSTOP
DEFPUSHBUTTON "Close",IDOK,90,292,86,14
DEFPUSHBUTTON "Close",IDOK,90,339,86,14
END
#endif
IDD_UPDATE_DIALOG DIALOG DISCARDABLE 0, 0, 357, 86
IDD_UPDATE_DIALOG DIALOG DISCARDABLE 0, 0, 409, 87
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Check for update"
FONT 8, "MS Sans Serif"
BEGIN
CTEXT "Checking for update",IDC_UPDATE_INFO1,7,15,343,10
CTEXT "Checking for update",IDC_UPDATE_INFO1,7,15,394,10
CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER,7,
38,343,14
DEFPUSHBUTTON "Next",IDC_BUTTON_NEXT,226,65,60,14
PUSHBUTTON "Cancel",IDC_BUTTON_CANCEL,290,65,60,14
CTEXT "url",IDC_UPDATE_INFO2,7,26,343,8
38,395,14
DEFPUSHBUTTON "Next",IDC_BUTTON_NEXT,279,65,60,14
PUSHBUTTON "Cancel",IDC_BUTTON_CANCEL,342,65,60,14
CTEXT "url",IDC_UPDATE_INFO2,7,26,394,8
CONTROL "Always check for the update on sturtup",
IDC_CHECK_UPDATE_STURTUP,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,7,67,206,10
WS_TABSTOP,7,67,269,10
END
#ifndef TTCALC_PORTABLE

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2009, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -56,6 +56,176 @@ void PrintErrorCode()
GetPrgRes()->GetLanguages()->ErrorMessage(last_code) );
}
int CalcBracketsPrev(const char * buf, int start)
{
int last;
int brackets;
last = start;
--start;
while( true )
{
for( ; start>=0 && buf[start]!=';' ; --start )
if( buf[start] != ' ' )
last = start;
if( start <= 0 )
return last;
--start; // skipping a semicolon
brackets = 0;
for( ; start>=0 ; --start )
{
if( buf[start] == '(' )
++brackets;
else
if( buf[start] == ')' )
--brackets;
if( brackets > 0 )
{
last = start;
break;
}
}
}
}
int CalcBracketsNext(const char * buf, int size, int start)
{
int last;
int brackets;
if( start >= size )
return size;
last = start;
while( true )
{
for( ; start<size && buf[start]!=';' ; ++start )
if( buf[start] != ' ' )
last = start;
if( start >= size )
{
if( buf[last] == ';' || buf[last] == ' ' )
return last;
else
return last+1;
}
++start; // skipping a semicolon
brackets = 0;
for( ; start<size ; ++start )
{
if( buf[start] == '(' )
++brackets;
else
if( buf[start] == ')' )
--brackets;
if( brackets < 0 )
{
last = start;
break;
}
}
}
}
bool IsWhite(int c)
{
return c==' ' || c=='\t';
}
bool IsOpeningOperand(int c)
{
return c=='-' || c=='+' || c=='*' ||c=='/' || c=='%' ||c=='^' || c=='(';
}
bool IsOpeningOperandBefore(const char * buf, int end)
{
while( end > 0 && IsWhite(buf[end-1]) )
end -= 1;
if( end == 0 )
return false;
return IsOpeningOperand(buf[end-1]);
}
void CalcBracketsPos(HWND input, int & start, int & end)
{
DWORD sel_start, sel_end;
SendMessage(input, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end);
start = sel_start;
end = sel_end;
if( start != end )
return;
char * buf = GetPrgRes()->GetBufferTemp();
int len = SendMessage(input, WM_GETTEXT, GetPrgRes()->GetBufferSize(), (LPARAM)buf);
if( len > 0 && !IsOpeningOperandBefore(buf, end) )
{
start = CalcBracketsPrev(buf, sel_start);
end = CalcBracketsNext(buf, len, sel_start);
}
}
void InsertText(const char * first, const char * last, int cursor_back = 0)
{
HWND input = GetDlgItem(GetPrgRes()->GetMainWindow(), IDC_INPUT_EDIT);
int start, end;
CalcBracketsPos(input, start, end);
size_t len_first = strlen(first);
SendMessage(input, EM_SETSEL, start, start);
SendMessage(input, EM_REPLACESEL, 1, LPARAM(first));
SendMessage(input, EM_SETSEL, end+len_first, end+len_first);
SendMessage(input, EM_REPLACESEL, 1, LPARAM(last));
if( start == end )
{
// was empty string - we're setting the cursor inside the texts
SendMessage(input, EM_SETSEL, end+len_first, end+len_first);
}
else
{
size_t len_last = strlen(last);
SendMessage(input, EM_SETSEL, end+len_first+len_last-cursor_back, end+len_first+len_last-cursor_back);
}
SetFocus(input);
}
/*
this functions inserts a given string into the first edit control
and then moves the caret
@ -117,7 +287,7 @@ return true;
BOOL WmTabCommand_Press_sin(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("sin()",-1);
InsertText("sin(", ")");
return true;
}
@ -125,7 +295,7 @@ return true;
BOOL WmTabCommand_Press_cos(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("cos()",-1);
InsertText("cos(", ")");
return true;
}
@ -133,7 +303,7 @@ return true;
BOOL WmTabCommand_Press_tan(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("tan()",-1);
InsertText("tan(", ")");
return true;
}
@ -141,7 +311,7 @@ return true;
BOOL WmTabCommand_Press_cot(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("cot()",-1);
InsertText("cot(", ")");
return true;
}
@ -149,7 +319,7 @@ return true;
BOOL WmTabCommand_Press_ln(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("ln()",-1);
InsertText("ln(", ")");
return true;
}
@ -157,7 +327,7 @@ return true;
BOOL WmTabCommand_Press_log(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("log( ; 2)",-5);
InsertText("log(", " ; )", 1);
return true;
}
@ -165,7 +335,7 @@ return true;
BOOL WmTabCommand_Press_abs(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("abs()",-1);
InsertText("abs(", ")");
return true;
}
@ -173,7 +343,7 @@ return true;
BOOL WmTabCommand_Press_factorial(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("factorial()",-1);
InsertText("factorial(", ")");
return true;
}
@ -251,38 +421,42 @@ return true;
BOOL WmTabCommand_Press_asin(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("asin()",-1);
InsertText("asin(", ")");
return true;
}
BOOL WmTabCommand_Press_acos(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("acos()",-1);
InsertText("acos(", ")");
return true;
}
BOOL WmTabCommand_Press_atan(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("atan()",-1);
InsertText("atan(", ")");
return true;
}
BOOL WmTabCommand_Press_acot(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("acot()",-1);
InsertText("acot(", ")");
return true;
}
BOOL WmTabCommand_Press_sgn(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("sgn()",-1);
InsertText("sgn(", ")");
return true;
}
BOOL WmTabCommand_Press_mod(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("mod(;)",-2);
InsertText("mod(", " ; )", 1);
return true;
}
@ -298,7 +472,7 @@ return true;
BOOL WmTabCommand_Press_int(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("int()",-1);
InsertText("int(", ")");
return true;
}
@ -306,7 +480,7 @@ return true;
BOOL WmTabCommand_Press_round(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("round()",-1);
InsertText("round(", ")");
return true;
}
@ -314,7 +488,7 @@ return true;
BOOL WmTabCommand_Press_exp(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("exp()",-1);
InsertText("exp(", ")");
return true;
}
@ -349,6 +523,24 @@ BOOL WmTabCommand_IDCANCEL(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam
return true;
}
// pos is the 'grouping' position (0 means none)
void SetDisablingGroupingDigits(HWND hWnd, int pos = -1)
{
if( pos < 0 )
pos = SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_GETCURSEL, 0, 0);
if( pos <= 0 )
{
EnableWindow(GetDlgItem(hWnd, IDC_COMBO_DISPLAY_GROUPING_DIGITS), false);
}
else
{
EnableWindow(GetDlgItem(hWnd, IDC_COMBO_DISPLAY_GROUPING_DIGITS), true);
}
}
void SetLanguageTabStandard(HWND hWnd)
{
SetDlgItemText( hWnd,IDC_BUTTON_CLEAR, GetPrgRes()->GetLanguages()->GuiMessage(Languages::button_clear) );
@ -412,19 +604,18 @@ void SetLanguageTabPrecision(HWND hWnd)
}
void SetLanguageTabDisplay(HWND hWnd)
void SetLanguageTabDisplayComboRounding(HWND hWnd)
{
char buffer[50];
int i;
const int max_r = 9;
Languages * pl = GetPrgRes()->GetLanguages();
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_ROUNDING, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_ROUNDING, CB_ADDSTRING, 0, (LPARAM)pl->GuiMessage(Languages::combo_rounding_none) );
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_ROUNDING, CB_ADDSTRING, 0, (LPARAM)pl->GuiMessage(Languages::combo_rounding_integer) );
const int max_r = 9;
for(i=1 ; i<=max_r ; ++i)
{
sprintf(buffer,"%s %d %s",
@ -436,12 +627,58 @@ int i;
}
int r = GetPrgRes()->GetDisplayRounding();
if( r > max_r )
r = max_r;
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_ROUNDING, CB_SETCURSEL, r+1, 0);
}
void SetLanguageTabDisplayComboGrouping(HWND hWnd)
{
char buffer[50];
int i;
const int max_r = 9;
Languages * pl = GetPrgRes()->GetLanguages();
// grouping
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)pl->GuiMessage(Languages::display_grouping_none));
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)pl->GuiMessage(Languages::display_grouping_space));
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)" `");
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)" '");
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)" .");
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)" ,");
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_SETCURSEL, GetPrgRes()->GetGrouping(), 0);
// grouping digits
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING_DIGITS, CB_RESETCONTENT, 0, 0);
for(i=1 ; i<=max_r ; ++i)
{
sprintf(buffer,"%d %s", i, pl->GuiMessage(Languages::display_grouping_digits) );
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING_DIGITS, CB_ADDSTRING, 0, (LPARAM)buffer);
}
int r = GetPrgRes()->GetGroupingDigits();
if( r > max_r )
r = max_r;
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING_DIGITS, CB_SETCURSEL, r-1, 0);
}
void SetLanguageTabDisplay(HWND hWnd)
{
Languages * pl = GetPrgRes()->GetLanguages();
SetLanguageTabDisplayComboRounding(hWnd);
SetLanguageTabDisplayComboGrouping(hWnd);
SetDisablingGroupingDigits(hWnd, GetPrgRes()->GetGrouping());
SetDlgItemText(hWnd, IDC_LABEL_DISPLAY_INPUT, pl->GuiMessage(Languages::display_input));
SetDlgItemText(hWnd, IDC_LABEL_DISPLAY_OUTPUT, pl->GuiMessage(Languages::display_output));
SetDlgItemText(hWnd, IDC_LABEL_DISPLAY_ROUNDING, pl->GuiMessage(Languages::display_rounding));
@ -453,19 +690,10 @@ int i;
SetDlgItemText(hWnd, IDC_RADIO_DISPLAY_ALWAYS_SCIENTIFIC, pl->GuiMessage(Languages::display_always_scientific));
SetDlgItemText(hWnd, IDC_RADIO_DISPLAY_NOT_ALWAYS_SCIENTIFIC, pl->GuiMessage(Languages::display_not_always_scientific));
SetDlgItemText(hWnd, IDC_LABEL_GROUP_SCIENTIFIC, pl->GuiMessage(Languages::display_group_scientific));
SetDlgItemText(hWnd, IDC_LABEL_DISPLAY_SCIENTIFIC, pl->GuiMessage(Languages::display_as_scientific));
SetDlgItemText(hWnd, IDC_CHECK_REMOVE_ZEROES, pl->GuiMessage(Languages::check_remove_zeroes));
SetDlgItemText(hWnd, IDC_LABEL_DISPLAY_DEG_RAD_GRAD, pl->GuiMessage(Languages::display_deg_rad_grad));
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)pl->GuiMessage(Languages::display_grouping_none));
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)pl->GuiMessage(Languages::display_grouping_space));
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)" `");
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)" '");
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)" .");
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_ADDSTRING, 0, (LPARAM)" ,");
SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_SETCURSEL, GetPrgRes()->GetGrouping(), 0);
SendDlgItemMessage(hWnd, IDC_COMBO_INPUT_DECIMAL_POINT, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage(hWnd, IDC_COMBO_INPUT_DECIMAL_POINT, CB_ADDSTRING, 0, (LPARAM)pl->GuiMessage(Languages::display_input_decimal_point_item1));
SendDlgItemMessage(hWnd, IDC_COMBO_INPUT_DECIMAL_POINT, CB_ADDSTRING, 0, (LPARAM)" .");
@ -730,6 +958,7 @@ TCITEM tab;
}
BOOL WmTabCommand_SetPrecision1(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
#ifndef TTCALC_PORTABLE
@ -866,6 +1095,23 @@ return true;
}
void SetDisablingDisplayWhenScientific(HWND hWnd)
{
if( IsDlgButtonChecked(hWnd, IDC_RADIO_DISPLAY_ALWAYS_SCIENTIFIC) == BST_CHECKED )
{
EnableWindow(GetDlgItem(hWnd, IDC_UPDOWN_DISPLAY_WHEN_SCIENTIFIC), false);
EnableWindow(GetDlgItem(hWnd, IDC_EDIT_DISPLAY_WHEN_SCIENTIFIC), false);
}
else
{
EnableWindow(GetDlgItem(hWnd, IDC_UPDOWN_DISPLAY_WHEN_SCIENTIFIC), true);
EnableWindow(GetDlgItem(hWnd, IDC_EDIT_DISPLAY_WHEN_SCIENTIFIC), true);
}
}
BOOL WmTabCommand_DisplayGrouping(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
if( HIWORD(wParam) != CBN_SELCHANGE )
@ -873,8 +1119,11 @@ BOOL WmTabCommand_DisplayGrouping(HWND hWnd, UINT message, WPARAM wParam, LPARAM
GetPrgRes()->GetThreadController()->StopCalculating();
GetPrgRes()->SetGrouping( (int)SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING, CB_GETCURSEL, 0, 0) );
GetPrgRes()->SetGroupingDigits( (int)SendDlgItemMessage(hWnd, IDC_COMBO_DISPLAY_GROUPING_DIGITS, CB_GETCURSEL, 0, 0) + 1 );
GetPrgRes()->GetThreadController()->StartCalculating();
SetDisablingGroupingDigits(hWnd, GetPrgRes()->GetGrouping());
return true;
}
@ -906,19 +1155,6 @@ return true;
}
void SetDisablingDisplayWhenScientific(HWND hWnd)
{
if( IsDlgButtonChecked(hWnd, IDC_RADIO_DISPLAY_ALWAYS_SCIENTIFIC) == BST_CHECKED )
{
EnableWindow(GetDlgItem(hWnd, IDC_UPDOWN_DISPLAY_WHEN_SCIENTIFIC), false);
EnableWindow(GetDlgItem(hWnd, IDC_EDIT_DISPLAY_WHEN_SCIENTIFIC), false);
}
else
{
EnableWindow(GetDlgItem(hWnd, IDC_UPDOWN_DISPLAY_WHEN_SCIENTIFIC), true);
EnableWindow(GetDlgItem(hWnd, IDC_EDIT_DISPLAY_WHEN_SCIENTIFIC), true);
}
}
BOOL WmTabCommand_SetDisplayAlwaysScientific(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
@ -990,140 +1226,11 @@ return true;
int CalcBracketsPrev(const char * buf, int start)
{
int last;
int brackets;
last = start;
--start;
while( true )
{
for( ; start>=0 && buf[start]!=';' ; --start )
if( buf[start] != ' ' )
last = start;
if( start <= 0 )
return last;
--start; // skipping a semicolon
brackets = 0;
for( ; start>=0 ; --start )
{
if( buf[start] == '(' )
++brackets;
else
if( buf[start] == ')' )
--brackets;
if( brackets > 0 )
{
last = start;
break;
}
}
}
}
int CalcBracketsNext(const char * buf, int size, int start)
{
int last;
int brackets;
if( start >= size )
return size;
last = start;
while( true )
{
for( ; start<size && buf[start]!=';' ; ++start )
if( buf[start] != ' ' )
last = start;
if( start >= size )
{
if( buf[last] == ';' || buf[last] == ' ' )
return last;
else
return last+1;
}
++start; // skipping a semicolon
brackets = 0;
for( ; start<size ; ++start )
{
if( buf[start] == '(' )
++brackets;
else
if( buf[start] == ')' )
--brackets;
if( brackets < 0 )
{
last = start;
break;
}
}
}
}
void CalcBracketsPos(HWND input, int & start, int & end)
{
DWORD sel_start, sel_end;
SendMessage(input, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end);
if( sel_start != sel_end )
{
start = sel_start;
end = sel_end;
return;
}
start = 0;
end = SendMessage(input, EM_LINELENGTH, 0, 0);
if( end > 0 )
{
const char * buf = new char[end+sizeof(WORD)];
*(WORD*)(buf) = end;
SendMessage(input, EM_GETLINE, 0, (LPARAM)buf);
start = CalcBracketsPrev(buf, sel_start);
end = CalcBracketsNext(buf, end, sel_start);
delete [] buf;
}
}
BOOL WmTabCommand_Press_bracketsall(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND main = GetPrgRes()->GetMainWindow();
HWND input = GetDlgItem(main, IDC_INPUT_EDIT);
int start, end;
CalcBracketsPos(input, start, end);
SendMessage(input, EM_SETSEL, start, start);
SendMessage(input, EM_REPLACESEL, 1, LPARAM("("));
SendMessage(input, EM_SETSEL, end+1, end+1);
SendMessage(input, EM_REPLACESEL, 1, LPARAM(")"));
if( start == end )
// was empty string - we're setting the cursor inside the brackets
SendMessage(input, EM_SETSEL, end+1, end+1);
SetFocus(input);
InsertText("(", ")");
return true;
}
@ -1131,23 +1238,7 @@ return true;
BOOL WmTabCommand_Press_1div_bracketsall(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND main = GetPrgRes()->GetMainWindow();
HWND input = GetDlgItem(main, IDC_INPUT_EDIT);
int start, end;
CalcBracketsPos(input, start, end);
SendMessage(input, EM_SETSEL, start, start);
SendMessage(input, EM_REPLACESEL, 1, LPARAM("1/("));
SendMessage(input, EM_SETSEL, end+3, end+3);
SendMessage(input, EM_REPLACESEL, 1, LPARAM(")"));
if( start == end )
// was empty string - we're setting the cursor inside the brackets
SendMessage(input, EM_SETSEL, end+3, end+3);
SetFocus(input);
InsertText("1/(", ")");
return true;
}
@ -1171,7 +1262,7 @@ return true;
BOOL WmTabCommand_Press_floor(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("floor()", -1);
InsertText("floor(", ")");
return true;
}
@ -1179,7 +1270,7 @@ return true;
BOOL WmTabCommand_Press_ceil(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("ceil()", -1);
InsertText("ceil(", ")");
return true;
}
@ -1187,7 +1278,7 @@ return true;
BOOL WmTabCommand_Press_min(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("min()", -1);
InsertText("min(", ")");
return true;
}
@ -1195,7 +1286,7 @@ return true;
BOOL WmTabCommand_Press_max(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("max()", -1);
InsertText("max(", ")");
return true;
}
@ -1203,7 +1294,7 @@ return true;
BOOL WmTabCommand_Press_avg(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("avg()", -1);
InsertText("avg(", ")");
return true;
}
@ -1211,7 +1302,7 @@ return true;
BOOL WmTabCommand_Press_sum(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("sum()", -1);
InsertText("sum(", ")");
return true;
}
@ -1219,7 +1310,7 @@ return true;
BOOL WmTabCommand_Press_root(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("root( ; 2)", -5);
InsertText("root(", " ; )", 1);
return true;
}
@ -1227,14 +1318,14 @@ return true;
BOOL WmTabCommand_Press_gamma(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("gamma()", -1);
InsertText("gamma(", ")");
return true;
}
BOOL WmTabCommand_Press_sqrt(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
InsertText("sqrt()", -1);
InsertText("sqrt(", ")");
return true;
}
@ -1333,6 +1424,7 @@ void CreateTabCommandMessagesTable(Messages<BOOL> & cmessages)
cmessages.Associate(IDC_COMBO_OUTPUT_DECIMAL_POINT, WmTabCommand_DisplayDecimalPointChanged);
cmessages.Associate(IDC_COMBO_DEG_RAD_GRAD, WmTabCommand_DisplayDegRadGradChanged);
cmessages.Associate(IDC_COMBO_DISPLAY_GROUPING, WmTabCommand_DisplayGrouping);
cmessages.Associate(IDC_COMBO_DISPLAY_GROUPING_DIGITS, WmTabCommand_DisplayGrouping);
cmessages.Associate(IDC_COMBO_INPUT_DECIMAL_POINT, WmTabCommand_DisplayInputDecimalPoint);
cmessages.Associate(IDC_COMBO_PARAM_SEPARATE, WmTabCommand_DisplayParamSep);
}
@ -1471,16 +1563,19 @@ BOOL WmInitTabVariables(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND list = GetDlgItem(hWnd, IDC_VARIABLES_LIST);
LVCOLUMN column;
RECT r;
//int list_cx = SetSizeOfList(list);
int list_cx = 280;
GetWindowRect(list, &r);
int list_cx = r.right - r.left;
int header1_cx = 70;
column.mask = LVCF_TEXT | LVCF_WIDTH;
column.cx = 60;
column.cx = header1_cx;
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_variables_header_1) );
ListView_InsertColumn(list, 0, &column);
column.cx = list_cx - 60 - 10;
column.cx = list_cx - header1_cx;
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_variables_header_2) );
ListView_InsertColumn(list, 1, &column);
@ -1497,20 +1592,24 @@ BOOL WmInitTabFunctions(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND list = GetDlgItem(hWnd, IDC_FUNCTIONS_LIST);
LVCOLUMN column;
RECT r;
//int list_cx = SetSizeOfList(list);
int list_cx = 280;
GetWindowRect(list, &r);
int list_cx = r.right - r.left;
int header1_cx = 70;
int header2_cx = 70;
column.mask = LVCF_TEXT | LVCF_WIDTH;
column.cx = 60;
column.cx = header1_cx;
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_1) );
ListView_InsertColumn(list, 0, &column);
column.cx = 40;
column.cx = header2_cx;
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_2) );
ListView_InsertColumn(list, 1, &column);
column.cx = list_cx - 60 - 40 - 10;
column.cx = list_cx - header1_cx - header2_cx;
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_3) );
ListView_InsertColumn(list, 2, &column);
@ -1579,6 +1678,7 @@ char buffer[20];
CheckDlgButton(hWnd, IDC_RADIO_DISPLAY_NOT_ALWAYS_SCIENTIFIC, BST_CHECKED);
SetDisablingDisplayWhenScientific(hWnd);
SetDisablingGroupingDigits(hWnd);
SendDlgItemMessage(hWnd, IDC_UPDOWN_DISPLAY_WHEN_SCIENTIFIC, UDM_SETBASE, 10,0);
SendDlgItemMessage(hWnd, IDC_UPDOWN_DISPLAY_WHEN_SCIENTIFIC, UDM_SETRANGE, 0, MAKELONG(99,1));

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2010, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -599,7 +599,7 @@ using namespace Background;
if( CheckUpdateFromIni(0, url_, remote_file_name_, major_, minor_, revision_, prerelease_, 0) )
{
HWND main = GetPrgRes()->GetMainWindow();
SendMessage(main, WM_UPDATE_EXISTS, 0, 0);
PostMessage(main, WM_UPDATE_EXISTS, 0, 0);
}
}
catch(...)
@ -658,8 +658,8 @@ void CheckUpdateInBackground()
time_t last = GetPrgRes()->GetLastUpdate();
time_t now = time(0);
// testing only once a day (86400 = 60*60*24)
if( GetPrgRes()->GetCheckUpdateStartup() && last+86400 < now )
// testing only once a three days (259200 = 60*60*24 * 3)
if( GetPrgRes()->GetCheckUpdateStartup() && last+259200 < now )
{
// this setting can be added also when a user selects manually the test for an update
GetPrgRes()->SetLastUpdate(now);

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2009, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -97,9 +97,14 @@ char * pchar;
SetDlgItemText(hWnd,IDC_EDIT_VARIABLE_VALUE, value.c_str());
if( adding)
{
SetFocus(GetDlgItem(hWnd,IDC_EDIT_VARIABLE_NAME));
}
else
{
SetFocus(GetDlgItem(hWnd,IDC_EDIT_VARIABLE_VALUE));
SendDlgItemMessage(hWnd, IDC_EDIT_VARIABLE_VALUE, EM_SETSEL, value.size(), value.size());
}
return false;
@ -263,6 +268,8 @@ BOOL WmTabCommand_AddVariable(HWND, UINT message, WPARAM wParam, LPARAM lParam)
{
int id = AddNewItemToVariableList(list, name, value);
SelectOnlyOneItem(list,id);
GetPrgRes()->ReadVariablesFunctionsFromFile();
GetPrgRes()->SaveToFile();
}
}
while( code != ttmath::err_ok );
@ -324,7 +331,11 @@ adding = false;
if( code != ttmath::err_ok )
ShowError(list, code);
else
{
ChangeItemInVariableList(list, id, old_name, name, value);
GetPrgRes()->ReadVariablesFunctionsFromFile();
GetPrgRes()->SaveToFile();
}
}
while( code != ttmath::err_ok );
@ -357,6 +368,7 @@ int items = ListView_GetSelectedCount(list);
char * buffer = new char[buffer_size];
bool all_deleted = true;
GetPrgRes()->ReadVariablesFunctionsFromFile();
GetPrgRes()->GetThreadController()->StopCalculating();
for( id = ListView_GetItemCount(list)-1 ; id!=-1 ; --id )
@ -375,6 +387,7 @@ int items = ListView_GetSelectedCount(list);
GetPrgRes()->GetThreadController()->StartCalculating();
GetPrgRes()->SaveToFile();
delete [] buffer;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2009, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -51,8 +51,15 @@
/*!
the application starts here
*/
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR par, int)
{
if( strcmp(par, "createconfig") == 0 )
{
GetPrgRes()->SetConfigName();
GetPrgRes()->SaveToFile();
return 0;
}
try
{
GetPrgRes()->SetInstance(hInstance);
@ -109,8 +116,8 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
// there can be another variables/functions saved by other instantion of TTCalc
// we're reading them now
GetPrgRes()->ReadVariablesFunctionsFromFile();
GetPrgRes()->SaveToFile();
DestroyPadWindow();
CloseHandle( (HANDLE)thread_handle );

View File

@ -1,19 +1,18 @@
# this file is downloaded from a webserver during checking for an update
[normal]
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.2/ttcalc-0.9.2-setup.exe
filename = ttcalc-0.9.2-setup.exe
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.3/ttcalc-0.9.3-setup.exe
filename = ttcalc-0.9.3-setup.exe
version.major = 0
version.minor = 9
version.revision = 2
version.revision = 3
version.prerelease = 0
[portable]
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.2/ttcalc-portable-0.9.2-bin.tar.gz
filename = ttcalc-portable-0.9.2-bin.tar.gz
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.3/ttcalc-portable-0.9.3-bin.zip
filename = ttcalc-portable-0.9.3-bin.zip
version.major = 0
version.minor = 9
version.revision = 2
version.revision = 3
version.prerelease = 0