From 75dfe39a03476e4cfde9a6b1fa42aee6ce89597d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Fri, 20 Aug 2010 21:33:59 +0200 Subject: [PATCH] Percents into statistics have now minimum two digits Package libraries into lib instead of root (package.sh) --- TODO | 2 +- src/view/AccountPanel.cpp | 2 +- src/view/StatsPanel.cpp | 2 +- tools/launch_kc.sh | 2 +- tools/package.sh | 7 +++++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index e039cf4..b9c404f 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,6 @@ Version 0.1 -Statistics (need to update libraries and add months/years label on graph) +Statistics (need to add months/years label on graph) Copy and paste Import/Export module Using tabulation to navigate throw interface (Search Panel) diff --git a/src/view/AccountPanel.cpp b/src/view/AccountPanel.cpp index aa07fa7..d7263ed 100644 --- a/src/view/AccountPanel.cpp +++ b/src/view/AccountPanel.cpp @@ -493,7 +493,7 @@ void AccountPanel::UpdateStats() for(i=0; iGetCategoriesNumber()+1; i++) { percents = ((double) (_categoriesValues[i]*100))/totalDebit; - _statsGrid->SetCellValue(CATS_STATS+i, 1, wxString::Format(wxT("%.2lf (%d %%)"), _categoriesValues[i], (int)percents)); + _statsGrid->SetCellValue(CATS_STATS+i, 1, wxString::Format(wxT("%.2lf (%02d %%)"), _categoriesValues[i], (int)percents)); } for (i=0, accountIt=user->_accounts.begin(); accountIt!=user->_accounts.end(); accountIt++, i++) diff --git a/src/view/StatsPanel.cpp b/src/view/StatsPanel.cpp index 1a192a5..8efbb02 100644 --- a/src/view/StatsPanel.cpp +++ b/src/view/StatsPanel.cpp @@ -260,7 +260,7 @@ void StatsPanel::UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearT { _categoriesValues[_categoriesIndexes[categoriesIt->first]] = categoriesIt->second; percents = ((double) (categoriesIt->second*100))/total; - value = wxString::Format(wxT("%0.2lf (%d%%)"), categoriesIt->second, percents); + value = wxString::Format(wxT("%0.2lf (%02d%%)"), categoriesIt->second, percents); _statsGrid->SetCellValue(_categoriesIndexes[categoriesIt->first], 1, value); } diff --git a/tools/launch_kc.sh b/tools/launch_kc.sh index fc64aea..f2a0814 100755 --- a/tools/launch_kc.sh +++ b/tools/launch_kc.sh @@ -1,4 +1,4 @@ #!/bin/bash -export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=./lib:$LD_LIBRARY_PATH ./kc diff --git a/tools/package.sh b/tools/package.sh index 3cb79c4..f492613 100755 --- a/tools/package.sh +++ b/tools/package.sh @@ -6,10 +6,13 @@ FILE="$DIR.tar.bz2" rm -f $FILE rm -rf $DIR +if [ "$1" == "clean" ] ; then make clean +fi make || (echo "Compilation failed" ; exit 1) -mkdir $DIR -cp -r kc lib/freechart/lib/* lib/wxsqlite3-1.9.9/lib/* init.sql ressources launch_kc.sh TODO CONTRIBUTORS COPYING README README.fr $DIR +mkdir -p $DIR/lib +cp -r kc lib/freechart/lib/* lib/wxsqlite3-1.9.9/lib/* $DIR/lib +cp -r kc init.sql ressources launch_kc.sh TODO CONTRIBUTORS COPYING README README.fr $DIR tar -jcf $FILE $DIR rm -rf $DIR echo "Packaged !" \ No newline at end of file