Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
e87308c721 | |||
eb7cec8ecc | |||
f67657c026 | |||
300f1aaa5f | |||
cfcb654e53 | |||
9e25a7bc7a | |||
c3a35102a3 | |||
29f1aa1c8b | |||
56fea5a67c | |||
47e4d83eab | |||
48d182a05f |
34
CHANGELOG
34
CHANGELOG
@@ -1,3 +1,37 @@
|
|||||||
|
Version 0.9.2 (2010.09.24):
|
||||||
|
* added: Italian translation made by
|
||||||
|
Damiano Monaco <dmonax at gmail.com>
|
||||||
|
* added: menu: edit->swap (ctrl+W)
|
||||||
|
swapping the input for the output edit
|
||||||
|
|
||||||
|
Changes from TTMath 0.9.2 relating to TTCalc:
|
||||||
|
* fixed: Big::Add() sometimes incorrectly rounded the last bit from its mantissa
|
||||||
|
* fixed: Big::ToString method
|
||||||
|
in some cases when in the output string the exponent should be equal zero
|
||||||
|
the method changes the exponent to one so the last digit from the mantissa
|
||||||
|
was lost
|
||||||
|
|
||||||
|
|
||||||
|
Version 0.9.1 (2010.02.07):
|
||||||
|
* fixed: the pad window didn't take into account following options (from display tab):
|
||||||
|
grouping, input commas and parameter separators
|
||||||
|
* updated: Chinese translation
|
||||||
|
|
||||||
|
Changes from TTMath 0.9.1 relating to TTCalc:
|
||||||
|
* fixed: the parser didn't use characters for changing the base (# and &)
|
||||||
|
those characters were skipped
|
||||||
|
(this bug was introduced in 0.9.0)
|
||||||
|
* fixed: added in the parser: operator's associativity
|
||||||
|
operator ^ (powering) is right-associative:
|
||||||
|
sample: 2^3^4 is equal 2^(3^4) and it is: 2.41e+24
|
||||||
|
previously was: 2^3^4 = (2^3)^4 = 4096
|
||||||
|
* changed: in Big::ToString() the base rounding is made only if the result value
|
||||||
|
would not be an integer, e.g. if the value is 1.999999999999 then
|
||||||
|
the base rounding will not be done - because as the result would be 2
|
||||||
|
* added: IEEE 754 half-to-even rounding (bankers' rounding) to the following
|
||||||
|
floating point algorithms: Big::Add, Big::Sub, Big::Mul, Big::Div
|
||||||
|
|
||||||
|
|
||||||
Version 0.9.0 (2009.11.25):
|
Version 0.9.0 (2009.11.25):
|
||||||
* fixed: when 'C' button was pressed, the cursor was not placed in the edit window
|
* fixed: when 'C' button was pressed, the cursor was not placed in the edit window
|
||||||
* added: Pad window - a multiline edit window
|
* added: Pad window - a multiline edit window
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2006-2009, Tomasz Sowa
|
Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
3
README
3
README
@@ -17,7 +17,8 @@ display values with the base (radix) from two to sixteen.
|
|||||||
Author: Tomasz Sowa
|
Author: Tomasz Sowa
|
||||||
Contact: t.sowa@ttmath.org
|
Contact: t.sowa@ttmath.org
|
||||||
Licence: BSD (open source)
|
Licence: BSD (open source)
|
||||||
Interface: English, Polish, Spanish, Danish, Chinese, Russian, Swedish
|
Interface: English, Polish, Spanish, Danish, Chinese, Russian,
|
||||||
|
Swedish, Italian
|
||||||
Project page: http://ttcalc.sourceforge.net/
|
Project page: http://ttcalc.sourceforge.net/
|
||||||
Bignum library: TTMath http://www.ttmath.org/
|
Bignum library: TTMath http://www.ttmath.org/
|
||||||
Operating systems: Microsoft Windows 9x/Me/NT/2000/XP/Vista/7
|
Operating systems: Microsoft Windows 9x/Me/NT/2000/XP/Vista/7
|
||||||
|
@@ -91,6 +91,7 @@
|
|||||||
<li><a href="rounding_functions.html">round(x)</a></li>
|
<li><a href="rounding_functions.html">round(x)</a></li>
|
||||||
<li><a href="rounding_functions.html">ceil(x)</a></li>
|
<li><a href="rounding_functions.html">ceil(x)</a></li>
|
||||||
<li><a href="rounding_functions.html">floor(x)</a></li>
|
<li><a href="rounding_functions.html">floor(x)</a></li>
|
||||||
|
<li><a href="rounding_functions.html">frac(x)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -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>Author:</td><td>Tomasz Sowa</td></tr>
|
||||||
<tr><td>Contact:</td><td>t.sowa@ttmath.org</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>Licence:</td><td>BSD (open source)</td></tr>
|
||||||
<tr><td>Interface:</td><td>English, Polish, Spanish, Danish, Chinese, Russian, Swedish</td></tr>
|
<tr><td>Interface:</td><td>English, Polish, Spanish, Danish, Chinese, Russian, Swedish, Italian</td></tr>
|
||||||
<tr><td>Project page:</td><td><a href="http://ttcalc.sourceforge.net/">http://ttcalc.sourceforge.net/</a></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>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>
|
<tr><td>Operating systems:</td><td>Microsoft Windows 9x/Me/NT/2000/XP/Vista/7</td></tr>
|
||||||
|
BIN
res/aboutbox.bmp
BIN
res/aboutbox.bmp
Binary file not shown.
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 227 KiB |
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2006-2009, Tomasz Sowa
|
Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppName=TTCalc
|
AppName=TTCalc
|
||||||
AppVerName=TTCalc 0.9.0
|
AppVerName=TTCalc 0.9.2
|
||||||
AppVersion=0.9.0
|
AppVersion=0.9.2
|
||||||
AppPublisher=Tomasz Sowa
|
AppPublisher=Tomasz Sowa
|
||||||
AppPublisherURL=http://ttcalc.sourceforge.net
|
AppPublisherURL=http://ttcalc.sourceforge.net
|
||||||
AppSupportURL=http://ttcalc.sourceforge.net
|
AppSupportURL=http://ttcalc.sourceforge.net
|
||||||
@@ -30,6 +30,7 @@ Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl"
|
|||||||
Name: "chinese"; MessagesFile: "compiler:Languages\ChineseSimp-12-5.1.11.isl"
|
Name: "chinese"; MessagesFile: "compiler:Languages\ChineseSimp-12-5.1.11.isl"
|
||||||
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
|
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
|
||||||
Name: "swedish"; MessagesFile: "compiler:Languages\Swedish.isl"
|
Name: "swedish"; MessagesFile: "compiler:Languages\Swedish.isl"
|
||||||
|
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
|
||||||
|
|
||||||
[InstallDelete]
|
[InstallDelete]
|
||||||
; prior to 0.8.3 we were using mingwm10.dll (now it is not needed and will be deleted if exists)
|
; prior to 0.8.3 we were using mingwm10.dll (now it is not needed and will be deleted if exists)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
CC = g++
|
CC = g++
|
||||||
#CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../ttmath -DTTMATH_RELEASE -DTTCALC_CONVERT
|
#CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../ttmath -DTTCALC_CONVERT
|
||||||
CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../ttmath -DTTMATH_RELEASE
|
CFLAGS = -Wall -pedantic -s -O2 -mwindows -I../../ttmath
|
||||||
name = ttcalc.exe
|
name = ttcalc.exe
|
||||||
|
|
||||||
# the name of the help is also set in the html help workshop project file
|
# the name of the help is also set in the html help workshop project file
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
o = resource.o calculation.o convert.o download.o functions.o iniparser.o languages.o mainwindow.o pad.o parsermanager.o programresources.o tabs.o threadcontroller.o update.o variables.o winmain.o
|
# 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
|
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
|
convert.o: convert.cpp convert.h compileconfig.h bigtypes.h
|
||||||
@@ -6,16 +8,19 @@ 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
|
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
|
iniparser.o: iniparser.cpp compileconfig.h iniparser.h
|
||||||
languages.o: languages.cpp compileconfig.h languages.h bigtypes.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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
.SUFFIXES: .cpp .o
|
||||||
|
|
||||||
.cpp.o:
|
.cpp.o:
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
CC = g++
|
CC = g++
|
||||||
CFLAGS = -Wall -pedantic -s -Os -fno-default-inline -mwindows -I../../ttmath -DTTMATH_RELEASE -DTTCALC_PORTABLE
|
CFLAGS = -Wall -pedantic -s -Os -fno-default-inline -mwindows -I../../ttmath -DTTCALC_PORTABLE
|
||||||
name = ttcalcp.exe
|
name = ttcalcp.exe
|
||||||
compressor = upx
|
compressor = upx
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2009, Tomasz Sowa
|
* Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
*/
|
*/
|
||||||
#define TTCALC_MAJOR_VER 0
|
#define TTCALC_MAJOR_VER 0
|
||||||
#define TTCALC_MINOR_VER 9
|
#define TTCALC_MINOR_VER 9
|
||||||
#define TTCALC_REVISION_VER 0
|
#define TTCALC_REVISION_VER 2
|
||||||
#define TTCALC_PRERELEASE_VER 0
|
#define TTCALC_PRERELEASE_VER 0
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is a part of TTCalc - a mathematical calculator
|
* This file is a part of TTCalc - a mathematical calculator
|
||||||
* and is distributed under the (new) BSD licence.
|
* and is distributed under the (new) BSD licence.
|
||||||
@@ -36,6 +35,7 @@
|
|||||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
#include "compileconfig.h"
|
#include "compileconfig.h"
|
||||||
#include "download.h"
|
#include "download.h"
|
||||||
|
|
||||||
@@ -119,10 +119,17 @@ DWORD read;
|
|||||||
bool Download::DownloadUrl(const char * url)
|
bool Download::DownloadUrl(const char * url)
|
||||||
{
|
{
|
||||||
bool res = true;
|
bool res = true;
|
||||||
|
char browser[100];
|
||||||
|
|
||||||
down_size = 0;
|
down_size = 0;
|
||||||
|
sprintf(browser, "TTCalc updater %d.%d.%d%s",
|
||||||
|
TTCALC_MAJOR_VER,
|
||||||
|
TTCALC_MINOR_VER,
|
||||||
|
TTCALC_REVISION_VER,
|
||||||
|
(TTCALC_PRERELEASE_VER>0)? " prerelease" : "");
|
||||||
|
|
||||||
HINTERNET hint = InternetOpen("TTCalcAutoUpdate",INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0);
|
|
||||||
|
HINTERNET hint = InternetOpen(browser,INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0);
|
||||||
if( !hint )
|
if( !hint )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2009, Tomasz Sowa
|
* Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -305,6 +305,37 @@ void Languages::InitErrorMessagesTab()
|
|||||||
InsertErrorPair(ttmath::err_still_calculating,"R<EFBFBD>knar b<>vrar...");
|
InsertErrorPair(ttmath::err_still_calculating,"R<EFBFBD>knar b<>vrar...");
|
||||||
InsertErrorPair(ttmath::err_percent_from,"Incorrectly used percentage operator");
|
InsertErrorPair(ttmath::err_percent_from,"Incorrectly used percentage operator");
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
italian traslation 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,"Carattere sconosciuto");
|
||||||
|
InsertErrorPair(ttmath::err_unexpected_final_bracket,"Parentesi finale inaspettata");
|
||||||
|
InsertErrorPair(ttmath::err_stack_not_clear,"Carattere sconosciuto mancante");
|
||||||
|
InsertErrorPair(ttmath::err_unknown_variable,"Variabile sconosciuta");
|
||||||
|
InsertErrorPair(ttmath::err_division_by_zero,"Divisione per zero");
|
||||||
|
InsertErrorPair(ttmath::err_interrupt,"Il calcolo e stato interrotto");
|
||||||
|
InsertErrorPair(ttmath::err_overflow,"Overflow");
|
||||||
|
InsertErrorPair(ttmath::err_unknown_function,"Funzione sconosciuta");
|
||||||
|
InsertErrorPair(ttmath::err_unknown_operator,"Operatore sconosciuto");
|
||||||
|
InsertErrorPair(ttmath::err_unexpected_semicolon_operator,"Operatore punto e virgola inaspettato");
|
||||||
|
InsertErrorPair(ttmath::err_improper_amount_of_arguments,"Quantita non appropriata di argomenti");
|
||||||
|
InsertErrorPair(ttmath::err_improper_argument,"Argomento inappropriato");
|
||||||
|
InsertErrorPair(ttmath::err_unexpected_end,"Fine inaspettata");
|
||||||
|
InsertErrorPair(ttmath::err_internal_error,"Errore interno");
|
||||||
|
|
||||||
|
InsertErrorPair(ttmath::err_incorrect_name,"Nome di funzione o variabile non corretto");
|
||||||
|
InsertErrorPair(ttmath::err_incorrect_value,"Valore di funzione o variabile non corretto");
|
||||||
|
InsertErrorPair(ttmath::err_variable_exists,"Questa variabile esiste gia");
|
||||||
|
InsertErrorPair(ttmath::err_variable_loop,"C'e una ricorrenza tra variabili");
|
||||||
|
InsertErrorPair(ttmath::err_functions_loop,"C'e una ricorrenza tra funzioni");
|
||||||
|
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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -442,7 +473,6 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(display_param_sep_item2, " ; or .");
|
InsertGuiPair(display_param_sep_item2, " ; or .");
|
||||||
InsertGuiPair(display_param_sep_item3, " ; or ,");
|
InsertGuiPair(display_param_sep_item3, " ; or ,");
|
||||||
|
|
||||||
|
|
||||||
InsertGuiPair(convert_type, "Type");
|
InsertGuiPair(convert_type, "Type");
|
||||||
InsertGuiPair(convert_input, "Input");
|
InsertGuiPair(convert_input, "Input");
|
||||||
InsertGuiPair(convert_output, "Output");
|
InsertGuiPair(convert_output, "Output");
|
||||||
@@ -464,6 +494,7 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_view_lang_chinese, "&Chinese");
|
InsertGuiPair(menu_view_lang_chinese, "&Chinese");
|
||||||
InsertGuiPair(menu_view_lang_russian, "&Russian");
|
InsertGuiPair(menu_view_lang_russian, "&Russian");
|
||||||
InsertGuiPair(menu_view_lang_swedish, "S&wedish");
|
InsertGuiPair(menu_view_lang_swedish, "S&wedish");
|
||||||
|
InsertGuiPair(menu_view_lang_italian, "&Italian");
|
||||||
InsertGuiPair(menu_view_close_program, "&Close");
|
InsertGuiPair(menu_view_close_program, "&Close");
|
||||||
InsertGuiPair(menu_edit_undo, "&Undo \tCtrl+Z");
|
InsertGuiPair(menu_edit_undo, "&Undo \tCtrl+Z");
|
||||||
InsertGuiPair(menu_edit_cut, "Cu&t \tCtrl+X");
|
InsertGuiPair(menu_edit_cut, "Cu&t \tCtrl+X");
|
||||||
@@ -475,11 +506,12 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_edit_copy_both, "Copy &both \tCtrl+B"); // copying in this way: "input edit = output edit"
|
InsertGuiPair(menu_edit_copy_both, "Copy &both \tCtrl+B"); // copying in this way: "input edit = output edit"
|
||||||
InsertGuiPair(menu_edit_select_all, "Select &all \tEsc");
|
InsertGuiPair(menu_edit_select_all, "Select &all \tEsc");
|
||||||
InsertGuiPair(menu_edit_bracket, "Brac&ket \tCtrl+0"); // inserting brackets: (...)
|
InsertGuiPair(menu_edit_bracket, "Brac&ket \tCtrl+0"); // inserting brackets: (...)
|
||||||
|
InsertGuiPair(menu_edit_swap, "&Swap \tCtrl+W"); // swapping input edit for output edit
|
||||||
InsertGuiPair(menu_help_help, "&Help");
|
InsertGuiPair(menu_help_help, "&Help");
|
||||||
InsertGuiPair(menu_help_project_page, "&Project page");
|
InsertGuiPair(menu_help_project_page, "&Project page");
|
||||||
InsertGuiPair(menu_help_check_update, "&Check update...");
|
InsertGuiPair(menu_help_check_update, "&Check update...");
|
||||||
InsertGuiPair(menu_help_about, "&About");
|
InsertGuiPair(menu_help_about, "&About");
|
||||||
InsertGuiPair(menu_update_available, "&New version is available"); // not implemented yet
|
InsertGuiPair(menu_update_available, "&New version is available");
|
||||||
// this will be a new main menu item (one after 'help') visible only if there is an update
|
// this will be a new main menu item (one after 'help') visible only if there is an update
|
||||||
|
|
||||||
InsertGuiPair(cant_init_calculations, "I could not initialize the module for calculations");
|
InsertGuiPair(cant_init_calculations, "I could not initialize the module for calculations");
|
||||||
@@ -520,6 +552,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
" vdgladilovich@gmail.com\r\n"
|
" vdgladilovich@gmail.com\r\n"
|
||||||
"Swedish Lars 'Bafvert' Gafvert\r\n"
|
"Swedish Lars 'Bafvert' Gafvert\r\n"
|
||||||
" lars.gafvert@gmail.com\r\n"
|
" lars.gafvert@gmail.com\r\n"
|
||||||
|
"Italian Damiano Monaco\r\n"
|
||||||
|
" dmonax@gmail.com\r\n"
|
||||||
);
|
);
|
||||||
InsertGuiPair(about_text_portable_version, " portable version");
|
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.04\r\n");
|
||||||
@@ -535,7 +569,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(update_check_at_startup, "Always check for the update on startup");
|
InsertGuiPair(update_check_at_startup, "Always check for the update on startup");
|
||||||
InsertGuiPair(update_check_for_info, "Press Next to check for the update...");
|
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_is_new_version, "Version %d.%d.%d is available, press Next to download...");
|
||||||
InsertGuiPair(update_no_new_version, "There is not a new version available.");
|
InsertGuiPair(update_no_new_version1, "There is not a newer version available.");
|
||||||
|
InsertGuiPair(update_no_new_version2, "You have the newest version.");
|
||||||
InsertGuiPair(update_download_from, "Downloading from...");
|
InsertGuiPair(update_download_from, "Downloading from...");
|
||||||
#ifndef TTCALC_PORTABLE
|
#ifndef TTCALC_PORTABLE
|
||||||
InsertGuiPair(update_downloaded_info1, "A new setup program has been downloaded.");
|
InsertGuiPair(update_downloaded_info1, "A new setup program has been downloaded.");
|
||||||
@@ -560,7 +595,10 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(pad_menu_edit_del, "&Del \tDel");
|
InsertGuiPair(pad_menu_edit_del, "&Del \tDel");
|
||||||
InsertGuiPair(pad_menu_edit_select_all, "Select &all \tCtrl+A");
|
InsertGuiPair(pad_menu_edit_select_all, "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(other_error, "There was a problem with this operation"); // for other kinds of errors
|
||||||
|
|
||||||
/*
|
/*
|
||||||
polish gui messages
|
polish gui messages
|
||||||
@@ -660,6 +698,7 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_view_lang_chinese, "&Chi<68>ski");
|
InsertGuiPair(menu_view_lang_chinese, "&Chi<68>ski");
|
||||||
InsertGuiPair(menu_view_lang_russian, "&Rosyjski");
|
InsertGuiPair(menu_view_lang_russian, "&Rosyjski");
|
||||||
InsertGuiPair(menu_view_lang_swedish, "&Szwedzki");
|
InsertGuiPair(menu_view_lang_swedish, "&Szwedzki");
|
||||||
|
InsertGuiPair(menu_view_lang_italian, "&W<>oski");
|
||||||
InsertGuiPair(menu_view_close_program, "&Zamknij");
|
InsertGuiPair(menu_view_close_program, "&Zamknij");
|
||||||
InsertGuiPair(menu_edit_undo, "&Cofnij \tCtrl+Z");
|
InsertGuiPair(menu_edit_undo, "&Cofnij \tCtrl+Z");
|
||||||
InsertGuiPair(menu_edit_cut, "Wy&tnij \tCtrl+X");
|
InsertGuiPair(menu_edit_cut, "Wy&tnij \tCtrl+X");
|
||||||
@@ -671,6 +710,7 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_edit_copy_both, "Kopiuj &obydwa \tCtrl+B");
|
InsertGuiPair(menu_edit_copy_both, "Kopiuj &obydwa \tCtrl+B");
|
||||||
InsertGuiPair(menu_edit_select_all, "Zaznacz w&szystko \tEsc");
|
InsertGuiPair(menu_edit_select_all, "Zaznacz w&szystko \tEsc");
|
||||||
InsertGuiPair(menu_edit_bracket, "&Nawiasy \tCtrl+0");
|
InsertGuiPair(menu_edit_bracket, "&Nawiasy \tCtrl+0");
|
||||||
|
InsertGuiPair(menu_edit_swap, "&Zamiana \tCtrl+W");
|
||||||
InsertGuiPair(menu_help_help, "&Pomoc");
|
InsertGuiPair(menu_help_help, "&Pomoc");
|
||||||
InsertGuiPair(menu_help_project_page, "&Strona projektu");
|
InsertGuiPair(menu_help_project_page, "&Strona projektu");
|
||||||
InsertGuiPair(menu_help_check_update, "Sprawd<EFBFBD> &aktualizacj<63>...");
|
InsertGuiPair(menu_help_check_update, "Sprawd<EFBFBD> &aktualizacj<63>...");
|
||||||
@@ -715,6 +755,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
" vdgladilovich@gmail.com\r\n"
|
" vdgladilovich@gmail.com\r\n"
|
||||||
"Szwedzki Lars 'Bafvert' Gafvert\r\n"
|
"Szwedzki Lars 'Bafvert' Gafvert\r\n"
|
||||||
" lars.gafvert@gmail.com\r\n"
|
" lars.gafvert@gmail.com\r\n"
|
||||||
|
"W<EFBFBD>oski Damiano Monaco\r\n"
|
||||||
|
" dmonax@gmail.com\r\n"
|
||||||
);
|
);
|
||||||
InsertGuiPair(about_text_portable_version, " wersja portable");
|
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.04\r\n");
|
||||||
@@ -730,7 +772,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(update_check_at_startup, "Zawsze sprawdzaj aktualizacje podczas uruchamiania");
|
InsertGuiPair(update_check_at_startup, "Zawsze sprawdzaj aktualizacje podczas uruchamiania");
|
||||||
InsertGuiPair(update_check_for_info, "Wci<EFBFBD>nij Dalej aby sprawdzi<7A> dost<73>pno<6E><6F> aktualizacji...");
|
InsertGuiPair(update_check_for_info, "Wci<EFBFBD>nij Dalej aby sprawdzi<7A> dost<73>pno<6E><6F> aktualizacji...");
|
||||||
InsertGuiPair(update_is_new_version, "Wersja %d.%d.%d jest dost<73>pna, wci<63>nij Dalej aby j<> pobra<72>...");
|
InsertGuiPair(update_is_new_version, "Wersja %d.%d.%d jest dost<73>pna, wci<63>nij Dalej aby j<> pobra<72>...");
|
||||||
InsertGuiPair(update_no_new_version, "Nie ma dost<73>pnej nowej wersji programu.");
|
InsertGuiPair(update_no_new_version1, "Nie ma dost<73>pnej nowszej wersji programu.");
|
||||||
|
InsertGuiPair(update_no_new_version2, "Obecnie masz najnowsz<73> wersj<73>.");
|
||||||
InsertGuiPair(update_download_from, "Pobieranie z...");
|
InsertGuiPair(update_download_from, "Pobieranie z...");
|
||||||
#ifndef TTCALC_PORTABLE
|
#ifndef TTCALC_PORTABLE
|
||||||
InsertGuiPair(update_downloaded_info1, "Nowy instalator zosta<74> <20>ci<63>gni<6E>ty.");
|
InsertGuiPair(update_downloaded_info1, "Nowy instalator zosta<74> <20>ci<63>gni<6E>ty.");
|
||||||
@@ -755,6 +798,10 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(pad_menu_edit_del, "&Usu<73> \tDel");
|
InsertGuiPair(pad_menu_edit_del, "&Usu<73> \tDel");
|
||||||
InsertGuiPair(pad_menu_edit_select_all, "Zaznacz wszystko \tCtrl+A");
|
InsertGuiPair(pad_menu_edit_select_all, "Zaznacz wszystko \tCtrl+A");
|
||||||
|
|
||||||
|
InsertGuiPair(cannot_open_file, "Nie mog<6F> otworzy<7A> podanego pliku");
|
||||||
|
InsertGuiPair(cannot_save_file, "Nie mog<6F> zapisa<73> podanego pliku");
|
||||||
|
InsertGuiPair(file_too_long, "Podany plik jest zbyt du<64>y");
|
||||||
|
InsertGuiPair(other_error, "Wyst<EFBFBD>pi<EFBFBD> problem z t<> operacj<63>"); // for other kinds of errors
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -857,6 +904,7 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_view_lang_chinese, "&Chino");
|
InsertGuiPair(menu_view_lang_chinese, "&Chino");
|
||||||
InsertGuiPair(menu_view_lang_russian, "&Ruso");
|
InsertGuiPair(menu_view_lang_russian, "&Ruso");
|
||||||
InsertGuiPair(menu_view_lang_swedish, "&Sueco");
|
InsertGuiPair(menu_view_lang_swedish, "&Sueco");
|
||||||
|
InsertGuiPair(menu_view_lang_italian, "I&talian");
|
||||||
InsertGuiPair(menu_view_close_program, "&Close");
|
InsertGuiPair(menu_view_close_program, "&Close");
|
||||||
|
|
||||||
InsertGuiPair(menu_edit_undo, "&Deshacer \tCtrl+Z");
|
InsertGuiPair(menu_edit_undo, "&Deshacer \tCtrl+Z");
|
||||||
@@ -869,6 +917,7 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_edit_paste_formula, "Pegar &f<>rmula\tCtrl+V"); // pasting directly to the input edit
|
InsertGuiPair(menu_edit_paste_formula, "Pegar &f<>rmula\tCtrl+V"); // pasting directly to the input edit
|
||||||
InsertGuiPair(menu_edit_select_all, "Seleccionar &todo \tEsc");
|
InsertGuiPair(menu_edit_select_all, "Seleccionar &todo \tEsc");
|
||||||
InsertGuiPair(menu_edit_bracket, "C&orchetes \tCtrl+0"); // inserting brackets: (...)
|
InsertGuiPair(menu_edit_bracket, "C&orchetes \tCtrl+0"); // inserting brackets: (...)
|
||||||
|
InsertGuiPair(menu_edit_swap, "&Swap \tCtrl+W"); // swapping input edit for output edit
|
||||||
InsertGuiPair(menu_update_available, "&Nueva versi<73>n disponible");
|
InsertGuiPair(menu_update_available, "&Nueva versi<73>n disponible");
|
||||||
|
|
||||||
InsertGuiPair(menu_help_help, "&Ayuda");
|
InsertGuiPair(menu_help_help, "&Ayuda");
|
||||||
@@ -914,6 +963,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
" vdgladilovich@gmail.com\r\n"
|
" vdgladilovich@gmail.com\r\n"
|
||||||
"Sueco Lars 'Bafvert' Gafvert\r\n"
|
"Sueco Lars 'Bafvert' Gafvert\r\n"
|
||||||
" lars.gafvert@gmail.com\r\n"
|
" lars.gafvert@gmail.com\r\n"
|
||||||
|
"Italian Damiano Monaco\r\n"
|
||||||
|
" dmonax@gmail.com\r\n"
|
||||||
);
|
);
|
||||||
InsertGuiPair(about_text_portable_version, " versi<73>n portatil");
|
InsertGuiPair(about_text_portable_version, " versi<73>n portatil");
|
||||||
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.04\r\n");
|
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.04\r\n");
|
||||||
@@ -930,7 +981,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(update_check_at_startup, "Comprobar siempre al comienzo si hay una nueva versi<73>n");
|
InsertGuiPair(update_check_at_startup, "Comprobar siempre al comienzo si hay una nueva versi<73>n");
|
||||||
InsertGuiPair(update_check_for_info, "Pulse Siguiente para ver si hay actualizaciones...");
|
InsertGuiPair(update_check_for_info, "Pulse Siguiente para ver si hay actualizaciones...");
|
||||||
InsertGuiPair(update_is_new_version, "La versi<73>n %d.%d.%d est<73> disponible, pulse Siguiente para descargar...");
|
InsertGuiPair(update_is_new_version, "La versi<73>n %d.%d.%d est<73> disponible, pulse Siguiente para descargar...");
|
||||||
InsertGuiPair(update_no_new_version, "No hay versiones nuevas disponibles.");
|
InsertGuiPair(update_no_new_version1, "No hay versiones nuevas disponibles.");
|
||||||
|
InsertGuiPair(update_no_new_version2, "");
|
||||||
InsertGuiPair(update_download_from, "Descargando desde...");
|
InsertGuiPair(update_download_from, "Descargando desde...");
|
||||||
#ifndef TTCALC_PORTABLE
|
#ifndef TTCALC_PORTABLE
|
||||||
InsertGuiPair(update_downloaded_info1, "Se ha descargado un nuevo programa de instalaci<63>n.");
|
InsertGuiPair(update_downloaded_info1, "Se ha descargado un nuevo programa de instalaci<63>n.");
|
||||||
@@ -955,6 +1007,11 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(pad_menu_edit_del, "&Borrar \tDel");
|
InsertGuiPair(pad_menu_edit_del, "&Borrar \tDel");
|
||||||
InsertGuiPair(pad_menu_edit_select_all, "Seleccionar &todo \tCtrl+A");
|
InsertGuiPair(pad_menu_edit_select_all, "Seleccionar &todo \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(other_error, "There was a problem with this operation"); // for other kinds of errors
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1055,6 +1112,7 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_view_lang_chinese, "&Kinesisk");
|
InsertGuiPair(menu_view_lang_chinese, "&Kinesisk");
|
||||||
InsertGuiPair(menu_view_lang_russian, "&Russisk");
|
InsertGuiPair(menu_view_lang_russian, "&Russisk");
|
||||||
InsertGuiPair(menu_view_lang_swedish, "S&vensk");
|
InsertGuiPair(menu_view_lang_swedish, "S&vensk");
|
||||||
|
InsertGuiPair(menu_view_lang_italian, "&Italian");
|
||||||
InsertGuiPair(menu_view_close_program, "Afslu&t");
|
InsertGuiPair(menu_view_close_program, "Afslu&t");
|
||||||
InsertGuiPair(menu_edit_undo, "&Fortryd \tCtrl+Z");
|
InsertGuiPair(menu_edit_undo, "&Fortryd \tCtrl+Z");
|
||||||
InsertGuiPair(menu_edit_cut, "Kli&p \tCtrl+X");
|
InsertGuiPair(menu_edit_cut, "Kli&p \tCtrl+X");
|
||||||
@@ -1066,6 +1124,7 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_edit_paste_formula, "Inds<EFBFBD>t f&ormular\tCtrl+V"); // pasting directly to the input edit
|
InsertGuiPair(menu_edit_paste_formula, "Inds<EFBFBD>t f&ormular\tCtrl+V"); // pasting directly to the input edit
|
||||||
InsertGuiPair(menu_edit_select_all, "Marker &alt \tEsc");
|
InsertGuiPair(menu_edit_select_all, "Marker &alt \tEsc");
|
||||||
InsertGuiPair(menu_edit_bracket, "Bracke&t \tCtrl+0"); // inserting brackets: (...)
|
InsertGuiPair(menu_edit_bracket, "Bracke&t \tCtrl+0"); // inserting brackets: (...)
|
||||||
|
InsertGuiPair(menu_edit_swap, "&Swap \tCtrl+W"); // swapping input edit for output edit
|
||||||
InsertGuiPair(menu_help_help, "&Hj<48>lp");
|
InsertGuiPair(menu_help_help, "&Hj<48>lp");
|
||||||
InsertGuiPair(menu_help_project_page, "&Projekt side");
|
InsertGuiPair(menu_help_project_page, "&Projekt side");
|
||||||
InsertGuiPair(menu_help_check_update, "O&pdater...");
|
InsertGuiPair(menu_help_check_update, "O&pdater...");
|
||||||
@@ -1110,6 +1169,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
" vdgladilovich@gmail.com\r\n"
|
" vdgladilovich@gmail.com\r\n"
|
||||||
"Swedish Lars 'Bafvert' Gafvert\r\n"
|
"Swedish Lars 'Bafvert' Gafvert\r\n"
|
||||||
" lars.gafvert@gmail.com\r\n"
|
" lars.gafvert@gmail.com\r\n"
|
||||||
|
"Italian Damiano Monaco\r\n"
|
||||||
|
" dmonax@gmail.com\r\n"
|
||||||
);
|
);
|
||||||
InsertGuiPair(about_text_portable_version, " transportabel version");
|
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.04\r\n");
|
||||||
@@ -1126,7 +1187,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(update_check_at_startup, "Tjek altid for opdateringer ved opstart");
|
InsertGuiPair(update_check_at_startup, "Tjek altid for opdateringer ved opstart");
|
||||||
InsertGuiPair(update_check_for_info, "Tryk p<> N<>ste for at tjekke for opdateringen...");
|
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<6C>ngelig, tryk p<> N<>ste for at downloade...");
|
InsertGuiPair(update_is_new_version, "Version %d.%d.%d er tilg<6C>ngelig, tryk p<> N<>ste for at downloade...");
|
||||||
InsertGuiPair(update_no_new_version, "Der er ingen ny version tilg<6C>ngelig.");
|
InsertGuiPair(update_no_new_version1, "Der er ingen ny version tilg<6C>ngelig.");
|
||||||
|
InsertGuiPair(update_no_new_version2, "");
|
||||||
InsertGuiPair(update_download_from, "Downloader fra...");
|
InsertGuiPair(update_download_from, "Downloader fra...");
|
||||||
#ifndef TTCALC_PORTABLE
|
#ifndef TTCALC_PORTABLE
|
||||||
InsertGuiPair(update_downloaded_info1, "Et nyt installerings program er blevet downloadet.");
|
InsertGuiPair(update_downloaded_info1, "Et nyt installerings program er blevet downloadet.");
|
||||||
@@ -1151,6 +1213,12 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(pad_menu_edit_del, "&Del \tDel");
|
InsertGuiPair(pad_menu_edit_del, "&Del \tDel");
|
||||||
InsertGuiPair(pad_menu_edit_select_all, "Marker &alt \tCtrl+A");
|
InsertGuiPair(pad_menu_edit_select_all, "Marker &alt \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(other_error, "There was a problem with this operation"); // for other kinds of errors
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
chinese gui messages
|
chinese gui messages
|
||||||
@@ -1217,20 +1285,21 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(display_always_scientific,"һֱ");
|
InsertGuiPair(display_always_scientific,"һֱ");
|
||||||
InsertGuiPair(display_not_always_scientific,"<EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
|
InsertGuiPair(display_not_always_scientific,"<EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
|
||||||
InsertGuiPair(display_group_scientific, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(display_group_scientific, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(display_deg_rad_grad, "Trigonometric functions");
|
InsertGuiPair(display_deg_rad_grad, "<EFBFBD><EFBFBD><EFBFBD>Ǻ<EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
InsertGuiPair(display_grouping, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"); // e.g. 1`000`000
|
||||||
|
InsertGuiPair(display_grouping_none, "<EFBFBD><EFBFBD>");
|
||||||
|
InsertGuiPair(display_grouping_space, "<EFBFBD>ո<EFBFBD>");
|
||||||
|
InsertGuiPair(display_input_decimal_point, "С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ"); // Decimal point in formula
|
||||||
|
InsertGuiPair(display_input_decimal_point_item1, " . or ,");
|
||||||
|
InsertGuiPair(display_output_decimal_point, "С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ"); // Decimal point in result
|
||||||
|
InsertGuiPair(display_param_sep, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
InsertGuiPair(display_param_sep_item2, " ; or .");
|
||||||
|
InsertGuiPair(display_param_sep_item3, " ; or ,");
|
||||||
|
|
||||||
InsertGuiPair(convert_type, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(convert_type, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(convert_input, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(convert_input, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(convert_output, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(convert_output, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(convert_dynamic_output, "<EFBFBD>Զ<EFBFBD>");
|
InsertGuiPair(convert_dynamic_output, "<EFBFBD>Զ<EFBFBD>");
|
||||||
InsertGuiPair(display_grouping, "Grouping");
|
|
||||||
InsertGuiPair(display_grouping_none, "None");
|
|
||||||
InsertGuiPair(display_grouping_space, "Space");
|
|
||||||
InsertGuiPair(display_input_decimal_point, "Input decimal point");
|
|
||||||
InsertGuiPair(display_input_decimal_point_item1, " . or ,");
|
|
||||||
InsertGuiPair(display_output_decimal_point, "Output decimal point");
|
|
||||||
InsertGuiPair(display_param_sep, "Parameters separated by");
|
|
||||||
InsertGuiPair(display_param_sep_item2, " ; or .");
|
|
||||||
InsertGuiPair(display_param_sep_item3, " ; or ,");
|
|
||||||
|
|
||||||
InsertGuiPair(menu_view, "&<26>鿴");
|
InsertGuiPair(menu_view, "&<26>鿴");
|
||||||
InsertGuiPair(menu_edit, "&<26>༭");
|
InsertGuiPair(menu_edit, "&<26>༭");
|
||||||
@@ -1240,30 +1309,33 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_view_normal_view, "&<26><>ͨ<EFBFBD><CDA8>ͼ");
|
InsertGuiPair(menu_view_normal_view, "&<26><>ͨ<EFBFBD><CDA8>ͼ");
|
||||||
InsertGuiPair(menu_view_compact_view, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ");
|
InsertGuiPair(menu_view_compact_view, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ");
|
||||||
InsertGuiPair(menu_view_always_on_top, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ");
|
InsertGuiPair(menu_view_always_on_top, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ");
|
||||||
InsertGuiPair(menu_view_pad, "&Pad");
|
InsertGuiPair(menu_view_pad, "ճ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(menu_view_lang_english, "&Ӣ<><D3A2>");
|
InsertGuiPair(menu_view_lang_english, "&Ӣ<><D3A2>");
|
||||||
InsertGuiPair(menu_view_lang_polish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(menu_view_lang_polish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(menu_view_lang_spanish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(menu_view_lang_spanish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(menu_view_lang_danish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(menu_view_lang_danish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(menu_view_lang_chinese, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(menu_view_lang_chinese, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(menu_view_lang_russian, "&Russian");
|
InsertGuiPair(menu_view_lang_russian, "&<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(menu_view_lang_swedish, "&Swedish");
|
InsertGuiPair(menu_view_lang_swedish, "&<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
InsertGuiPair(menu_view_lang_italian, "&Italian");
|
||||||
InsertGuiPair(menu_view_close_program, "&<26>ر<EFBFBD>");
|
InsertGuiPair(menu_view_close_program, "&<26>ر<EFBFBD>");
|
||||||
InsertGuiPair(menu_edit_undo, "&ȡ<><C8A1> \tCtrl+Z");
|
InsertGuiPair(menu_edit_undo, "&ȡ<><C8A1> \tCtrl+Z");
|
||||||
InsertGuiPair(menu_edit_cut, "Cu&t \tCtrl+X");
|
InsertGuiPair(menu_edit_cut, "&<26><><EFBFBD><EFBFBD> \tCtrl+X");
|
||||||
InsertGuiPair(menu_edit_copy, "&Copy \tCtrl+C");
|
InsertGuiPair(menu_edit_copy, "&<EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tCtrl+C");
|
||||||
InsertGuiPair(menu_edit_paste, "&Paste");
|
InsertGuiPair(menu_edit_paste, "&ճ<EFBFBD><EFBFBD>"); // cutting, copying, pasting the the edit which has a focus
|
||||||
InsertGuiPair(menu_edit_del, "&Delete \tDel");
|
InsertGuiPair(menu_edit_del, "&ɾ<EFBFBD><EFBFBD> \tDel");
|
||||||
InsertGuiPair(menu_edit_paste_formula, "&ճ<EFBFBD><EFBFBD>");
|
InsertGuiPair(menu_edit_copy_both, "&<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>=<3D><><EFBFBD><EFBFBD>) \tCtrl+B"); // copying in this way: "input edit = output edit"
|
||||||
|
InsertGuiPair(menu_edit_paste_formula, "&ճ<><D5B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\tCtrl+V"); // pasting directly to the input edit
|
||||||
InsertGuiPair(menu_edit_copy_result, "&<26><><EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD> \tCtrl+R");
|
InsertGuiPair(menu_edit_copy_result, "&<26><><EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD> \tCtrl+R");
|
||||||
InsertGuiPair(menu_edit_copy_both, "Copy &both \tCtrl+B");
|
InsertGuiPair(menu_edit_select_all, "&ȫѡ\tEsc");
|
||||||
InsertGuiPair(menu_edit_select_all, "Select &all \tEsc");
|
InsertGuiPair(menu_edit_bracket, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tCtrl+0"); // inserting brackets: (...)
|
||||||
InsertGuiPair(menu_edit_bracket, "Bracke&t \tCtrl+0");
|
InsertGuiPair(menu_edit_swap, "&Swap \tCtrl+W"); // swapping input edit for output edit
|
||||||
InsertGuiPair(menu_help_help, "&<26><><EFBFBD><EFBFBD>");
|
InsertGuiPair(menu_help_help, "&<26><><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(menu_help_project_page, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ");
|
InsertGuiPair(menu_help_project_page, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ");
|
||||||
InsertGuiPair(menu_help_check_update, "&Check update...");
|
|
||||||
InsertGuiPair(menu_help_about, "&<26><><EFBFBD><EFBFBD>");
|
InsertGuiPair(menu_help_about, "&<26><><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(menu_update_available, "&New version is available");
|
InsertGuiPair(menu_help_check_update, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
InsertGuiPair(menu_update_available, "&<26>п<EFBFBD><D0BF>õ<EFBFBD><C3B5>°汾"); // not implemented yet
|
||||||
|
// this will be a new main menu item (one after 'help') visible only if there is an update
|
||||||
|
|
||||||
InsertGuiPair(cant_init_calculations, "<EFBFBD><EFBFBD><EFBFBD>ܳ<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>");
|
InsertGuiPair(cant_init_calculations, "<EFBFBD><EFBFBD><EFBFBD>ܳ<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(message_box_error_caption,"TTCalc");
|
InsertGuiPair(message_box_error_caption,"TTCalc");
|
||||||
@@ -1292,17 +1364,19 @@ void Languages::InitGuiMessagesTab()
|
|||||||
"mantissa and 32 bits for the exponent) it's about +/-6.9e+646457021.\r\n"
|
"mantissa and 32 bits for the exponent) it's about +/-6.9e+646457021.\r\n"
|
||||||
"\r\n"
|
"\r\n"
|
||||||
#endif
|
#endif
|
||||||
"Translations:\r\n"
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\r\n"
|
||||||
"Spanish Alejandro S. Valdezate\r\n"
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Alejandro S. Valdezate\r\n"
|
||||||
" alesanval@gmail.com\r\n"
|
" alesanval@gmail.com\r\n"
|
||||||
"Danish Rune Bisgaard Vammen\r\n"
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Rune Bisgaard Vammen\r\n"
|
||||||
" runebisgaard@gmail.com\r\n"
|
" runebisgaard@gmail.com\r\n"
|
||||||
"Chinese Juis\r\n"
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Juis\r\n"
|
||||||
" zsyfly@gmail.com\r\n"
|
" zsyfly@gmail.com\r\n"
|
||||||
"Russian Vladimir Gladilovich\r\n"
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vladimir Gladilovich\r\n"
|
||||||
" vdgladilovich@gmail.com\r\n"
|
" vdgladilovich@gmail.com\r\n"
|
||||||
"Swedish Lars 'Bafvert' Gafvert\r\n"
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Lars 'Bafvert' Gafvert\r\n"
|
||||||
" lars.gafvert@gmail.com\r\n"
|
" lars.gafvert@gmail.com\r\n"
|
||||||
|
"Italian Damiano Monaco\r\n"
|
||||||
|
" dmonax@gmail.com\r\n"
|
||||||
);
|
);
|
||||||
InsertGuiPair(about_text_portable_version, " portable version");
|
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.04\r\n");
|
||||||
@@ -1311,37 +1385,45 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(unknown_error, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ֪<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(unknown_error, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ֪<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(cant_find_help, "û<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>");
|
InsertGuiPair(cant_find_help, "û<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>");
|
||||||
InsertGuiPair(cant_open_project_page, "<EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ");
|
InsertGuiPair(cant_open_project_page, "<EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ");
|
||||||
InsertGuiPair(update_title, "Check for a new version");
|
|
||||||
InsertGuiPair(update_button_next, "Next");
|
InsertGuiPair(update_title, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(update_button_finish, "Finish");
|
InsertGuiPair(update_button_next, "<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(update_button_cancel, "Cancel");
|
InsertGuiPair(update_button_finish, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(update_check_at_startup, "Always check for the update on startup");
|
InsertGuiPair(update_button_cancel, "ȡ<EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(update_check_for_info, "Press Next to check for the update...");
|
InsertGuiPair(update_check_at_startup, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(update_is_new_version, "Version %d.%d.%d is available, press Next to download...");
|
InsertGuiPair(update_check_for_info, "<EFBFBD><EFBFBD>\"<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>\"<EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><EFBFBD><EFBFBD>...");
|
||||||
InsertGuiPair(update_no_new_version, "There is not a new version available.");
|
InsertGuiPair(update_is_new_version, "<EFBFBD>汾 %d.%d.%d <20><><EFBFBD><EFBFBD>, <20><>\"<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>\"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
||||||
InsertGuiPair(update_download_from, "Downloading from...");
|
InsertGuiPair(update_no_new_version1, "û<EFBFBD>п<EFBFBD><EFBFBD>õ<EFBFBD><EFBFBD>°汾<EFBFBD><EFBFBD>");
|
||||||
|
InsertGuiPair(update_no_new_version2, "");
|
||||||
|
InsertGuiPair(update_download_from, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
||||||
#ifndef TTCALC_PORTABLE
|
#ifndef TTCALC_PORTABLE
|
||||||
InsertGuiPair(update_downloaded_info1, "A new setup program has been downloaded.");
|
InsertGuiPair(update_downloaded_info1, "<EFBFBD>°汾<EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD>");
|
||||||
InsertGuiPair(update_downloaded_info2, "Press Finish to close TTCalc and run the installer.");
|
InsertGuiPair(update_downloaded_info2, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Թرճ<EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD>.");
|
||||||
#else
|
#else
|
||||||
InsertGuiPair(update_downloaded_info1, "A new version of TTCalc has been downloaded.");
|
InsertGuiPair(update_downloaded_info1, "<EFBFBD>°汾<EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϡ<EFBFBD>");
|
||||||
InsertGuiPair(update_downloaded_info2, "");
|
InsertGuiPair(update_downloaded_info2, "");
|
||||||
#endif
|
#endif
|
||||||
InsertGuiPair(update_download_error, "There was a problem with downloading, please try again later.");
|
InsertGuiPair(update_download_error, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ժ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԡ<EFBFBD>");
|
||||||
|
|
||||||
|
InsertGuiPair(pad_title, "ճ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
InsertGuiPair(pad_menu_file, "&<26>ļ<EFBFBD>");
|
||||||
|
InsertGuiPair(pad_menu_edit, "&<26>༭");
|
||||||
|
InsertGuiPair(pad_menu_file_new, "&<26>½<EFBFBD>"); // temporarily not used
|
||||||
|
InsertGuiPair(pad_menu_file_open, "&<26><><EFBFBD><EFBFBD>...");
|
||||||
|
InsertGuiPair(pad_menu_file_saveas, "&<26><><EFBFBD><EFBFBD>Ϊ...");
|
||||||
|
InsertGuiPair(pad_menu_file_close, "&<26>ر<EFBFBD>");
|
||||||
|
InsertGuiPair(pad_menu_edit_undo, "&<26><><EFBFBD><EFBFBD> \tCtrl+Z");
|
||||||
|
InsertGuiPair(pad_menu_edit_cut, "&<26><><EFBFBD><EFBFBD> \tCtrl+X");
|
||||||
|
InsertGuiPair(pad_menu_edit_copy, "&<26><><EFBFBD><EFBFBD> \tCtrl+C");
|
||||||
|
InsertGuiPair(pad_menu_edit_paste, "&ճ<><D5B3> \tCtrl+V");
|
||||||
|
InsertGuiPair(pad_menu_edit_del, "&ɾ<><C9BE> \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(other_error, "There was a problem with this operation"); // for other kinds of errors
|
||||||
|
|
||||||
InsertGuiPair(pad_title, "Pad");
|
|
||||||
InsertGuiPair(pad_menu_file, "&File");
|
|
||||||
InsertGuiPair(pad_menu_edit, "&Edit");
|
|
||||||
InsertGuiPair(pad_menu_file_new, "&New"); // temporarily not used
|
|
||||||
InsertGuiPair(pad_menu_file_open, "&Open...");
|
|
||||||
InsertGuiPair(pad_menu_file_saveas, "Save &as...");
|
|
||||||
InsertGuiPair(pad_menu_file_close, "&Close");
|
|
||||||
InsertGuiPair(pad_menu_edit_undo, "&Undo \tCtrl+Z");
|
|
||||||
InsertGuiPair(pad_menu_edit_cut, "Cu&t \tCtrl+X");
|
|
||||||
InsertGuiPair(pad_menu_edit_copy, "&Copy \tCtrl+C");
|
|
||||||
InsertGuiPair(pad_menu_edit_paste, "&Paste \tCtrl+V");
|
|
||||||
InsertGuiPair(pad_menu_edit_del, "&Del \tDel");
|
|
||||||
InsertGuiPair(pad_menu_edit_select_all, "Select &all \tCtrl+A");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1443,6 +1525,7 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_view_lang_chinese, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(menu_view_lang_chinese, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(menu_view_lang_russian, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(menu_view_lang_russian, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(menu_view_lang_swedish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(menu_view_lang_swedish, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
InsertGuiPair(menu_view_lang_italian, "&Italian");
|
||||||
InsertGuiPair(menu_view_close_program, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(menu_view_close_program, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
|
|
||||||
InsertGuiPair(menu_edit_undo, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tCtrl+Z");
|
InsertGuiPair(menu_edit_undo, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tCtrl+Z");
|
||||||
@@ -1455,6 +1538,7 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_edit_paste_formula, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tCtrl+V"); // pasting directly to the input edit
|
InsertGuiPair(menu_edit_paste_formula, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tCtrl+V"); // pasting directly to the input edit
|
||||||
InsertGuiPair(menu_edit_select_all, "<EFBFBD><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> \tEsc");
|
InsertGuiPair(menu_edit_select_all, "<EFBFBD><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> \tEsc");
|
||||||
InsertGuiPair(menu_edit_bracket, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>&<26><><EFBFBD> \tCtrl+0"); // inserting brackets: (...)
|
InsertGuiPair(menu_edit_bracket, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>&<26><><EFBFBD> \tCtrl+0"); // inserting brackets: (...)
|
||||||
|
InsertGuiPair(menu_edit_swap, "&Swap \tCtrl+W"); // swapping input edit for output edit
|
||||||
InsertGuiPair(menu_help_check_update, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
InsertGuiPair(menu_help_check_update, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
||||||
InsertGuiPair(menu_update_available, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!");
|
InsertGuiPair(menu_update_available, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!");
|
||||||
|
|
||||||
@@ -1501,6 +1585,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
" vdgladilovich@gmail.com\r\n"
|
" vdgladilovich@gmail.com\r\n"
|
||||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Lars 'Bafvert' Gafvert\r\n"
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Lars 'Bafvert' Gafvert\r\n"
|
||||||
" lars.gafvert@gmail.com\r\n"
|
" lars.gafvert@gmail.com\r\n"
|
||||||
|
"Italian Damiano Monaco\r\n"
|
||||||
|
" dmonax@gmail.com\r\n"
|
||||||
);
|
);
|
||||||
InsertGuiPair(about_text_portable_version, " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(about_text_portable_version, " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(about_text_exe_packer, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> EXE: UPX 3.04\r\n");
|
InsertGuiPair(about_text_exe_packer, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> EXE: UPX 3.04\r\n");
|
||||||
@@ -1518,7 +1604,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(update_check_at_startup, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
InsertGuiPair(update_check_at_startup, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||||
InsertGuiPair(update_check_for_info, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
InsertGuiPair(update_check_for_info, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
||||||
InsertGuiPair(update_is_new_version, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %d.%d.%d, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>...");
|
InsertGuiPair(update_is_new_version, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %d.%d.%d, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>...");
|
||||||
InsertGuiPair(update_no_new_version, "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.");
|
InsertGuiPair(update_no_new_version1, "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.");
|
||||||
|
InsertGuiPair(update_no_new_version2, "");
|
||||||
InsertGuiPair(update_download_from, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>...");
|
InsertGuiPair(update_download_from, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>...");
|
||||||
#ifndef TTCALC_PORTABLE
|
#ifndef TTCALC_PORTABLE
|
||||||
InsertGuiPair(update_downloaded_info1, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.");
|
InsertGuiPair(update_downloaded_info1, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.");
|
||||||
@@ -1543,6 +1630,13 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(pad_menu_edit_del, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tDel");
|
InsertGuiPair(pad_menu_edit_del, "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \tDel");
|
||||||
InsertGuiPair(pad_menu_edit_select_all, "<EFBFBD><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> \tCtrl+A");
|
InsertGuiPair(pad_menu_edit_select_all, "<EFBFBD><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> \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(other_error, "There was a problem with this operation"); // for other kinds of errors
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1642,6 +1736,7 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_view_lang_chinese, "&Kinesiska");
|
InsertGuiPair(menu_view_lang_chinese, "&Kinesiska");
|
||||||
InsertGuiPair(menu_view_lang_russian, "&Ryska");
|
InsertGuiPair(menu_view_lang_russian, "&Ryska");
|
||||||
InsertGuiPair(menu_view_lang_swedish, "S&venska");
|
InsertGuiPair(menu_view_lang_swedish, "S&venska");
|
||||||
|
InsertGuiPair(menu_view_lang_italian, "&Italian");
|
||||||
InsertGuiPair(menu_view_close_program, "A&vsluta");
|
InsertGuiPair(menu_view_close_program, "A&vsluta");
|
||||||
InsertGuiPair(menu_edit_undo, "&<26>ngra \tCtrl+Z");
|
InsertGuiPair(menu_edit_undo, "&<26>ngra \tCtrl+Z");
|
||||||
InsertGuiPair(menu_edit_cut, "Cu&t \tCtrl+X");
|
InsertGuiPair(menu_edit_cut, "Cu&t \tCtrl+X");
|
||||||
@@ -1653,6 +1748,7 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(menu_edit_copy_both, "Copy &both \tCtrl+B");
|
InsertGuiPair(menu_edit_copy_both, "Copy &both \tCtrl+B");
|
||||||
InsertGuiPair(menu_edit_select_all, "Select &all \tEsc");
|
InsertGuiPair(menu_edit_select_all, "Select &all \tEsc");
|
||||||
InsertGuiPair(menu_edit_bracket, "B&racket \tCtrl+0");
|
InsertGuiPair(menu_edit_bracket, "B&racket \tCtrl+0");
|
||||||
|
InsertGuiPair(menu_edit_swap, "&Swap \tCtrl+W");
|
||||||
InsertGuiPair(menu_help_help, "&Hj<48>lp");
|
InsertGuiPair(menu_help_help, "&Hj<48>lp");
|
||||||
InsertGuiPair(menu_help_project_page, "&Projektsida");
|
InsertGuiPair(menu_help_project_page, "&Projektsida");
|
||||||
InsertGuiPair(menu_help_check_update, "&Check update...");
|
InsertGuiPair(menu_help_check_update, "&Check update...");
|
||||||
@@ -1697,6 +1793,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
" vdgladilovich@gmail.com\r\n"
|
" vdgladilovich@gmail.com\r\n"
|
||||||
"Swedish Lars 'Bafvert' Gafvert\r\n"
|
"Swedish Lars 'Bafvert' Gafvert\r\n"
|
||||||
" lars.gafvert@gmail.com\r\n"
|
" lars.gafvert@gmail.com\r\n"
|
||||||
|
"Italian Damiano Monaco\r\n"
|
||||||
|
" dmonax@gmail.com\r\n"
|
||||||
);
|
);
|
||||||
InsertGuiPair(about_text_portable_version, " transportabel version");
|
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.04\r\n");
|
||||||
@@ -1712,7 +1810,8 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(update_check_at_startup, "Always check for the update on startup");
|
InsertGuiPair(update_check_at_startup, "Always check for the update on startup");
|
||||||
InsertGuiPair(update_check_for_info, "Press Next to check for the update...");
|
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_is_new_version, "Version %d.%d.%d is available, press Next to download...");
|
||||||
InsertGuiPair(update_no_new_version, "There is not a new version available.");
|
InsertGuiPair(update_no_new_version1, "There is not a newer version available.");
|
||||||
|
InsertGuiPair(update_no_new_version2, "You have the newest version.");
|
||||||
InsertGuiPair(update_download_from, "Downloading from...");
|
InsertGuiPair(update_download_from, "Downloading from...");
|
||||||
#ifndef TTCALC_PORTABLE
|
#ifndef TTCALC_PORTABLE
|
||||||
InsertGuiPair(update_downloaded_info1, "A new setup program has been downloaded.");
|
InsertGuiPair(update_downloaded_info1, "A new setup program has been downloaded.");
|
||||||
@@ -1737,8 +1836,215 @@ void Languages::InitGuiMessagesTab()
|
|||||||
InsertGuiPair(pad_menu_edit_del, "&Del \tDel");
|
InsertGuiPair(pad_menu_edit_del, "&Del \tDel");
|
||||||
InsertGuiPair(pad_menu_edit_select_all, "Select &all \tCtrl+A");
|
InsertGuiPair(pad_menu_edit_select_all, "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(other_error, "There was a problem with this operation"); // for other kinds of errors
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
italian gui messages
|
||||||
|
*/
|
||||||
|
gui_messages_tab.push_back( std::map<GuiMsg, std::string>() );
|
||||||
|
|
||||||
|
InsertGuiPair(button_ok,"Ok");
|
||||||
|
InsertGuiPair(button_cancel,"Annulla");
|
||||||
|
InsertGuiPair(message_box_caption,"TTCalc");
|
||||||
|
|
||||||
|
InsertGuiPair(dialog_box_add_variable_caption,"Aggiungi una nuova variabile");
|
||||||
|
InsertGuiPair(dialog_box_edit_variable_caption,"Modifica una variabile");
|
||||||
|
InsertGuiPair(dialog_box_add_variable_incorrect_name,"Nome di variabile non corretto");
|
||||||
|
InsertGuiPair(dialog_box_add_variable_incorrect_value,"Valore di variabile non corretto");
|
||||||
|
InsertGuiPair(dialog_box_add_variable_variable_exists,"Questa variabile esiste gia");
|
||||||
|
InsertGuiPair(dialog_box_edit_variable_unknown_variable,"Variabile non presente nella mia tabella. Probabilmente un errore interno!");
|
||||||
|
InsertGuiPair(dialog_box_delete_variable_confirm,"Vuoi eliminare queste variabili?");
|
||||||
|
InsertGuiPair(dialog_box_variable_not_all_deleted,"Non sono stato in grado di eliminare alcune variabili. Probabilmente un errore interno!");
|
||||||
|
InsertGuiPair(dialog_box_add_function_caption,"Aggiungi una nuova funzione");
|
||||||
|
InsertGuiPair(dialog_box_edit_function_caption,"Modifica una funzione");
|
||||||
|
InsertGuiPair(dialog_box_add_function_function_exists,"Questa funzione esiste gia");
|
||||||
|
InsertGuiPair(dialog_box_edit_function_unknown_function,"Funzione non presente nella mia tabella. Probabilmente un errore interno!");
|
||||||
|
InsertGuiPair(dialog_box_delete_function_confirm,"Vuoi eliminare queste funzioni?");
|
||||||
|
InsertGuiPair(dialog_box_function_not_all_deleted,"Non sono stato in grado di eliminare alcune funzioni. Probabilmente un errore interno!");
|
||||||
|
InsertGuiPair(dialog_box_add_function_incorrect_name,"Nome di funzione non corretto");
|
||||||
|
|
||||||
|
InsertGuiPair(list_variables_header_1,"Nome");
|
||||||
|
InsertGuiPair(list_variables_header_2,"Valore");
|
||||||
|
InsertGuiPair(list_functions_header_1,"Nome");
|
||||||
|
InsertGuiPair(list_functions_header_2,"Param.");
|
||||||
|
InsertGuiPair(list_functions_header_3,"Valore");
|
||||||
|
|
||||||
|
InsertGuiPair(button_add,"Aggiungi");
|
||||||
|
InsertGuiPair(button_edit,"Modifica");
|
||||||
|
InsertGuiPair(button_delete,"Elimina");
|
||||||
|
InsertGuiPair(button_clear,"C");
|
||||||
|
InsertGuiPair(tab_standard,"Standard");
|
||||||
|
InsertGuiPair(tab_variables,"Variabili");
|
||||||
|
InsertGuiPair(tab_functions,"Funzioni");
|
||||||
|
InsertGuiPair(tab_precision,"Precisione");
|
||||||
|
InsertGuiPair(tab_display,"Display");
|
||||||
|
InsertGuiPair(tab_convert,"Conversione");
|
||||||
|
|
||||||
|
InsertGuiPair(radio_precision_1,"Piccola - 96 bit per la mantissa, 32 bit per l'esponente");
|
||||||
|
InsertGuiPair(radio_precision_2,"Media - 512 bit per la mantissa, 64 bit per l'esponente");
|
||||||
|
InsertGuiPair(radio_precision_3,"Grande - 1024 bit per la mantissa, 128 bit per l'esponente");
|
||||||
|
|
||||||
|
InsertGuiPair(precision_1_info,"(+/-)6.97...e+646457021, 26 cifre decimali valide");
|
||||||
|
InsertGuiPair(precision_2_info,"(+/-)9.25...e+2776511644261678719, 152 cifre decimali valide");
|
||||||
|
InsertGuiPair(precision_3_info,"(+/-)9.80...*10^(10^37), 306 cifre decimali valide");
|
||||||
|
|
||||||
|
InsertGuiPair(overflow_during_printing,"Overflow durante la stampa a video");
|
||||||
|
|
||||||
|
InsertGuiPair(combo_rounding_none,"nessuno");
|
||||||
|
InsertGuiPair(combo_rounding_integer,"ad intero");
|
||||||
|
InsertGuiPair(combo_rounding_to_number,"a");
|
||||||
|
InsertGuiPair(combo_rounding_after_comma,"cifra/e");
|
||||||
|
InsertGuiPair(check_remove_zeroes,"Rimuovere ultimi zeri finali");
|
||||||
|
|
||||||
|
InsertGuiPair(display_input, "Bese di input");
|
||||||
|
InsertGuiPair(display_output, "Bese di output");
|
||||||
|
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_deg_rad_grad, "Funzioni trigonometriche");
|
||||||
|
InsertGuiPair(display_grouping, "Raggruppo");
|
||||||
|
InsertGuiPair(display_grouping_none, "nessuno");
|
||||||
|
InsertGuiPair(display_grouping_space, "spazio");
|
||||||
|
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
|
||||||
|
InsertGuiPair(display_param_sep, "Parametri separati da");
|
||||||
|
InsertGuiPair(display_param_sep_item2, " ; oppure .");
|
||||||
|
InsertGuiPair(display_param_sep_item3, " ; oppure ,");
|
||||||
|
|
||||||
|
|
||||||
|
InsertGuiPair(convert_type, "Tipo");
|
||||||
|
InsertGuiPair(convert_input, "Input");
|
||||||
|
InsertGuiPair(convert_output, "Output");
|
||||||
|
InsertGuiPair(convert_dynamic_output, "Prefisso automatico");
|
||||||
|
|
||||||
|
InsertGuiPair(menu_view, "&Vista");
|
||||||
|
InsertGuiPair(menu_edit, "&Modifica");
|
||||||
|
InsertGuiPair(menu_help, "&Aiuto");
|
||||||
|
InsertGuiPair(menu_language, "&Linguaggio");
|
||||||
|
InsertGuiPair(menu_view_new_window, "&Nuova finestra");
|
||||||
|
InsertGuiPair(menu_view_normal_view, "Vista &normale");
|
||||||
|
InsertGuiPair(menu_view_compact_view, "Vista &compatta");
|
||||||
|
InsertGuiPair(menu_view_pad, "&Bloc-notes");
|
||||||
|
InsertGuiPair(menu_view_always_on_top, "&In primo piano");
|
||||||
|
InsertGuiPair(menu_view_lang_english, "&Inglese");
|
||||||
|
InsertGuiPair(menu_view_lang_polish, "&Polacco");
|
||||||
|
InsertGuiPair(menu_view_lang_spanish, "&Spagnolo");
|
||||||
|
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_italian, "I&taliano");
|
||||||
|
InsertGuiPair(menu_view_close_program, "&Esci");
|
||||||
|
InsertGuiPair(menu_edit_undo, "&Annulla \tCtrl+Z");
|
||||||
|
InsertGuiPair(menu_edit_cut, "&Taglia \tCtrl+X");
|
||||||
|
InsertGuiPair(menu_edit_copy, "&Copia \tCtrl+C");
|
||||||
|
InsertGuiPair(menu_edit_paste, "&Incolla"); // cutting, copying, pasting the the edit which has a focus
|
||||||
|
InsertGuiPair(menu_edit_del, "&Elimina \tDel");
|
||||||
|
InsertGuiPair(menu_edit_paste_formula, "Incolla &formula\tCtrl+V"); // pasting directly to input edit
|
||||||
|
InsertGuiPair(menu_edit_copy_result, "Copia &risultato \tCtrl+R");
|
||||||
|
InsertGuiPair(menu_edit_copy_both, "Copia &entrambe \tCtrl+B"); // copying in this way: "input edit = output edit"
|
||||||
|
InsertGuiPair(menu_edit_select_all, "Seleziona &tutto \tEsc");
|
||||||
|
InsertGuiPair(menu_edit_bracket, "&Parentesi \tCtrl+0"); // inserting brackets: (...)
|
||||||
|
InsertGuiPair(menu_edit_swap, "&Scambia \tCtrl+W");
|
||||||
|
InsertGuiPair(menu_help_help, "&Aiuto");
|
||||||
|
InsertGuiPair(menu_help_project_page, "&Pagina del progetto");
|
||||||
|
InsertGuiPair(menu_help_check_update, "&Ottieni aggiornamenti");
|
||||||
|
InsertGuiPair(menu_help_about, "&Informazioni su...");
|
||||||
|
InsertGuiPair(menu_update_available, "&Una nuova versione e disponibile"); // not implemented yet
|
||||||
|
// this will be a new main menu item (one after 'help') visible only if there is an update
|
||||||
|
|
||||||
|
InsertGuiPair(cant_init_calculations, "Non posso inizializzare il modulo per i calcoli");
|
||||||
|
InsertGuiPair(message_box_error_caption,"TTCalc");
|
||||||
|
InsertGuiPair(cant_create_thread, "Non posso creare il secondo thread per i calcoli");
|
||||||
|
InsertGuiPair(cant_create_pad, "Non posso creare la finestra del bloc-notes");
|
||||||
|
InsertGuiPair(cant_create_main_window, "Non posso creare la finestra principale dell'applicazione");
|
||||||
|
InsertGuiPair(cant_init_common_controls,"Non posso inizializzare i controlli usuali (InitCommonControlsEx)");
|
||||||
|
InsertGuiPair(about_text,
|
||||||
|
"Calcolatore matematico TTCalc %d.%d.%d%s%s\r\n\r\n"
|
||||||
|
"Autore: Tomasz Sowa\r\n"
|
||||||
|
"Contatto: t.sowa@ttmath.org\r\n"
|
||||||
|
"Licenza: BSD (open source)\r\n"
|
||||||
|
"Pagina del progetto: http://ttcalc.sourceforge.net\r\n"
|
||||||
|
"Bignum library: TTMath %d.%d.%d%s (%s)\r\n"
|
||||||
|
"Bignum type: binary floating point numbers\r\n"
|
||||||
|
"Linguaggio di programmazione: C++\r\n"
|
||||||
|
"Compilatore: %s\r\n"
|
||||||
|
"%s" // for upx
|
||||||
|
"\r\n"
|
||||||
|
"TTCalc usa la TTMath bignum library"
|
||||||
|
" che pu<70> essere trovata su http://www.ttmath.org\r\n"
|
||||||
|
"\r\n"
|
||||||
|
#ifdef TTCALC_PORTABLE
|
||||||
|
"Questa e la verisone portatile del programma TTCalc. In questa versione "
|
||||||
|
"potrete fare calcoli con un solo tipo di precisione (96 bit per la "
|
||||||
|
"mantissa e 32 bit per l'esponente) di circa +/-6.9e+646457021.\r\n"
|
||||||
|
"\r\n"
|
||||||
|
#endif
|
||||||
|
"Traduzione:\r\n"
|
||||||
|
"Spagnolo Alejandro S. Valdezate\r\n"
|
||||||
|
" alesanval@gmail.com\r\n"
|
||||||
|
"Danese Rune Bisgaard Vammen\r\n"
|
||||||
|
" runebisgaard@gmail.com\r\n"
|
||||||
|
"Cinese Juis\r\n"
|
||||||
|
" zsyfly@gmail.com\r\n"
|
||||||
|
"Russo Vladimir Gladilovich\r\n"
|
||||||
|
" vdgladilovich@gmail.com\r\n"
|
||||||
|
"Svedese Lars 'Bafvert' Gafvert\r\n"
|
||||||
|
" lars.gafvert@gmail.com\r\n"
|
||||||
|
"Italian Damiano Monaco\r\n"
|
||||||
|
" dmonax@gmail.com\r\n"
|
||||||
|
);
|
||||||
|
InsertGuiPair(about_text_portable_version, " versione portabile");
|
||||||
|
InsertGuiPair(about_text_exe_packer, "EXE Packer: UPX 3.04\r\n");
|
||||||
|
InsertGuiPair(about_box_title, "Informazioni su");
|
||||||
|
InsertGuiPair(about_box_button_close, "Esci");
|
||||||
|
InsertGuiPair(unknown_error, "Si e verificato un errore sconosciuto");
|
||||||
|
InsertGuiPair(cant_find_help, "Non posso trovare nessun file di aiuto");
|
||||||
|
InsertGuiPair(cant_open_project_page, "Non posso aprire la webpage del progetto");
|
||||||
|
InsertGuiPair(update_title, "Controllo per una nuova versione");
|
||||||
|
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_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.");
|
||||||
|
InsertGuiPair(update_no_new_version2, "Hai la versione piu aggiornata.");
|
||||||
|
InsertGuiPair(update_download_from, "Scaricamento da...");
|
||||||
|
#ifndef TTCALC_PORTABLE
|
||||||
|
InsertGuiPair(update_downloaded_info1, "E' stato scaricato un nuovo programma di installazione.");
|
||||||
|
InsertGuiPair(update_downloaded_info2, "Premi Finito per chiudere TTCalc far partire l'installazione.");
|
||||||
|
#else
|
||||||
|
InsertGuiPair(update_downloaded_info1, "E' stata scaricata una nuova versione di TTCalc.");
|
||||||
|
InsertGuiPair(update_downloaded_info2, "");
|
||||||
|
#endif
|
||||||
|
InsertGuiPair(update_download_error, "Si e verificato un problema durante il download, prova piu tardi.");
|
||||||
|
|
||||||
|
InsertGuiPair(pad_title, "Pad");
|
||||||
|
InsertGuiPair(pad_menu_file, "&File");
|
||||||
|
InsertGuiPair(pad_menu_edit, "&Modifica");
|
||||||
|
InsertGuiPair(pad_menu_file_new, "&Nuovo"); // temporarily not used
|
||||||
|
InsertGuiPair(pad_menu_file_open, "&Apri...");
|
||||||
|
InsertGuiPair(pad_menu_file_saveas, "Salva &come...");
|
||||||
|
InsertGuiPair(pad_menu_file_close, "&Chiudi");
|
||||||
|
InsertGuiPair(pad_menu_edit_undo, "&Annulla \tCtrl+Z");
|
||||||
|
InsertGuiPair(pad_menu_edit_cut, "&Taglia \tCtrl+X");
|
||||||
|
InsertGuiPair(pad_menu_edit_copy, "&Copia \tCtrl+C");
|
||||||
|
InsertGuiPair(pad_menu_edit_paste, "&Incolla \tCtrl+V");
|
||||||
|
InsertGuiPair(pad_menu_edit_del, "&Elimina \tDel");
|
||||||
|
InsertGuiPair(pad_menu_edit_select_all, "Seleziona &tutto \tCtrl+A");
|
||||||
|
|
||||||
|
InsertGuiPair(cannot_open_file, "Non posso aprire il file");
|
||||||
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2009, Tomasz Sowa
|
* Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -131,6 +131,7 @@ public:
|
|||||||
menu_view_lang_chinese,
|
menu_view_lang_chinese,
|
||||||
menu_view_lang_russian,
|
menu_view_lang_russian,
|
||||||
menu_view_lang_swedish,
|
menu_view_lang_swedish,
|
||||||
|
menu_view_lang_italian,
|
||||||
menu_view_close_program,
|
menu_view_close_program,
|
||||||
menu_edit_undo,
|
menu_edit_undo,
|
||||||
menu_edit_cut,
|
menu_edit_cut,
|
||||||
@@ -142,6 +143,7 @@ public:
|
|||||||
menu_edit_copy_both,
|
menu_edit_copy_both,
|
||||||
menu_edit_select_all,
|
menu_edit_select_all,
|
||||||
menu_edit_bracket,
|
menu_edit_bracket,
|
||||||
|
menu_edit_swap,
|
||||||
menu_help_help,
|
menu_help_help,
|
||||||
menu_help_project_page,
|
menu_help_project_page,
|
||||||
menu_help_check_update,
|
menu_help_check_update,
|
||||||
@@ -162,7 +164,8 @@ public:
|
|||||||
update_check_at_startup,
|
update_check_at_startup,
|
||||||
update_check_for_info,
|
update_check_for_info,
|
||||||
update_is_new_version,
|
update_is_new_version,
|
||||||
update_no_new_version,
|
update_no_new_version1,
|
||||||
|
update_no_new_version2,
|
||||||
update_download_from,
|
update_download_from,
|
||||||
update_downloaded_info1,
|
update_downloaded_info1,
|
||||||
update_downloaded_info2,
|
update_downloaded_info2,
|
||||||
@@ -186,6 +189,10 @@ public:
|
|||||||
pad_menu_edit_paste,
|
pad_menu_edit_paste,
|
||||||
pad_menu_edit_del,
|
pad_menu_edit_del,
|
||||||
pad_menu_edit_select_all,
|
pad_menu_edit_select_all,
|
||||||
|
cannot_open_file,
|
||||||
|
cannot_save_file,
|
||||||
|
file_too_long,
|
||||||
|
other_error,
|
||||||
unknown_error
|
unknown_error
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -194,7 +201,7 @@ public:
|
|||||||
// (after conversion to 'int' we pass it into the std::vector)
|
// (after conversion to 'int' we pass it into the std::vector)
|
||||||
enum Country
|
enum Country
|
||||||
{
|
{
|
||||||
en = 0, pl, sp, da, chn, ru, swe
|
en = 0, pl, sp, da, chn, ru, swe, it
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2009, Tomasz Sowa
|
* Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -41,33 +41,14 @@
|
|||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include "pad.h"
|
#include "pad.h"
|
||||||
#include "bigtypes.h"
|
#include "bigtypes.h"
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace MainWindowFunctions
|
namespace MainWindowFunctions
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
int ToLower(int c)
|
|
||||||
{
|
|
||||||
if( c>='A' && c<='Z' )
|
|
||||||
return c - 'A' + 'a';
|
|
||||||
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
this function compares two strings
|
|
||||||
(case insensitive)
|
|
||||||
*/
|
|
||||||
bool EqualStrings(const char * str1, const char * str2)
|
|
||||||
{
|
|
||||||
for( ; ToLower(*str1) == ToLower(*str2) ; ++str1, ++str2 )
|
|
||||||
if( *str1 == 0 )
|
|
||||||
return true; // *str2 will be 0 too
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -426,6 +407,7 @@ HMENU menu = GetMenu(hWnd);
|
|||||||
SetMenuLanguageItem(menu, IDM_LANGUAGE_CHINESE, Languages::menu_view_lang_chinese);
|
SetMenuLanguageItem(menu, IDM_LANGUAGE_CHINESE, Languages::menu_view_lang_chinese);
|
||||||
SetMenuLanguageItem(menu, IDM_LANGUAGE_RUSSIAN, Languages::menu_view_lang_russian);
|
SetMenuLanguageItem(menu, IDM_LANGUAGE_RUSSIAN, Languages::menu_view_lang_russian);
|
||||||
SetMenuLanguageItem(menu, IDM_LANGUAGE_SWEDISH, Languages::menu_view_lang_swedish);
|
SetMenuLanguageItem(menu, IDM_LANGUAGE_SWEDISH, Languages::menu_view_lang_swedish);
|
||||||
|
SetMenuLanguageItem(menu, IDM_LANGUAGE_ITALIAN, Languages::menu_view_lang_italian);
|
||||||
SetMenuLanguageItem(menu, IDM_CLOSE_PROGRAM, Languages::menu_view_close_program);
|
SetMenuLanguageItem(menu, IDM_CLOSE_PROGRAM, Languages::menu_view_close_program);
|
||||||
SetMenuLanguageItem(menu, IDM_EDIT_UNDO, Languages::menu_edit_undo);
|
SetMenuLanguageItem(menu, IDM_EDIT_UNDO, Languages::menu_edit_undo);
|
||||||
SetMenuLanguageItem(menu, IDM_EDIT_CUT, Languages::menu_edit_cut);
|
SetMenuLanguageItem(menu, IDM_EDIT_CUT, Languages::menu_edit_cut);
|
||||||
@@ -437,6 +419,7 @@ HMENU menu = GetMenu(hWnd);
|
|||||||
SetMenuLanguageItem(menu, IDM_EDIT_COPY_BOTH, Languages::menu_edit_copy_both);
|
SetMenuLanguageItem(menu, IDM_EDIT_COPY_BOTH, Languages::menu_edit_copy_both);
|
||||||
SetMenuLanguageItem(menu, IDM_EDIT_SELECT_ALL, Languages::menu_edit_select_all);
|
SetMenuLanguageItem(menu, IDM_EDIT_SELECT_ALL, Languages::menu_edit_select_all);
|
||||||
SetMenuLanguageItem(menu, IDM_EDIT_BRACKET, Languages::menu_edit_bracket);
|
SetMenuLanguageItem(menu, IDM_EDIT_BRACKET, Languages::menu_edit_bracket);
|
||||||
|
SetMenuLanguageItem(menu, IDM_EDIT_SWAP, Languages::menu_edit_swap);
|
||||||
SetMenuLanguageItem(menu, IDM_HELP_HELP, Languages::menu_help_help);
|
SetMenuLanguageItem(menu, IDM_HELP_HELP, Languages::menu_help_help);
|
||||||
SetMenuLanguageItem(menu, IDM_HELP_PROJECT_PAGE, Languages::menu_help_project_page);
|
SetMenuLanguageItem(menu, IDM_HELP_PROJECT_PAGE, Languages::menu_help_project_page);
|
||||||
SetMenuLanguageItem(menu, IDM_HELP_CHECK_UPDATE, Languages::menu_help_check_update);
|
SetMenuLanguageItem(menu, IDM_HELP_CHECK_UPDATE, Languages::menu_help_check_update);
|
||||||
@@ -833,6 +816,9 @@ void WmInitMenuPopUpView(HMENU menu)
|
|||||||
else
|
else
|
||||||
if( lang == Languages::swe )
|
if( lang == Languages::swe )
|
||||||
CheckMenuItem(menu, IDM_LANGUAGE_SWEDISH, MF_BYCOMMAND|MF_CHECKED);
|
CheckMenuItem(menu, IDM_LANGUAGE_SWEDISH, MF_BYCOMMAND|MF_CHECKED);
|
||||||
|
else
|
||||||
|
if( lang == Languages::it )
|
||||||
|
CheckMenuItem(menu, IDM_LANGUAGE_ITALIAN, MF_BYCOMMAND|MF_CHECKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -921,6 +907,11 @@ bool edit_readonly = false; // the edit is read only
|
|||||||
EnableMenuItem(menu,IDM_EDIT_BRACKET,MF_BYCOMMAND | MF_GRAYED);
|
EnableMenuItem(menu,IDM_EDIT_BRACKET,MF_BYCOMMAND | MF_GRAYED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// swap
|
||||||
|
if( output_size > 0 )
|
||||||
|
EnableMenuItem(menu, IDM_EDIT_SWAP, MF_BYCOMMAND | MF_ENABLED);
|
||||||
|
else
|
||||||
|
EnableMenuItem(menu, IDM_EDIT_SWAP, MF_BYCOMMAND | MF_GRAYED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1127,6 +1118,24 @@ return true;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BOOL WmCommand_EditSwap(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
char * buf = GetPrgRes()->GetBufferTemp();
|
||||||
|
GetDlgItemText(hWnd, IDC_OUTPUT_EDIT, buf, GetPrgRes()->GetBufferSize());
|
||||||
|
|
||||||
|
if( buf[0] == 0 )
|
||||||
|
return true; // output edit is empty
|
||||||
|
|
||||||
|
SetDlgItemText(hWnd, IDC_INPUT_EDIT, buf);
|
||||||
|
|
||||||
|
// setting the caret at the end of the input edit
|
||||||
|
int len = SendDlgItemMessage(hWnd, IDC_INPUT_EDIT, EM_LINELENGTH, 0, 0);
|
||||||
|
SendDlgItemMessage(hWnd, IDC_INPUT_EDIT, EM_SETSEL, len, len);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL WmCommand_EditCopyResult(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL WmCommand_EditCopyResult(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
CopyResult();
|
CopyResult();
|
||||||
@@ -1134,6 +1143,7 @@ BOOL WmCommand_EditCopyResult(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL WmCommand_EditCopyBoth(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL WmCommand_EditCopyBoth(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
unsigned int in_len = SendDlgItemMessage(hWnd, IDC_INPUT_EDIT, EM_LINELENGTH, 0, 0);
|
unsigned int in_len = SendDlgItemMessage(hWnd, IDC_INPUT_EDIT, EM_LINELENGTH, 0, 0);
|
||||||
@@ -1329,6 +1339,18 @@ BOOL WmCommand_LanguageSwedish(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL WmCommand_LanguageItalian(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
GetPrgRes()->GetLanguages()->SetCurrentLanguage(Languages::it);
|
||||||
|
|
||||||
|
SetMenuLanguage(hWnd);
|
||||||
|
SetOutputEditLanguage(hWnd);
|
||||||
|
TabWindowFunctions::SetLanguage( GetDlgItem(hWnd, IDC_TAB) );
|
||||||
|
SetPadLanguage();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL WmHelp(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL WmHelp(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
@@ -1423,6 +1445,7 @@ void CreateCommandMessagesTable(Messages<BOOL> & cmessages)
|
|||||||
cmessages.Associate(IDM_EDIT_PASTE, WmCommand_EditPaste);
|
cmessages.Associate(IDM_EDIT_PASTE, WmCommand_EditPaste);
|
||||||
cmessages.Associate(IDM_EDIT_DEL, WmCommand_EditDel);
|
cmessages.Associate(IDM_EDIT_DEL, WmCommand_EditDel);
|
||||||
cmessages.Associate(IDM_EDIT_BRACKET, WmCommand_EditBracket);
|
cmessages.Associate(IDM_EDIT_BRACKET, WmCommand_EditBracket);
|
||||||
|
cmessages.Associate(IDM_EDIT_SWAP, WmCommand_EditSwap);
|
||||||
cmessages.Associate(IDCANCEL, WmCommand_IDCANCEL);
|
cmessages.Associate(IDCANCEL, WmCommand_IDCANCEL);
|
||||||
cmessages.Associate(IDM_EDIT_SELECT_ALL, WmCommand_IDCANCEL);
|
cmessages.Associate(IDM_EDIT_SELECT_ALL, WmCommand_IDCANCEL);
|
||||||
cmessages.Associate(IDM_LANGUAGE_ENGLISH, WmCommand_LanguageEnglish);
|
cmessages.Associate(IDM_LANGUAGE_ENGLISH, WmCommand_LanguageEnglish);
|
||||||
@@ -1432,6 +1455,7 @@ void CreateCommandMessagesTable(Messages<BOOL> & cmessages)
|
|||||||
cmessages.Associate(IDM_LANGUAGE_CHINESE, WmCommand_LanguageChinese);
|
cmessages.Associate(IDM_LANGUAGE_CHINESE, WmCommand_LanguageChinese);
|
||||||
cmessages.Associate(IDM_LANGUAGE_RUSSIAN, WmCommand_LanguageRussian);
|
cmessages.Associate(IDM_LANGUAGE_RUSSIAN, WmCommand_LanguageRussian);
|
||||||
cmessages.Associate(IDM_LANGUAGE_SWEDISH, WmCommand_LanguageSwedish);
|
cmessages.Associate(IDM_LANGUAGE_SWEDISH, WmCommand_LanguageSwedish);
|
||||||
|
cmessages.Associate(IDM_LANGUAGE_ITALIAN, WmCommand_LanguageItalian);
|
||||||
cmessages.Associate(IDM_HELP_HELP, WmHelp);
|
cmessages.Associate(IDM_HELP_HELP, WmHelp);
|
||||||
cmessages.Associate(IDM_HELP_PROJECT_PAGE, WmProjectPage);
|
cmessages.Associate(IDM_HELP_PROJECT_PAGE, WmProjectPage);
|
||||||
}
|
}
|
||||||
|
78
src/misc.cpp
Normal file
78
src/misc.cpp
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of TTCalc - a mathematical calculator
|
||||||
|
* and is distributed under the (new) BSD licence.
|
||||||
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
||||||
|
* project may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int ToLower(int c)
|
||||||
|
{
|
||||||
|
if( c>='A' && c<='Z' )
|
||||||
|
return c - 'A' + 'a';
|
||||||
|
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
this function compares two strings
|
||||||
|
(case insensitive)
|
||||||
|
*/
|
||||||
|
bool EqualStrings(const char * str1, const char * str2)
|
||||||
|
{
|
||||||
|
for( ; ToLower(*str1) == ToLower(*str2) ; ++str1, ++str2 )
|
||||||
|
if( *str1 == 0 )
|
||||||
|
return true; // *str2 will be 0 too
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
returning true if short_str is a substring of long_str (no case-sensitive)
|
||||||
|
*/
|
||||||
|
bool IsSubStringNoCase(const char * short_str, const char * long_str)
|
||||||
|
{
|
||||||
|
while( *short_str && *long_str && ToLower(*short_str) == ToLower(*long_str) )
|
||||||
|
{
|
||||||
|
++short_str;
|
||||||
|
++long_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( *short_str == 0 )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
47
src/misc.h
Normal file
47
src/misc.h
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of TTCalc - a mathematical calculator
|
||||||
|
* and is distributed under the (new) BSD licence.
|
||||||
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
||||||
|
* project may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef headerfilemisc
|
||||||
|
#define headerfilemisc
|
||||||
|
|
||||||
|
int ToLower(int c);
|
||||||
|
bool EqualStrings(const char * str1, const char * str2);
|
||||||
|
bool IsSubStringNoCase(const char * short_str, const char * long_str);
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
61
src/pad.cpp
61
src/pad.cpp
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2009, Tomasz Sowa
|
* Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -61,10 +61,20 @@ int when_scientific;
|
|||||||
int rounding;
|
int rounding;
|
||||||
bool remove_zeroes;
|
bool remove_zeroes;
|
||||||
int angle_deg_rad_grad;
|
int angle_deg_rad_grad;
|
||||||
|
|
||||||
char decimal_point;
|
char decimal_point;
|
||||||
|
char grouping;
|
||||||
|
char input_comma1;
|
||||||
|
char input_comma2;
|
||||||
|
char param_sep;
|
||||||
|
|
||||||
Languages::Country country;
|
Languages::Country country;
|
||||||
|
|
||||||
|
int last_variables_id;
|
||||||
|
int last_functions_id;
|
||||||
ttmath::Objects * variables;
|
ttmath::Objects * variables;
|
||||||
ttmath::Objects * functions;
|
ttmath::Objects * functions;
|
||||||
|
|
||||||
ttmath::ErrorCode code;
|
ttmath::ErrorCode code;
|
||||||
bool calculated;
|
bool calculated;
|
||||||
|
|
||||||
@@ -114,7 +124,17 @@ unsigned int i = 0;
|
|||||||
{
|
{
|
||||||
ValueType result = matparser.stack[i].value;
|
ValueType result = matparser.stack[i].value;
|
||||||
|
|
||||||
if( result.ToString(res2, base_output, always_scientific, when_scientific, rounding, remove_zeroes, decimal_point) )
|
ttmath::Conv conv;
|
||||||
|
|
||||||
|
conv.base = base_output;
|
||||||
|
conv.scient = always_scientific;
|
||||||
|
conv.scient_from = when_scientific;
|
||||||
|
conv.round = rounding;
|
||||||
|
conv.trim_zeroes = remove_zeroes;
|
||||||
|
conv.comma = decimal_point;
|
||||||
|
conv.group = grouping;
|
||||||
|
|
||||||
|
if( result.ToString(res2, conv) )
|
||||||
res2 = GetPrgRes()->GetLanguages()->GuiMessage(country, Languages::overflow_during_printing);
|
res2 = GetPrgRes()->GetLanguages()->GuiMessage(country, Languages::overflow_during_printing);
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
@@ -217,8 +237,12 @@ void ParseString(ttmath::Parser<ValueType> & matparser)
|
|||||||
{
|
{
|
||||||
matparser.SetBase(base_input);
|
matparser.SetBase(base_input);
|
||||||
matparser.SetDegRadGrad(angle_deg_rad_grad);
|
matparser.SetDegRadGrad(angle_deg_rad_grad);
|
||||||
matparser.SetFunctions(functions);
|
matparser.SetComma(input_comma1, input_comma2);
|
||||||
|
matparser.SetGroup(grouping);
|
||||||
|
matparser.SetParamSep(param_sep);
|
||||||
|
|
||||||
matparser.SetVariables(variables);
|
matparser.SetVariables(variables);
|
||||||
|
matparser.SetFunctions(functions);
|
||||||
|
|
||||||
code = matparser.Parse(parse_string.c_str());
|
code = matparser.Parse(parse_string.c_str());
|
||||||
|
|
||||||
@@ -237,11 +261,11 @@ void SetParameters()
|
|||||||
remove_zeroes = GetPrgRes()->GetRemovingZeroes();
|
remove_zeroes = GetPrgRes()->GetRemovingZeroes();
|
||||||
angle_deg_rad_grad = GetPrgRes()->GetDegRadGrad();
|
angle_deg_rad_grad = GetPrgRes()->GetDegRadGrad();
|
||||||
country = GetPrgRes()->GetLanguages()->GetCurrentLanguage();
|
country = GetPrgRes()->GetLanguages()->GetCurrentLanguage();
|
||||||
|
decimal_point = GetPrgRes()->GetDecimalPointChar();
|
||||||
|
grouping = GetPrgRes()->GetGroupingChar();
|
||||||
|
param_sep = GetPrgRes()->GetParamSepChar();
|
||||||
|
|
||||||
if( GetPrgRes()->GetDecimalPoint() == 0 )
|
GetPrgRes()->GetInputDecimalPointChar(&input_comma1, &input_comma2);
|
||||||
decimal_point = '.';
|
|
||||||
else
|
|
||||||
decimal_point = ',';
|
|
||||||
|
|
||||||
variables = GetPrgRes()->GetVariables();
|
variables = GetPrgRes()->GetVariables();
|
||||||
functions = GetPrgRes()->GetFunctions();
|
functions = GetPrgRes()->GetFunctions();
|
||||||
@@ -338,6 +362,8 @@ Languages * pLang = GetPrgRes()->GetLanguages();
|
|||||||
ModifyMenu(menu, menu_id, MF_BYCOMMAND|MF_STRING, menu_id, pLang->GuiMessage(msg) );
|
ModifyMenu(menu, menu_id, MF_BYCOMMAND|MF_STRING, menu_id, pLang->GuiMessage(msg) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SetPadMenuLanguage(HWND hWnd)
|
void SetPadMenuLanguage(HWND hWnd)
|
||||||
{
|
{
|
||||||
HMENU menu = GetMenu(hWnd);
|
HMENU menu = GetMenu(hWnd);
|
||||||
@@ -545,11 +571,12 @@ LRESULT PadOpen(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
|
|
||||||
|
|
||||||
std::ifstream file(file_name.c_str(), std::ios_base::in | std::ios_base::binary);
|
std::ifstream file(file_name.c_str(), std::ios_base::in | std::ios_base::binary);
|
||||||
|
Languages * lang = GetPrgRes()->GetLanguages();
|
||||||
|
|
||||||
if( !file )
|
if( !file )
|
||||||
{
|
{
|
||||||
MessageBox(hwnd, "I cannot open the file", "TTcalc", MB_ICONERROR);
|
MessageBox(hwnd, lang->GuiMessage(Languages::cannot_open_file),
|
||||||
|
lang->GuiMessage(Languages::message_box_error_caption), MB_ICONERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -558,7 +585,8 @@ LRESULT PadOpen(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
|
|
||||||
if( pos > 65530 )
|
if( pos > 65530 )
|
||||||
{
|
{
|
||||||
MessageBox(hwnd, "The file is too long", "TTcalc", MB_ICONERROR);
|
MessageBox(hwnd, lang->GuiMessage(Languages::file_too_long),
|
||||||
|
lang->GuiMessage(Languages::message_box_error_caption), MB_ICONERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -618,7 +646,9 @@ void SaveBuffer(HWND hwnd, const char * buf)
|
|||||||
|
|
||||||
if( !file )
|
if( !file )
|
||||||
{
|
{
|
||||||
MessageBox(hwnd, "I cannot open the file for saving", "TTCalc", MB_ICONERROR);
|
Languages * lang = GetPrgRes()->GetLanguages();
|
||||||
|
MessageBox(hwnd, lang->GuiMessage(Languages::cannot_save_file),
|
||||||
|
lang->GuiMessage(Languages::message_box_error_caption), MB_ICONERROR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -635,12 +665,13 @@ LRESULT PadSave(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
if( !SaveDialog(hwnd) )
|
if( !SaveDialog(hwnd) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Languages * lang = GetPrgRes()->GetLanguages();
|
||||||
HLOCAL handle = (HLOCAL)SendMessage(edit, EM_GETHANDLE, 0, 0);
|
HLOCAL handle = (HLOCAL)SendMessage(edit, EM_GETHANDLE, 0, 0);
|
||||||
|
|
||||||
if( handle == 0 )
|
if( handle == 0 )
|
||||||
{
|
{
|
||||||
MessageBox(hwnd, "There was a problem with saving", "TTCalc", MB_ICONERROR);
|
MessageBox(hwnd, lang->GuiMessage(Languages::other_error),
|
||||||
|
lang->GuiMessage(Languages::message_box_error_caption), MB_ICONERROR);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -649,7 +680,8 @@ LRESULT PadSave(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
if( buf )
|
if( buf )
|
||||||
SaveBuffer(hwnd, buf);
|
SaveBuffer(hwnd, buf);
|
||||||
else
|
else
|
||||||
MessageBox(hwnd, "There was a problem with saving", "TTCalc", MB_ICONERROR);
|
MessageBox(hwnd, lang->GuiMessage(Languages::other_error),
|
||||||
|
lang->GuiMessage(Languages::message_box_error_caption), MB_ICONERROR);
|
||||||
|
|
||||||
LocalUnlock(handle);
|
LocalUnlock(handle);
|
||||||
|
|
||||||
@@ -878,6 +910,7 @@ ATOM a = RegisterPadClass(ttcalc_pad_class_name);
|
|||||||
0 /*GetPrgRes()->GetMainWindow()*/, 0, GetPrgRes()->GetInstance(), 0);
|
0 /*GetPrgRes()->GetMainWindow()*/, 0, GetPrgRes()->GetInstance(), 0);
|
||||||
|
|
||||||
GetPrgRes()->SetPadWindow(pad);
|
GetPrgRes()->SetPadWindow(pad);
|
||||||
|
SetPadLanguage();
|
||||||
GetPrgRes()->SetPadMaximized( pad_maximized_from_file );
|
GetPrgRes()->SetPadMaximized( pad_maximized_from_file );
|
||||||
GetPrgRes()->ShowPad( GetPrgRes()->IsPadVisible() );
|
GetPrgRes()->ShowPad( GetPrgRes()->IsPadVisible() );
|
||||||
|
|
||||||
|
@@ -89,6 +89,8 @@ ttmath::ErrorCode ParserManager::GetLastCode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ttmath::ErrorCode ParserManager::Parse()
|
ttmath::ErrorCode ParserManager::Parse()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -98,41 +100,21 @@ ttmath::ErrorCode ParserManager::Parse()
|
|||||||
switch( precision )
|
switch( precision )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
parser1.SetBase(base_input);
|
Parse(parser1);
|
||||||
parser1.SetDegRadGrad(angle_deg_rad_grad);
|
|
||||||
parser1.SetComma(input_comma1, input_comma2);
|
|
||||||
parser1.SetGroup(grouping);
|
|
||||||
parser1.SetParamSep(param_sep);
|
|
||||||
code = parser1.Parse(buffer);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
parser2.SetBase(base_input);
|
Parse(parser2);
|
||||||
parser2.SetDegRadGrad(angle_deg_rad_grad);
|
|
||||||
parser2.SetComma(input_comma1, input_comma2);
|
|
||||||
parser2.SetGroup(grouping);
|
|
||||||
parser2.SetParamSep(param_sep);
|
|
||||||
code = parser2.Parse(buffer);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
parser3.SetBase(base_input);
|
Parse(parser3);
|
||||||
parser3.SetDegRadGrad(angle_deg_rad_grad);
|
|
||||||
parser3.SetComma(input_comma1, input_comma2);
|
|
||||||
parser3.SetGroup(grouping);
|
|
||||||
parser3.SetParamSep(param_sep);
|
|
||||||
code = parser3.Parse(buffer);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
parser1.SetBase(base_input);
|
Parse(parser1);
|
||||||
parser1.SetDegRadGrad(angle_deg_rad_grad);
|
|
||||||
parser1.SetComma(input_comma1, input_comma2);
|
|
||||||
parser1.SetGroup(grouping);
|
|
||||||
parser1.SetParamSep(param_sep);
|
|
||||||
code = parser1.Parse(buffer);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -170,10 +152,9 @@ unsigned int i;
|
|||||||
last_functions_id = GetPrgRes()->GetFunctionsId();
|
last_functions_id = GetPrgRes()->GetFunctionsId();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
base_input = GetPrgRes()->GetBaseInput();
|
|
||||||
base_output = GetPrgRes()->GetBaseOutput();
|
|
||||||
|
|
||||||
|
base_input = GetPrgRes()->GetBaseInput();
|
||||||
|
base_output = GetPrgRes()->GetBaseOutput();
|
||||||
always_scientific = GetPrgRes()->GetDisplayAlwaysScientific();
|
always_scientific = GetPrgRes()->GetDisplayAlwaysScientific();
|
||||||
when_scientific = GetPrgRes()->GetDisplayWhenScientific();
|
when_scientific = GetPrgRes()->GetDisplayWhenScientific();
|
||||||
rounding = GetPrgRes()->GetDisplayRounding();
|
rounding = GetPrgRes()->GetDisplayRounding();
|
||||||
@@ -181,55 +162,14 @@ unsigned int i;
|
|||||||
remove_zeroes = GetPrgRes()->GetRemovingZeroes();
|
remove_zeroes = GetPrgRes()->GetRemovingZeroes();
|
||||||
angle_deg_rad_grad = GetPrgRes()->GetDegRadGrad();
|
angle_deg_rad_grad = GetPrgRes()->GetDegRadGrad();
|
||||||
country = GetPrgRes()->GetLanguages()->GetCurrentLanguage();
|
country = GetPrgRes()->GetLanguages()->GetCurrentLanguage();
|
||||||
|
decimal_point = GetPrgRes()->GetDecimalPointChar();
|
||||||
|
grouping = GetPrgRes()->GetGroupingChar();
|
||||||
|
param_sep = GetPrgRes()->GetParamSepChar();
|
||||||
|
|
||||||
|
GetPrgRes()->GetInputDecimalPointChar(&input_comma1, &input_comma2);
|
||||||
|
|
||||||
conv_type = GetPrgRes()->GetConvert()->GetCurrentType();
|
conv_type = GetPrgRes()->GetConvert()->GetCurrentType();
|
||||||
GetPrgRes()->GetConvert()->GetCurrentUnit(conv_type, conv_input_unit, conv_output_unit);
|
GetPrgRes()->GetConvert()->GetCurrentUnit(conv_type, conv_input_unit, conv_output_unit);
|
||||||
|
|
||||||
if( GetPrgRes()->GetDecimalPoint() == 0 )
|
|
||||||
decimal_point = '.';
|
|
||||||
else
|
|
||||||
decimal_point = ',';
|
|
||||||
|
|
||||||
// grouping
|
|
||||||
static char group_table[] = "\0 `'.,"; // 5 items
|
|
||||||
|
|
||||||
int g = GetPrgRes()->GetGrouping();
|
|
||||||
|
|
||||||
if( g>=0 && g<=5 )
|
|
||||||
grouping = group_table[g];
|
|
||||||
else
|
|
||||||
grouping = 0;
|
|
||||||
|
|
||||||
// input decimal point
|
|
||||||
switch( GetPrgRes()->GetInputDecimalPoint() )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
input_comma1 = '.';
|
|
||||||
input_comma2 = ',';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
input_comma1 = '.';
|
|
||||||
input_comma2 = 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
default:
|
|
||||||
input_comma1 = ',';
|
|
||||||
input_comma2 = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// additional param separator
|
|
||||||
static char param_table[] = ";.,"; // 3 items
|
|
||||||
|
|
||||||
g = GetPrgRes()->GetParamSep();
|
|
||||||
|
|
||||||
if( g>=0 && g<=3 )
|
|
||||||
param_sep = param_table[g];
|
|
||||||
else
|
|
||||||
param_sep = ';';
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2009, Tomasz Sowa
|
* Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -134,12 +134,13 @@ private:
|
|||||||
int precision;
|
int precision;
|
||||||
Languages::Country country;
|
Languages::Country country;
|
||||||
ttmath::ErrorCode code;
|
ttmath::ErrorCode code;
|
||||||
char decimal_point;
|
|
||||||
int angle_deg_rad_grad;
|
int angle_deg_rad_grad;
|
||||||
int grouping;
|
|
||||||
int input_comma1;
|
char decimal_point;
|
||||||
int input_comma2;
|
char grouping;
|
||||||
int param_sep;
|
char input_comma1;
|
||||||
|
char input_comma2;
|
||||||
|
char param_sep;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
some buffers which we use in some method in the second thread,
|
some buffers which we use in some method in the second thread,
|
||||||
@@ -230,6 +231,18 @@ private:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class ValueType>
|
||||||
|
void Parse(ttmath::Parser<ValueType> & matparser)
|
||||||
|
{
|
||||||
|
matparser.SetBase(base_input);
|
||||||
|
matparser.SetDegRadGrad(angle_deg_rad_grad);
|
||||||
|
matparser.SetComma(input_comma1, input_comma2);
|
||||||
|
matparser.SetGroup(grouping);
|
||||||
|
matparser.SetParamSep(param_sep);
|
||||||
|
code = matparser.Parse(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -381,8 +381,78 @@ int ProgramResources::GetDecimalPoint()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char ProgramResources::GetDecimalPointChar()
|
||||||
|
{
|
||||||
|
char c;
|
||||||
|
|
||||||
|
if( GetDecimalPoint() == 0 )
|
||||||
|
c = '.';
|
||||||
|
else
|
||||||
|
c = ',';
|
||||||
|
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char ProgramResources::GetGroupingChar()
|
||||||
|
{
|
||||||
|
char c;
|
||||||
|
|
||||||
|
// grouping
|
||||||
|
static char group_table[] = "\0 `'.,"; // 5 items
|
||||||
|
|
||||||
|
int g = GetGrouping();
|
||||||
|
|
||||||
|
if( g>=0 && g<=5 )
|
||||||
|
c = group_table[g];
|
||||||
|
else
|
||||||
|
c = 0;
|
||||||
|
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ProgramResources::GetInputDecimalPointChar(char * comma1, char * comma2)
|
||||||
|
{
|
||||||
|
// input decimal point
|
||||||
|
switch( GetInputDecimalPoint() )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
*comma1 = '.';
|
||||||
|
*comma2 = ',';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
*comma1 = '.';
|
||||||
|
*comma2 = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
default:
|
||||||
|
*comma1 = ',';
|
||||||
|
*comma2 = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char ProgramResources::GetParamSepChar()
|
||||||
|
{
|
||||||
|
char c;
|
||||||
|
|
||||||
|
// additional param separator
|
||||||
|
static char param_table[] = ";.,"; // 3 items
|
||||||
|
|
||||||
|
int sep = GetParamSep();
|
||||||
|
|
||||||
|
if( sep>=0 && sep<=3 )
|
||||||
|
c = param_table[sep];
|
||||||
|
else
|
||||||
|
c = ';';
|
||||||
|
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
ttmath::Objects * ProgramResources::GetVariables()
|
ttmath::Objects * ProgramResources::GetVariables()
|
||||||
{
|
{
|
||||||
@@ -613,8 +683,8 @@ time_t ProgramResources::GetLastUpdate()
|
|||||||
|
|
||||||
ProgramResources::ProgramResources()
|
ProgramResources::ProgramResources()
|
||||||
{
|
{
|
||||||
// if you want to change the input buffer you have also to change
|
// if you want to change the input buffer you have to also change
|
||||||
// ParserManager::ParserManager() : buffer_len(2048) in parsermanager.cpp
|
// ParserManager::ParserManager() : buffer_len(20480) in parsermanager.cpp
|
||||||
buffer_size = 20480;
|
buffer_size = 20480;
|
||||||
|
|
||||||
buffer = new char[buffer_size];
|
buffer = new char[buffer_size];
|
||||||
@@ -826,6 +896,9 @@ static const char help_name[] = "ttcalc.chm";
|
|||||||
// which can be, for instance, as:
|
// which can be, for instance, as:
|
||||||
// "C:\Documents and Settings\user\data application" on WinNT
|
// "C:\Documents and Settings\user\data application" on WinNT
|
||||||
// or "C:\Windows\Data Application\" on Win9x
|
// or "C:\Windows\Data Application\" on Win9x
|
||||||
|
|
||||||
|
// we don't use SHGetFolderLocation() because it is not available on Win9x
|
||||||
|
|
||||||
if( ReadTextValueFromRegistry(
|
if( ReadTextValueFromRegistry(
|
||||||
HKEY_CURRENT_USER,
|
HKEY_CURRENT_USER,
|
||||||
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
|
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
|
||||||
@@ -1076,6 +1149,9 @@ std::string ini_value[30];
|
|||||||
if( !ini_value[15].empty() )
|
if( !ini_value[15].empty() )
|
||||||
SetRemovingZeroes( bool(atoi(ini_value[15].c_str())) );
|
SetRemovingZeroes( bool(atoi(ini_value[15].c_str())) );
|
||||||
|
|
||||||
|
if( ini_value[13] == "7" )
|
||||||
|
languages.SetCurrentLanguage(Languages::it);
|
||||||
|
else
|
||||||
if( ini_value[13] == "6" )
|
if( ini_value[13] == "6" )
|
||||||
languages.SetCurrentLanguage(Languages::swe);
|
languages.SetCurrentLanguage(Languages::swe);
|
||||||
else
|
else
|
||||||
|
@@ -366,14 +366,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
int GetBadLine();
|
int GetBadLine();
|
||||||
|
|
||||||
/*!
|
|
||||||
setting and returning the decimal point used during printig values
|
|
||||||
0 - '.'
|
|
||||||
1 - ','
|
|
||||||
*/
|
|
||||||
void SetDecimalPoint(int decimal);
|
|
||||||
int GetDecimalPoint();
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
setting and returning the state of removing trailing zeroes
|
setting and returning the state of removing trailing zeroes
|
||||||
@@ -418,6 +410,12 @@ public:
|
|||||||
int GetGrouping();
|
int GetGrouping();
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
returning the grouping character
|
||||||
|
*/
|
||||||
|
char GetGroupingChar();
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
setting/getting the input decimal point
|
setting/getting the input decimal point
|
||||||
0 - dot or comma, 1 - dot, 2 - comma
|
0 - dot or comma, 1 - dot, 2 - comma
|
||||||
@@ -426,14 +424,41 @@ public:
|
|||||||
int GetInputDecimalPoint();
|
int GetInputDecimalPoint();
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
returning the input decimal point characters
|
||||||
|
*/
|
||||||
|
void GetInputDecimalPointChar(char * comma1, char * comma2);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
setting and returning the decimal point used during printig values
|
||||||
|
0 - '.'
|
||||||
|
1 - ','
|
||||||
|
*/
|
||||||
|
void SetDecimalPoint(int decimal);
|
||||||
|
int GetDecimalPoint();
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
returning the decimal point char (used during printig values)
|
||||||
|
*/
|
||||||
|
char GetDecimalPointChar();
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
setting/getting the separator of function arguments
|
setting/getting the separator of function arguments
|
||||||
0 - semicolon, 1 - dot, 2 - comma
|
0 - semicolon, 1 - semicolon or dot, 2 - semicolon or comma
|
||||||
*/
|
*/
|
||||||
void SetParamSep(int s);
|
void SetParamSep(int s);
|
||||||
int GetParamSep();
|
int GetParamSep();
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
returning the character of param separator
|
||||||
|
either a semicolon, dot or comma
|
||||||
|
*/
|
||||||
|
char GetParamSepChar();
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
setting/getting the test which is made when the program starts
|
setting/getting the test which is made when the program starts
|
||||||
(testing for an update)
|
(testing for an update)
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2009, Tomasz Sowa
|
* Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -222,6 +222,7 @@
|
|||||||
#define IDM_LANGUAGE_CHINESE 40014
|
#define IDM_LANGUAGE_CHINESE 40014
|
||||||
#define IDM_LANGUAGE_RUSSIAN 40015
|
#define IDM_LANGUAGE_RUSSIAN 40015
|
||||||
#define IDM_LANGUAGE_SWEDISH 40016
|
#define IDM_LANGUAGE_SWEDISH 40016
|
||||||
|
#define IDM_LANGUAGE_ITALIAN 40017
|
||||||
#define IDM_CLOSE_PROGRAM 40020
|
#define IDM_CLOSE_PROGRAM 40020
|
||||||
|
|
||||||
#define IDM_EDIT_UNDO 40030
|
#define IDM_EDIT_UNDO 40030
|
||||||
@@ -234,6 +235,7 @@
|
|||||||
#define IDM_EDIT_PASTE_FORMULA 40037
|
#define IDM_EDIT_PASTE_FORMULA 40037
|
||||||
#define IDM_EDIT_SELECT_ALL 40038
|
#define IDM_EDIT_SELECT_ALL 40038
|
||||||
#define IDM_EDIT_BRACKET 40039
|
#define IDM_EDIT_BRACKET 40039
|
||||||
|
#define IDM_EDIT_SWAP 40040
|
||||||
|
|
||||||
#define IDM_HELP_HELP 40050
|
#define IDM_HELP_HELP 40050
|
||||||
#define IDM_HELP_PROJECT_PAGE 40051
|
#define IDM_HELP_PROJECT_PAGE 40051
|
||||||
|
@@ -34,6 +34,7 @@ BEGIN
|
|||||||
MENUITEM "Chinese", IDM_LANGUAGE_CHINESE
|
MENUITEM "Chinese", IDM_LANGUAGE_CHINESE
|
||||||
MENUITEM "Russian", IDM_LANGUAGE_RUSSIAN
|
MENUITEM "Russian", IDM_LANGUAGE_RUSSIAN
|
||||||
MENUITEM "Swedish", IDM_LANGUAGE_SWEDISH
|
MENUITEM "Swedish", IDM_LANGUAGE_SWEDISH
|
||||||
|
MENUITEM "Italian", IDM_LANGUAGE_ITALIAN
|
||||||
END
|
END
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Close", IDM_CLOSE_PROGRAM
|
MENUITEM "Close", IDM_CLOSE_PROGRAM
|
||||||
@@ -53,6 +54,7 @@ BEGIN
|
|||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Select all", IDM_EDIT_SELECT_ALL
|
MENUITEM "Select all", IDM_EDIT_SELECT_ALL
|
||||||
MENUITEM "Bracket", IDM_EDIT_BRACKET
|
MENUITEM "Bracket", IDM_EDIT_BRACKET
|
||||||
|
MENUITEM "Swap", IDM_EDIT_SWAP
|
||||||
END
|
END
|
||||||
POPUP "Help"
|
POPUP "Help"
|
||||||
BEGIN
|
BEGIN
|
||||||
@@ -333,27 +335,27 @@ END
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TTCALC_PORTABLE
|
#ifndef TTCALC_PORTABLE
|
||||||
200 DIALOG DISCARDABLE 0, 0, 349, 256
|
200 DIALOG DISCARDABLE 0, 0, 349, 284
|
||||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||||
WS_SYSMENU
|
WS_SYSMENU
|
||||||
CAPTION "About"
|
CAPTION "About"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL IDB_BITMAP_ABOUT,0,"Static",SS_BITMAP | SS_REALSIZEIMAGE,3,3,115,250
|
CONTROL 1201,0,"Static",SS_BITMAP | SS_REALSIZEIMAGE,3,3,115,277
|
||||||
EDITTEXT IDC_ABOUT_TEXT,128,11,215,212,ES_MULTILINE | ES_READONLY | NOT
|
EDITTEXT IDC_ABOUT_TEXT,128,11,215,243,ES_MULTILINE | ES_READONLY |
|
||||||
WS_BORDER | NOT WS_TABSTOP
|
NOT WS_BORDER | NOT WS_TABSTOP
|
||||||
DEFPUSHBUTTON "Close",IDOK,191,231,86,14
|
DEFPUSHBUTTON "Close",IDOK,191,259,86,14
|
||||||
END
|
END
|
||||||
#else
|
#else
|
||||||
200 DIALOG DISCARDABLE 0, 0, 268, 301
|
200 DIALOG DISCARDABLE 0, 0, 268, 322
|
||||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||||
WS_SYSMENU
|
WS_SYSMENU
|
||||||
CAPTION "About"
|
CAPTION "About"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
EDITTEXT IDC_ABOUT_TEXT,16,18,234,245,ES_MULTILINE | ES_READONLY |
|
EDITTEXT IDC_ABOUT_TEXT,16,18,234,269,ES_MULTILINE | ES_READONLY |
|
||||||
NOT WS_BORDER | NOT WS_TABSTOP
|
NOT WS_BORDER | NOT WS_TABSTOP
|
||||||
DEFPUSHBUTTON "Close",IDOK,90,274,86,14
|
DEFPUSHBUTTON "Close",IDOK,90,292,86,14
|
||||||
END
|
END
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
151
src/threadcontroller.cpp
Normal file
151
src/threadcontroller.cpp
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
/*
|
||||||
|
* This file is a part of TTCalc - a mathematical calculator
|
||||||
|
* and is distributed under the (new) BSD licence.
|
||||||
|
* Author: Tomasz Sowa <t.sowa@ttmath.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2006-2008, Tomasz Sowa
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* * Neither the name Tomasz Sowa nor the names of contributors to this
|
||||||
|
* project may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "threadcontroller.h"
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ThreadController::ThreadController()
|
||||||
|
{
|
||||||
|
calculations = 0;
|
||||||
|
ready_for_stop = 0;
|
||||||
|
exit_thread = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ThreadController::~ThreadController()
|
||||||
|
{
|
||||||
|
if(calculations) CloseHandle(calculations);
|
||||||
|
if(ready_for_stop) CloseHandle(ready_for_stop);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool ThreadController::Init() volatile
|
||||||
|
{
|
||||||
|
char * buffer = new char[300];
|
||||||
|
|
||||||
|
// with 'GetTickCount()' we're generating an unique identifier of our event
|
||||||
|
// (there can be another window of ttcalc)
|
||||||
|
sprintf((char*)buffer,"TTCalcEventForManagingThreads9928%u",
|
||||||
|
(unsigned int)GetTickCount());
|
||||||
|
|
||||||
|
// 'calculations' will be for auto-reseting and initialized as non-signaled
|
||||||
|
if( (calculations = CreateEvent(0,false,false,(char*)buffer))==NULL)
|
||||||
|
{
|
||||||
|
delete [] buffer;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
sprintf((char*)buffer,"TTCalcEventReadyForStop5567%u",
|
||||||
|
(unsigned int)GetTickCount());
|
||||||
|
|
||||||
|
// 'ready_for_stop' will be for manual-reseting and initialized as signaled
|
||||||
|
// 'manual-reset' means that we must call ResetEvent() function (from WinAPI)
|
||||||
|
// to manually reset the state to nonsignaled
|
||||||
|
if( (ready_for_stop = CreateEvent(0,true,true,(char*)buffer))==NULL)
|
||||||
|
{
|
||||||
|
delete [] buffer;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete [] buffer;
|
||||||
|
|
||||||
|
return stop_calculating.Init();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ThreadController::ReadyForStop() volatile
|
||||||
|
{
|
||||||
|
SetEvent( ready_for_stop );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ThreadController::StopCalculatingAndExitThread() volatile
|
||||||
|
{
|
||||||
|
WaitForSingleObject(ready_for_stop,INFINITE);
|
||||||
|
|
||||||
|
stop_calculating.Stop();
|
||||||
|
exit_thread = true;
|
||||||
|
SetEvent(calculations);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ThreadController::StopCalculating() volatile
|
||||||
|
{
|
||||||
|
WaitForSingleObject(ready_for_stop, INFINITE);
|
||||||
|
|
||||||
|
stop_calculating.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ThreadController::StartCalculating() volatile
|
||||||
|
{
|
||||||
|
SetEvent(calculations);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
volatile bool ThreadController::WaitForCalculatingAndBlockForStop() volatile
|
||||||
|
{
|
||||||
|
WaitForSingleObject(calculations,INFINITE);
|
||||||
|
ResetEvent(ready_for_stop);
|
||||||
|
|
||||||
|
stop_calculating.Start();
|
||||||
|
|
||||||
|
return !exit_thread;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const volatile ttmath::StopCalculating * ThreadController::GetStopObject() volatile const
|
||||||
|
{
|
||||||
|
return &stop_calculating;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool ThreadController::WasStopSignal() volatile const
|
||||||
|
{
|
||||||
|
return stop_calculating.WasStopSignal();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// private
|
||||||
|
ThreadController::ThreadController(const ThreadController &)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@@ -1,19 +1,19 @@
|
|||||||
# this file is downloaded from a webserver during checking for an update
|
# this file is downloaded from a webserver during checking for an update
|
||||||
|
|
||||||
[normal]
|
[normal]
|
||||||
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.0/ttcalc-0.9.0-setup.exe?use_mirror=dfn
|
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.2/ttcalc-0.9.2-setup.exe
|
||||||
filename = ttcalc-0.9.0-setup.exe
|
filename = ttcalc-0.9.2-setup.exe
|
||||||
version.major = 0
|
version.major = 0
|
||||||
version.minor = 9
|
version.minor = 9
|
||||||
version.revision = 0
|
version.revision = 2
|
||||||
version.prerelease = 0
|
version.prerelease = 0
|
||||||
|
|
||||||
[portable]
|
[portable]
|
||||||
url = http://downloads.sourceforge.net/project/ttcalc/ttcalc/ttcalc-0.9.0/ttcalc-portable-0.9.0-bin.tar.gz?use_mirror=dfn
|
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.0-bin.tar.gz
|
filename = ttcalc-portable-0.9.2-bin.tar.gz
|
||||||
version.major = 0
|
version.major = 0
|
||||||
version.minor = 9
|
version.minor = 9
|
||||||
version.revision = 0
|
version.revision = 2
|
||||||
version.prerelease = 0
|
version.prerelease = 0
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2009, Tomasz Sowa
|
* Copyright (c) 2006-2010, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -48,6 +48,8 @@
|
|||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "languages.h"
|
#include "languages.h"
|
||||||
#include "winmain.h"
|
#include "winmain.h"
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace Update
|
namespace Update
|
||||||
@@ -258,6 +260,20 @@ void DownloadProgram::Close()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
we check whether the download url is correct
|
||||||
|
this is in the case of someone hacked the server with *.ini file
|
||||||
|
*/
|
||||||
|
bool IsServerCorrect(const std::string & url)
|
||||||
|
{
|
||||||
|
if( IsSubStringNoCase("http://downloads.sourceforge.net/", url.c_str()) ||
|
||||||
|
IsSubStringNoCase("ftp://ttmath.org/", url.c_str()) )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
this method is called from the other thread too
|
this method is called from the other thread too
|
||||||
@@ -298,7 +314,7 @@ DownloadIni down_ini;
|
|||||||
|
|
||||||
IniParser::Error err = iparser.ReadFromFile( down_ini.GetFileName() );
|
IniParser::Error err = iparser.ReadFromFile( down_ini.GetFileName() );
|
||||||
|
|
||||||
if( err == IniParser::err_ok )
|
if( err == IniParser::err_ok && IsServerCorrect(url_) )
|
||||||
{
|
{
|
||||||
major_ = atoi(ini_value[0].c_str());
|
major_ = atoi(ini_value[0].c_str());
|
||||||
minor_ = atoi(ini_value[1].c_str());
|
minor_ = atoi(ini_value[1].c_str());
|
||||||
@@ -352,7 +368,8 @@ char buffer[200];
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
level = 100;
|
level = 100;
|
||||||
SetDlgItemText(hwnd, IDC_UPDATE_INFO1, pl->GuiMessage(Languages::update_no_new_version));
|
SetDlgItemText(hwnd, IDC_UPDATE_INFO1, pl->GuiMessage(Languages::update_no_new_version1));
|
||||||
|
SetDlgItemText(hwnd, IDC_UPDATE_INFO2, pl->GuiMessage(Languages::update_no_new_version2));
|
||||||
SetDlgItemText(hwnd, IDC_BUTTON_NEXT, pl->GuiMessage(Languages::update_button_finish));
|
SetDlgItemText(hwnd, IDC_BUTTON_NEXT, pl->GuiMessage(Languages::update_button_finish));
|
||||||
ShowWindow(GetDlgItem(hwnd, IDC_PROGRESS), SW_HIDE);
|
ShowWindow(GetDlgItem(hwnd, IDC_PROGRESS), SW_HIDE);
|
||||||
EnableWindow(GetDlgItem(hwnd, IDC_BUTTON_CANCEL), false);
|
EnableWindow(GetDlgItem(hwnd, IDC_BUTTON_CANCEL), false);
|
||||||
@@ -577,10 +594,16 @@ unsigned __stdcall UpdateBackgroundProc(void *)
|
|||||||
{
|
{
|
||||||
using namespace Background;
|
using namespace Background;
|
||||||
|
|
||||||
if( CheckUpdateFromIni(0, url_, remote_file_name_, major_, minor_, revision_, prerelease_, 0) )
|
try
|
||||||
|
{
|
||||||
|
if( CheckUpdateFromIni(0, url_, remote_file_name_, major_, minor_, revision_, prerelease_, 0) )
|
||||||
|
{
|
||||||
|
HWND main = GetPrgRes()->GetMainWindow();
|
||||||
|
SendMessage(main, WM_UPDATE_EXISTS, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
{
|
{
|
||||||
HWND main = GetPrgRes()->GetMainWindow();
|
|
||||||
SendMessage(main, WM_UPDATE_EXISTS, 0, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_endthreadex(0);
|
_endthreadex(0);
|
||||||
|
@@ -53,6 +53,8 @@
|
|||||||
*/
|
*/
|
||||||
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
GetPrgRes()->SetInstance(hInstance);
|
GetPrgRes()->SetInstance(hInstance);
|
||||||
|
|
||||||
// we're using GetLanguages() simultaneously in two threads, this is to be sure
|
// we're using GetLanguages() simultaneously in two threads, this is to be sure
|
||||||
@@ -112,6 +114,12 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
|||||||
DestroyPadWindow();
|
DestroyPadWindow();
|
||||||
CloseHandle( (HANDLE)thread_handle );
|
CloseHandle( (HANDLE)thread_handle );
|
||||||
|
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
ShowError( Languages::unknown_error );
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,6 +160,10 @@ bool sent = true;
|
|||||||
sent = SendMessage(GetPrgRes()->GetMainWindow(), WM_COMMAND, IDM_EDIT_COPY_BOTH, 0);
|
sent = SendMessage(GetPrgRes()->GetMainWindow(), WM_COMMAND, IDM_EDIT_COPY_BOTH, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'W':
|
||||||
|
sent = SendMessage(GetPrgRes()->GetMainWindow(), WM_COMMAND, IDM_EDIT_SWAP, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
case '0':
|
case '0':
|
||||||
SendMessage(GetPrgRes()->GetMainWindow(), WM_COMMAND, IDC_BUTTON_BRACKETS_ALL, 0);
|
SendMessage(GetPrgRes()->GetMainWindow(), WM_COMMAND, IDC_BUTTON_BRACKETS_ALL, 0);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user