added: ttcalc can be start with option: createconfig, e.g.
./ttcalc createconfig it creates a config file in the current directory and exists added: on variables and functions tab the carret is set at the end of a variable/function value (when edit) changed: column 'parameters' on functions tab has been enlarged changed: locales: "param." to "parameters" (english and german) git-svn-id: svn://ttmath.org/publicrep/ttcalc/trunk@341 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
8e9a459c9c
commit
6c0a4b110e
|
@ -1,4 +1,4 @@
|
||||||
Version 0.9.3 prerelease (2011.01.30):
|
Version 0.9.3 prerelease (2011.02.08):
|
||||||
* added: German translation made by
|
* added: German translation made by
|
||||||
Moritz Beleites <morbel at gmx.net>
|
Moritz Beleites <morbel at gmx.net>
|
||||||
* added: on display tab: an option how many digits should be grouped
|
* added: on display tab: an option how many digits should be grouped
|
||||||
|
|
|
@ -132,9 +132,9 @@ fi
|
||||||
|
|
||||||
if [ $d = "y" -o $d = "Y" ]
|
if [ $d = "y" -o $d = "Y" ]
|
||||||
then
|
then
|
||||||
cp ../setup/ttcalc-setup.exe ./$n-setup.exe
|
|
||||||
else
|
|
||||||
cp ../setup/ttcalc-setup.exe ./$n-setup.$datestr.exe
|
cp ../setup/ttcalc-setup.exe ./$n-setup.$datestr.exe
|
||||||
|
else
|
||||||
|
cp ../setup/ttcalc-setup.exe ./$n-setup.exe
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -176,7 +176,8 @@ fi
|
||||||
|
|
||||||
mkdir $n
|
mkdir $n
|
||||||
cp ../src/ttcalcp.exe $n
|
cp ../src/ttcalcp.exe $n
|
||||||
cp ../src/ttcalc.ini $n
|
$n/ttcalcp.exe createconfig
|
||||||
|
mv ttcalc.ini $n
|
||||||
mv ttcalc.chm $n
|
mv ttcalc.chm $n
|
||||||
cp ../COPYRIGHT $n
|
cp ../COPYRIGHT $n
|
||||||
cp ../README $n
|
cp ../README $n
|
||||||
|
@ -234,7 +235,6 @@ cp ../help/* $n/ttcalc/help
|
||||||
cp ../res/* $n/ttcalc/res
|
cp ../res/* $n/ttcalc/res
|
||||||
cp ../setup/* $n/ttcalc/setup
|
cp ../setup/* $n/ttcalc/setup
|
||||||
cp ../src/* $n/ttcalc/src
|
cp ../src/* $n/ttcalc/src
|
||||||
rm $n/ttcalc/src/*.ini
|
|
||||||
cp ../COPYRIGHT $n/ttcalc
|
cp ../COPYRIGHT $n/ttcalc
|
||||||
cp ../README $n/ttcalc
|
cp ../README $n/ttcalc
|
||||||
cp ../CHANGELOG $n/ttcalc
|
cp ../CHANGELOG $n/ttcalc
|
||||||
|
@ -251,6 +251,13 @@ md5sum * > note.txt.md5
|
||||||
echo "MD5 SUMS" > note.txt
|
echo "MD5 SUMS" > note.txt
|
||||||
echo "--------" >> note.txt
|
echo "--------" >> note.txt
|
||||||
cat note.txt.md5 >> note.txt
|
cat note.txt.md5 >> note.txt
|
||||||
|
|
||||||
|
echo "" >> note.txt
|
||||||
|
echo "" >> note.txt
|
||||||
|
echo "CHANGELOG" >> note.txt
|
||||||
|
echo "---------" >> note.txt
|
||||||
|
cat ../CHANGELOG >> note.txt
|
||||||
|
|
||||||
rm note.txt.md5
|
rm note.txt.md5
|
||||||
unix2dos -o note.txt
|
unix2dos -o note.txt
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2009, Tomasz Sowa
|
* Copyright (c) 2006-2011, 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
|
||||||
|
@ -85,9 +85,14 @@ int i;
|
||||||
SendDlgItemMessage(hWnd,IDC_COMBO_FUNCTION_PARAM,CB_SETCURSEL,parameters,0);
|
SendDlgItemMessage(hWnd,IDC_COMBO_FUNCTION_PARAM,CB_SETCURSEL,parameters,0);
|
||||||
|
|
||||||
if( adding )
|
if( adding )
|
||||||
|
{
|
||||||
SetFocus(GetDlgItem(hWnd,IDC_EDIT_FUNCTION_NAME));
|
SetFocus(GetDlgItem(hWnd,IDC_EDIT_FUNCTION_NAME));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
SetFocus(GetDlgItem(hWnd,IDC_EDIT_FUNCTION_VALUE));
|
SetFocus(GetDlgItem(hWnd,IDC_EDIT_FUNCTION_VALUE));
|
||||||
|
SendDlgItemMessage(hWnd, IDC_EDIT_FUNCTION_VALUE, EM_SETSEL, value.size(), value.size());
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -459,7 +459,7 @@ void Languages::InitGuiMessagesTab()
|
||||||
InsertGuiPair(list_variables_header_1,"Name");
|
InsertGuiPair(list_variables_header_1,"Name");
|
||||||
InsertGuiPair(list_variables_header_2,"Value");
|
InsertGuiPair(list_variables_header_2,"Value");
|
||||||
InsertGuiPair(list_functions_header_1,"Name");
|
InsertGuiPair(list_functions_header_1,"Name");
|
||||||
InsertGuiPair(list_functions_header_2,"Param.");
|
InsertGuiPair(list_functions_header_2,"Parameters");
|
||||||
InsertGuiPair(list_functions_header_3,"Value");
|
InsertGuiPair(list_functions_header_3,"Value");
|
||||||
|
|
||||||
InsertGuiPair(button_add,"Add");
|
InsertGuiPair(button_add,"Add");
|
||||||
|
@ -2143,7 +2143,7 @@ void Languages::InitGuiMessagesTab()
|
||||||
InsertGuiPair(list_variables_header_1,"Name");
|
InsertGuiPair(list_variables_header_1,"Name");
|
||||||
InsertGuiPair(list_variables_header_2,"Wert");
|
InsertGuiPair(list_variables_header_2,"Wert");
|
||||||
InsertGuiPair(list_functions_header_1,"Name");
|
InsertGuiPair(list_functions_header_1,"Name");
|
||||||
InsertGuiPair(list_functions_header_2,"Param.");
|
InsertGuiPair(list_functions_header_2,"Parameter");
|
||||||
InsertGuiPair(list_functions_header_3,"Wert");
|
InsertGuiPair(list_functions_header_3,"Wert");
|
||||||
|
|
||||||
InsertGuiPair(button_add,"Hinzufügen");
|
InsertGuiPair(button_add,"Hinzufügen");
|
||||||
|
@ -2236,7 +2236,7 @@ void Languages::InitGuiMessagesTab()
|
||||||
InsertGuiPair(cant_init_calculations, "Konnte Modul für die Berechnungen nicht initialisieren");
|
InsertGuiPair(cant_init_calculations, "Konnte Modul für die Berechnungen nicht initialisieren");
|
||||||
InsertGuiPair(message_box_error_caption,"TTCalc");
|
InsertGuiPair(message_box_error_caption,"TTCalc");
|
||||||
InsertGuiPair(cant_create_thread, "Konnte zweiten Thread für die Berechung nicht erzeugen");
|
InsertGuiPair(cant_create_thread, "Konnte zweiten Thread für die Berechung nicht erzeugen");
|
||||||
InsertGuiPair(cant_create_pad, "Konnte Fenster für Notizblock nicht erzeugen");
|
InsertGuiPair(cant_create_pad, "Konnte Fenster für Rechenblock nicht erzeugen");
|
||||||
InsertGuiPair(cant_create_main_window, "Konnte das Hauptfenster nicht erzeugen");
|
InsertGuiPair(cant_create_main_window, "Konnte das Hauptfenster nicht erzeugen");
|
||||||
InsertGuiPair(cant_init_common_controls,"Konnte die \"common controls\" nicht initialisieren (InitCommonControlsEx)");
|
InsertGuiPair(cant_init_common_controls,"Konnte die \"common controls\" nicht initialisieren (InitCommonControlsEx)");
|
||||||
InsertGuiPair(about_text,
|
InsertGuiPair(about_text,
|
||||||
|
|
|
@ -933,6 +933,17 @@ static const char help_name[] = "ttcalc.chm";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
it is used when 'createconfig' parameter has been passed to the ttcalc program
|
||||||
|
*/
|
||||||
|
void ProgramResources::SetConfigName()
|
||||||
|
{
|
||||||
|
configuration_file = "ttcalc.ini";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool ProgramResources::CreateDirIfNotExists(const std::string & app_dir)
|
bool ProgramResources::CreateDirIfNotExists(const std::string & app_dir)
|
||||||
{
|
{
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
|
@ -336,6 +336,12 @@ public:
|
||||||
*/
|
*/
|
||||||
void SetNameOfFiles();
|
void SetNameOfFiles();
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
it is used when 'createconfig' parameter has been passed to the ttcalc program
|
||||||
|
*/
|
||||||
|
void SetConfigName();
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
returning the name of the help file
|
returning the name of the help file
|
||||||
|
|
25
src/tabs.cpp
25
src/tabs.cpp
|
@ -1533,16 +1533,19 @@ BOOL WmInitTabVariables(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
HWND list = GetDlgItem(hWnd, IDC_VARIABLES_LIST);
|
HWND list = GetDlgItem(hWnd, IDC_VARIABLES_LIST);
|
||||||
LVCOLUMN column;
|
LVCOLUMN column;
|
||||||
|
RECT r;
|
||||||
|
|
||||||
//int list_cx = SetSizeOfList(list);
|
GetWindowRect(list, &r);
|
||||||
int list_cx = 280;
|
|
||||||
|
int list_cx = r.right - r.left;
|
||||||
|
int header1_cx = 70;
|
||||||
|
|
||||||
column.mask = LVCF_TEXT | LVCF_WIDTH;
|
column.mask = LVCF_TEXT | LVCF_WIDTH;
|
||||||
column.cx = 60;
|
column.cx = header1_cx;
|
||||||
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_variables_header_1) );
|
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_variables_header_1) );
|
||||||
ListView_InsertColumn(list, 0, &column);
|
ListView_InsertColumn(list, 0, &column);
|
||||||
|
|
||||||
column.cx = list_cx - 60 - 10;
|
column.cx = list_cx - header1_cx;
|
||||||
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_variables_header_2) );
|
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_variables_header_2) );
|
||||||
ListView_InsertColumn(list, 1, &column);
|
ListView_InsertColumn(list, 1, &column);
|
||||||
|
|
||||||
|
@ -1559,20 +1562,24 @@ BOOL WmInitTabFunctions(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
HWND list = GetDlgItem(hWnd, IDC_FUNCTIONS_LIST);
|
HWND list = GetDlgItem(hWnd, IDC_FUNCTIONS_LIST);
|
||||||
LVCOLUMN column;
|
LVCOLUMN column;
|
||||||
|
RECT r;
|
||||||
|
|
||||||
//int list_cx = SetSizeOfList(list);
|
GetWindowRect(list, &r);
|
||||||
int list_cx = 280;
|
|
||||||
|
int list_cx = r.right - r.left;
|
||||||
|
int header1_cx = 70;
|
||||||
|
int header2_cx = 70;
|
||||||
|
|
||||||
column.mask = LVCF_TEXT | LVCF_WIDTH;
|
column.mask = LVCF_TEXT | LVCF_WIDTH;
|
||||||
column.cx = 60;
|
column.cx = header1_cx;
|
||||||
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_1) );
|
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_1) );
|
||||||
ListView_InsertColumn(list, 0, &column);
|
ListView_InsertColumn(list, 0, &column);
|
||||||
|
|
||||||
column.cx = 40;
|
column.cx = header2_cx;
|
||||||
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_2) );
|
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_2) );
|
||||||
ListView_InsertColumn(list, 1, &column);
|
ListView_InsertColumn(list, 1, &column);
|
||||||
|
|
||||||
column.cx = list_cx - 60 - 40 - 10;
|
column.cx = list_cx - header1_cx - header2_cx;
|
||||||
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_3) );
|
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_3) );
|
||||||
ListView_InsertColumn(list, 2, &column);
|
ListView_InsertColumn(list, 2, &column);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2009, Tomasz Sowa
|
* Copyright (c) 2006-2011, 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
|
||||||
|
@ -97,9 +97,14 @@ char * pchar;
|
||||||
SetDlgItemText(hWnd,IDC_EDIT_VARIABLE_VALUE, value.c_str());
|
SetDlgItemText(hWnd,IDC_EDIT_VARIABLE_VALUE, value.c_str());
|
||||||
|
|
||||||
if( adding)
|
if( adding)
|
||||||
|
{
|
||||||
SetFocus(GetDlgItem(hWnd,IDC_EDIT_VARIABLE_NAME));
|
SetFocus(GetDlgItem(hWnd,IDC_EDIT_VARIABLE_NAME));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
SetFocus(GetDlgItem(hWnd,IDC_EDIT_VARIABLE_VALUE));
|
SetFocus(GetDlgItem(hWnd,IDC_EDIT_VARIABLE_VALUE));
|
||||||
|
SendDlgItemMessage(hWnd, IDC_EDIT_VARIABLE_VALUE, EM_SETSEL, value.size(), value.size());
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2009, Tomasz Sowa
|
* Copyright (c) 2006-2011, 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
|
||||||
|
@ -51,8 +51,15 @@
|
||||||
/*!
|
/*!
|
||||||
the application starts here
|
the application starts here
|
||||||
*/
|
*/
|
||||||
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
|
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR par, int)
|
||||||
{
|
{
|
||||||
|
if( strcmp(par, "createconfig") == 0 )
|
||||||
|
{
|
||||||
|
GetPrgRes()->SetConfigName();
|
||||||
|
GetPrgRes()->SaveToFile();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GetPrgRes()->SetInstance(hInstance);
|
GetPrgRes()->SetInstance(hInstance);
|
||||||
|
|
Loading…
Reference in New Issue