From 023b1def9d208945b75332c816615e2b5fbefcb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Sat, 14 Aug 2010 22:04:03 +0200 Subject: [PATCH] * Add percents to month stats * Remove version from translation * Update TODO --- README | 2 ++ README.fr | 2 ++ TODO | 4 ++-- ressources/po/french.mo | Bin 5929 -> 5897 bytes ressources/po/french.po | 40 ++++++++++++++++-------------------- ressources/po/kisscount.pot | 32 ++++++++++++++--------------- src/controller/KissCount.h | 2 ++ src/view/AccountPanel.cpp | 9 ++++++-- src/view/ButtonPanel.cpp | 4 ++-- 9 files changed, 50 insertions(+), 45 deletions(-) diff --git a/README b/README index a2b3cf9..b29ac33 100644 --- a/README +++ b/README @@ -2,6 +2,8 @@ KissCount is personnal account software delivered under GPL v3 licence terms. Current version is 0.1 beta (trunk version) +wxWidgets 2.8 is needed + A modified version of wxFreeChart is used : warning during recompilation, don't overwrite autotools files with ./configure More information can be found at http://indefero.soutade.fr/p/kisscount diff --git a/README.fr b/README.fr index 90a9ea0..d1f0228 100644 --- a/README.fr +++ b/README.fr @@ -2,6 +2,8 @@ KissCount est un logiciel de gestion de comptes personnels délivré sous licenc La version actuelle est 0.1 bêta (version du tronc) +wxWidgets 2.8 est nécessaire + Une version modifiée de wxFreeChart est utilisée : attention à lors de la recompilation à ne pas écraser les fichiers des autotools (pas de ./configure) Plus d'informations peuvent être trouvé sur http://indefero.soutade.fr/p/kisscount diff --git a/TODO b/TODO index 295b00d..6abc01c 100644 --- a/TODO +++ b/TODO @@ -8,9 +8,9 @@ Improve Scrolled Windows Fix some bugs (especially when closing, and one when switching between SearchPanel and AccountPanel) Can type a letter with a comboboxes Windows version +Need packaging Better build system for wxFreeChart (hacked by me) Others translation -Remove program version from translation Handle bad SQL return Category color/font @@ -23,4 +23,4 @@ Auto completion (already up into wxwidgets 2.9) Undo/redo Database auto saving at startup Documentation -Use caches for created panels (avoid destroying/creating panels for nothing) \ No newline at end of file +Use caches for created panels (avoid destroying/creating panels for nothing) diff --git a/ressources/po/french.mo b/ressources/po/french.mo index b628cfa17af357af777bf86a37f32b23794bc28b..865c68f161b48c91d4c09051c2325cb250c66353 100644 GIT binary patch delta 1560 zcmXxjPe@cz6vy%V{5z(OW;*^$Q%pn!v(d_wz--Jc|1?5`WfYa6wy6*bqNc*EKo|Cm zM5sj+Qjit15TahzG;SFaF^W?mrl1$AFa{ei0$Y&71UaSPQB1;fxCXCbG!7=3 zkcs2Mn7}M5C<8Sv2V=1eHStz^zr)_wqb6#?NIZyI$YE5zF8h72 zH?*24!~;!m16A38^|o~cHPL-kCmvbHQH4yP-hX4AMCEyhDqtG*-VAE|C)C2{G;z?O z#i)U`EKe&8a9W24P+QZD3^A8cFAkzwdl!}X397&_YUMAH=9wv6i!-Q+=TRN_X$}46 zVj~Zt8C8TOs0rFoFLa<@IEhMp#(EJ|P(P;Q9qUs}<9-VD{zuHjulD;D`#g>6$r~~` zTqtod>PJ$EYGnYmvPNqgYK4bUiI1ZS?LqBrFRIY1sBwc>jl-x;Or!G7+V8($1oN8( zF0_&#sKm?GNcyjW;!#_Wjd@sZ?}M1b{V7xdeYhTnP#qXYb#@YSaRHUzLoyYfj4{k_ zvbf+olaDR91@&9#L#^m0Qj-}*4l~9{D|>}LTtd2Pyv(YZL37FF&=CHC3-64Vy?tu@vFDsMCL+ct+#c{=R#9_x7@ z{a4~X9;mVb>xdoj5cM~DVVyv=?lo%Sx2X5uTR))o__K8$)yeOu@r$VOOQ<}5eDp^Z z9wAN;RfJl&)6I{qDBi=BJ{iQOe^>lJ@HDZT=(f-5+)J@V?Yp>B7rTgJLWPtP0pkB> z0~bLek7y#a4ca1gU7gkT*AV*jtYTW-mDp^j-p%xs<~Q;zoA472gu1NHF`}8+?{<2| zoHjQxF5Rhh3*#!Bz2Ww_s>twMLayUJNT>@t-hkuTT$$(hSC^NEo0Ddv!u_dN9Je~P KDIDV~aQ*`Sx{MD1 delta 1594 zcmZY8TSyd99LMo9o96D;s->%?RvRU0(&i;Z?Si#kO|7H|v7j<3vkR0-NwGdi&>fj5 zhXG*V=8{eQuG9jiNhtxDYG0kuNwK9t^8zT1192GoQPM^gI&nibn`P6?_&}^ zM?Ve(Ow`0Pc*_YN4r4NoU(M3*Zfh(wju34{JZ=)9KL3QAPwHH;$3)KCuto^7wZ%_pcq3(N!n*Ry4 z;crm}n;c_)qb6=-d)nb@c`=nk2oE_+Uo(T z*7KMya*-R@C3`94g;M z)FZlqe9dEil&=q?T6mCwcJLmR_zUWpO(d&Y7eZAYMkOq^#}%kYRAa5P?ndQ1fV|tL z6_w|NJ%7e}C5`?oaW^Ma(Ov69JK-7XZ`5afjcVN>YT*y4`$w!lP|sM~mGP(!`cd-} zQS;MLd1hbzyWLgCq|Y>B;rNJ$g-yg7qS2m5M&T4nMH*axVlAOA z>$8K\n" "Language-Team: \n" @@ -39,7 +39,7 @@ msgstr " entrées trouvées" msgid " not found, aborting" msgstr " non trouvé, arrêt" -#: src/view/AccountPanel.cpp:931 +#: src/view/AccountPanel.cpp:936 msgid " operations ?" msgstr " opérations ?" @@ -87,12 +87,12 @@ msgstr "Montant max" #: src/view/PreferencesPanel.cpp:340 #: src/view/PreferencesPanel.cpp:581 -#: src/view/AccountPanel.cpp:926 +#: src/view/AccountPanel.cpp:931 msgid "Are you sure want to delete " msgstr "Etes vous sûr de vouloir supprimer " #: src/view/PreferencesPanel.cpp:449 -#: src/view/AccountPanel.cpp:628 +#: src/view/AccountPanel.cpp:633 #: src/view/SearchPanel.cpp:345 msgid "Are you sure want to delete : \n" msgstr "Etes vous sûr de vouloir supprimer : \n" @@ -187,7 +187,7 @@ msgstr "Défaut" #: src/view/PreferencesPanel.cpp:159 #: src/view/PreferencesPanel.cpp:209 -#: src/view/AccountPanel.cpp:785 +#: src/view/AccountPanel.cpp:790 msgid "Delete" msgstr "Supprimer" @@ -211,7 +211,7 @@ msgstr "Description" #: src/view/PreferencesPanel.cpp:487 #: src/view/PreferencesPanel.cpp:526 #: src/view/PreferencesPanel.cpp:532 -#: src/view/AccountPanel.cpp:922 +#: src/view/AccountPanel.cpp:927 #: src/view/UsersDialog.cpp:86 #: src/view/UsersDialog.cpp:114 #: src/view/SearchPanel.cpp:134 @@ -244,7 +244,7 @@ msgid "From " msgstr "De" #: src/view/GenerateDialog.cpp:31 -#: src/view/AccountPanel.cpp:782 +#: src/view/AccountPanel.cpp:787 msgid "Generate month" msgstr "Générer mois" @@ -292,7 +292,7 @@ msgstr "Mot de passe invalide" msgid "It must be at least one account !" msgstr "Il doit y avoir au moins un compte !" -#: src/view/AccountPanel.cpp:922 +#: src/view/AccountPanel.cpp:927 msgid "It must be at least one month !" msgstr "Il doit rester au mois un mois" @@ -305,20 +305,6 @@ msgstr "Kill me" msgid "KissCount" msgstr "KissCount" -#: src/view/ButtonPanel.cpp:96 -msgid "" -"KissCount v0.1\n" -"\n" -"Personal accounting software\n" -"\n" -"Copyright (C) 2010 Grégory Soutadé" -msgstr "" -"KissCount v0.1\n" -"\n" -"Logiciel de comptabilité personnelle\n" -"\n" -"Copyright (C) 2010 Grégory Soutadé" - #: src/view/PreferencesPanel.cpp:57 msgid "Language" msgstr "Langue" @@ -396,6 +382,16 @@ msgstr "Mot de passe" msgid "Password changed" msgstr "Mot de passe changé" +#: src/view/ButtonPanel.cpp:96 +msgid "" +"Personal accounting software\n" +"\n" +"Copyright (C) 2010 Grégory Soutadé" +msgstr "" +"Logiciel de comptabilité personnelle\n" +"\n" +"Copyright (C) 2010 Grégory Soutadé" + #: src/view/PasswordDialog.cpp:78 msgid "Please retype new password" msgstr "Re entrez le mot de passe" diff --git a/ressources/po/kisscount.pot b/ressources/po/kisscount.pot index bafbab2..1db8a98 100644 --- a/ressources/po/kisscount.pot +++ b/ressources/po/kisscount.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-08-06 21:24+0200\n" +"POT-Creation-Date: 2010-08-14 22:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -34,7 +34,7 @@ msgstr "" msgid " not found, aborting" msgstr "" -#: src/view/AccountPanel.cpp:931 +#: src/view/AccountPanel.cpp:936 msgid " operations ?" msgstr "" @@ -79,11 +79,11 @@ msgid "Amount to" msgstr "" #: src/view/PreferencesPanel.cpp:340 src/view/PreferencesPanel.cpp:581 -#: src/view/AccountPanel.cpp:926 +#: src/view/AccountPanel.cpp:931 msgid "Are you sure want to delete " msgstr "" -#: src/view/PreferencesPanel.cpp:449 src/view/AccountPanel.cpp:628 +#: src/view/PreferencesPanel.cpp:449 src/view/AccountPanel.cpp:633 #: src/view/SearchPanel.cpp:345 msgid "Are you sure want to delete : \n" msgstr "" @@ -174,7 +174,7 @@ msgid "Default" msgstr "" #: src/view/PreferencesPanel.cpp:159 src/view/PreferencesPanel.cpp:209 -#: src/view/AccountPanel.cpp:785 +#: src/view/AccountPanel.cpp:790 msgid "Delete" msgstr "" @@ -191,7 +191,7 @@ msgstr "" #: src/view/PreferencesPanel.cpp:336 src/view/PreferencesPanel.cpp:359 #: src/view/PreferencesPanel.cpp:378 src/view/PreferencesPanel.cpp:468 #: src/view/PreferencesPanel.cpp:487 src/view/PreferencesPanel.cpp:526 -#: src/view/PreferencesPanel.cpp:532 src/view/AccountPanel.cpp:922 +#: src/view/PreferencesPanel.cpp:532 src/view/AccountPanel.cpp:927 #: src/view/UsersDialog.cpp:86 src/view/UsersDialog.cpp:114 #: src/view/SearchPanel.cpp:134 src/view/SearchPanel.cpp:144 #: src/view/SearchPanel.cpp:158 src/view/SearchPanel.cpp:169 @@ -219,7 +219,7 @@ msgstr "" msgid "From " msgstr "" -#: src/view/GenerateDialog.cpp:31 src/view/AccountPanel.cpp:782 +#: src/view/GenerateDialog.cpp:31 src/view/AccountPanel.cpp:787 msgid "Generate month" msgstr "" @@ -267,7 +267,7 @@ msgstr "" msgid "It must be at least one account !" msgstr "" -#: src/view/AccountPanel.cpp:922 +#: src/view/AccountPanel.cpp:927 msgid "It must be at least one month !" msgstr "" @@ -279,15 +279,6 @@ msgstr "" msgid "KissCount" msgstr "" -#: src/view/ButtonPanel.cpp:96 -msgid "" -"KissCount v0.1\n" -"\n" -"Personal accounting software\n" -"\n" -"Copyright (C) 2010 Grégory Soutadé" -msgstr "" - #: src/view/PreferencesPanel.cpp:57 msgid "Language" msgstr "" @@ -362,6 +353,13 @@ msgstr "" msgid "Password changed" msgstr "" +#: src/view/ButtonPanel.cpp:96 +msgid "" +"Personal accounting software\n" +"\n" +"Copyright (C) 2010 Grégory Soutadé" +msgstr "" + #: src/view/PasswordDialog.cpp:78 msgid "Please retype new password" msgstr "" diff --git a/src/controller/KissCount.h b/src/controller/KissCount.h index 5e08f4b..d2d6433 100644 --- a/src/controller/KissCount.h +++ b/src/controller/KissCount.h @@ -27,6 +27,8 @@ along with KissCount. If not, see . #include #include +#define APP_VERSION "v0.1 beta" + class wxUI; class KissCount { diff --git a/src/view/AccountPanel.cpp b/src/view/AccountPanel.cpp index 1a54e1a..32a0e7f 100644 --- a/src/view/AccountPanel.cpp +++ b/src/view/AccountPanel.cpp @@ -449,7 +449,7 @@ void AccountPanel::UpdateStats() int i; User* user = _kiss->GetUser(); std::vector::iterator it; - double curCredit, curDebit, totalCredit, totalDebit, remains, value; + double curCredit, curDebit, totalCredit, totalDebit, remains, value, percents; std::map curAccountAmount, finalAccountAmount; std::map::iterator doubleIt; std::map::iterator intIt; @@ -503,7 +503,10 @@ void AccountPanel::UpdateStats() _statsGrid->SetCellValue(REMAINS, 1, wxString::Format(wxT("%.2lf"), remains)); for(i=0; iGetCategoriesNumber()+1; i++) - _statsGrid->SetCellValue(CATS_STATS+i, 1, wxString::Format(wxT("%.2lf"), _categoriesValues[i])); + { + percents = ((double) (_categoriesValues[i]*100))/totalDebit; + _statsGrid->SetCellValue(CATS_STATS+i, 1, wxString::Format(wxT("%.2lf (%d %%)"), _categoriesValues[i], (int)percents)); + } for (i=0, accountIt=user->_accounts.begin(); accountIt!=user->_accounts.end(); accountIt++, i++) { @@ -514,6 +517,8 @@ void AccountPanel::UpdateStats() _accountsGrid->SetCellValue(i, ACCOUNT_FINAL, wxString::Format(wxT("%.2lf"), value)); } + _statsGrid->AutoSizeColumn(1, true); + _pie->DatasetChanged(_dataset); } diff --git a/src/view/ButtonPanel.cpp b/src/view/ButtonPanel.cpp index 932470a..b56843a 100644 --- a/src/view/ButtonPanel.cpp +++ b/src/view/ButtonPanel.cpp @@ -93,8 +93,8 @@ void ButtonPanel::OnButtonChangeUser(wxCommandEvent& event) void ButtonPanel::OnButtonAbout(wxCommandEvent& event) { - wxMessageBox( _("KissCount v0.1\n\nPersonal accounting software\n\nCopyright (C) 2010 Grégory Soutadé"), - wxT("KissCount"), + wxMessageBox( _("Personal accounting software\n\nCopyright (C) 2010 Grégory Soutadé"), + wxT("KissCount " APP_VERSION "\n\n"), wxOK | wxICON_INFORMATION, _wxUI ); }