Browse Source

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
master
Tomasz Sowa 11 years ago
parent
commit
6c0a4b110e
  1. 2
      CHANGELOG
  2. 15
      makerelease.sh
  3. 7
      src/functions.cpp
  4. 6
      src/languages.cpp
  5. 11
      src/programresources.cpp
  6. 6
      src/programresources.h
  7. 25
      src/tabs.cpp
  8. 7
      src/variables.cpp
  9. 11
      src/winmain.cpp
  10. 0
      update/ttcalc_update.ini

2
CHANGELOG

@ -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
Moritz Beleites <morbel at gmx.net>
* added: on display tab: an option how many digits should be grouped

15
makerelease.sh

@ -132,9 +132,9 @@ fi
if [ $d = "y" -o $d = "Y" ]
then
cp ../setup/ttcalc-setup.exe ./$n-setup.exe
else
cp ../setup/ttcalc-setup.exe ./$n-setup.$datestr.exe
else
cp ../setup/ttcalc-setup.exe ./$n-setup.exe
fi
@ -176,7 +176,8 @@ fi
mkdir $n
cp ../src/ttcalcp.exe $n
cp ../src/ttcalc.ini $n
$n/ttcalcp.exe createconfig
mv ttcalc.ini $n
mv ttcalc.chm $n
cp ../COPYRIGHT $n
cp ../README $n
@ -234,7 +235,6 @@ cp ../help/* $n/ttcalc/help
cp ../res/* $n/ttcalc/res
cp ../setup/* $n/ttcalc/setup
cp ../src/* $n/ttcalc/src
rm $n/ttcalc/src/*.ini
cp ../COPYRIGHT $n/ttcalc
cp ../README $n/ttcalc
cp ../CHANGELOG $n/ttcalc
@ -251,6 +251,13 @@ md5sum * > note.txt.md5
echo "MD5 SUMS" > note.txt
echo "--------" >> note.txt
cat note.txt.md5 >> note.txt
echo "" >> note.txt
echo "" >> note.txt
echo "CHANGELOG" >> note.txt
echo "---------" >> note.txt
cat ../CHANGELOG >> note.txt
rm note.txt.md5
unix2dos -o note.txt

7
src/functions.cpp

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2009, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -85,9 +85,14 @@ int i;
SendDlgItemMessage(hWnd,IDC_COMBO_FUNCTION_PARAM,CB_SETCURSEL,parameters,0);
if( adding )
{
SetFocus(GetDlgItem(hWnd,IDC_EDIT_FUNCTION_NAME));
}
else
{
SetFocus(GetDlgItem(hWnd,IDC_EDIT_FUNCTION_VALUE));
SendDlgItemMessage(hWnd, IDC_EDIT_FUNCTION_VALUE, EM_SETSEL, value.size(), value.size());
}
return false;

6
src/languages.cpp

@ -459,7 +459,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(list_variables_header_1,"Name");
InsertGuiPair(list_variables_header_2,"Value");
InsertGuiPair(list_functions_header_1,"Name");
InsertGuiPair(list_functions_header_2,"Param.");
InsertGuiPair(list_functions_header_2,"Parameters");
InsertGuiPair(list_functions_header_3,"Value");
InsertGuiPair(button_add,"Add");
@ -2143,7 +2143,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(list_variables_header_1,"Name");
InsertGuiPair(list_variables_header_2,"Wert");
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(button_add,"Hinzufügen");
@ -2236,7 +2236,7 @@ void Languages::InitGuiMessagesTab()
InsertGuiPair(cant_init_calculations, "Konnte Modul für die Berechnungen nicht initialisieren");
InsertGuiPair(message_box_error_caption,"TTCalc");
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_init_common_controls,"Konnte die \"common controls\" nicht initialisieren (InitCommonControlsEx)");
InsertGuiPair(about_text,

11
src/programresources.cpp

@ -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 success = false;

6
src/programresources.h

@ -336,6 +336,12 @@ public:
*/
void SetNameOfFiles();
/*!
it is used when 'createconfig' parameter has been passed to the ttcalc program
*/
void SetConfigName();
/*!
returning the name of the help file

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);
LVCOLUMN column;
RECT r;
GetWindowRect(list, &r);
//int list_cx = SetSizeOfList(list);
int list_cx = 280;
int list_cx = r.right - r.left;
int header1_cx = 70;
column.mask = LVCF_TEXT | LVCF_WIDTH;
column.cx = 60;
column.cx = header1_cx;
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_variables_header_1) );
ListView_InsertColumn(list, 0, &column);
column.cx = list_cx - 60 - 10;
column.cx = list_cx - header1_cx;
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_variables_header_2) );
ListView_InsertColumn(list, 1, &column);
@ -1559,20 +1562,24 @@ BOOL WmInitTabFunctions(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND list = GetDlgItem(hWnd, IDC_FUNCTIONS_LIST);
LVCOLUMN column;
RECT r;
GetWindowRect(list, &r);
//int list_cx = SetSizeOfList(list);
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.cx = 60;
column.cx = header1_cx;
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_1) );
ListView_InsertColumn(list, 0, &column);
column.cx = 40;
column.cx = header2_cx;
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_2) );
ListView_InsertColumn(list, 1, &column);
column.cx = list_cx - 60 - 40 - 10;
column.cx = list_cx - header1_cx - header2_cx;
column.pszText = const_cast<char*>( GetPrgRes()->GetLanguages()->GuiMessage(Languages::list_functions_header_3) );
ListView_InsertColumn(list, 2, &column);

7
src/variables.cpp

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2009, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -97,9 +97,14 @@ char * pchar;
SetDlgItemText(hWnd,IDC_EDIT_VARIABLE_VALUE, value.c_str());
if( adding)
{
SetFocus(GetDlgItem(hWnd,IDC_EDIT_VARIABLE_NAME));
}
else
{
SetFocus(GetDlgItem(hWnd,IDC_EDIT_VARIABLE_VALUE));
SendDlgItemMessage(hWnd, IDC_EDIT_VARIABLE_VALUE, EM_SETSEL, value.size(), value.size());
}
return false;

11
src/winmain.cpp

@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2006-2009, Tomasz Sowa
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -51,8 +51,15 @@
/*!
the application starts here
*/
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR par, int)
{
if( strcmp(par, "createconfig") == 0 )
{
GetPrgRes()->SetConfigName();
GetPrgRes()->SaveToFile();
return 0;
}
try
{
GetPrgRes()->SetInstance(hInstance);

0
src/ttcalc_update.ini → update/ttcalc_update.ini

Loading…
Cancel
Save