From 90a6659a8474661bd1b822356914eacac19baba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Sat, 6 Aug 2011 17:30:16 +0200 Subject: [PATCH] Enhance size of description field Change "remains" in "balance" Fix a bug in language settings --- ressources/po/french.mo | Bin 10276 -> 10274 bytes ressources/po/french.po | 13 ++++++++----- ressources/po/kisscount.pot | 10 +++++----- src/view/AccountPanel.cpp | 18 +++++++++--------- src/view/grid/GridAccount.cpp | 2 +- src/view/wxUI.cpp | 3 ++- 6 files changed, 25 insertions(+), 21 deletions(-) diff --git a/ressources/po/french.mo b/ressources/po/french.mo index c16724f51db3c9bbff15fdb2c635f866433b65ca..2f1f54b5f9f5305690bc3bdf0af8929e3878cc25 100644 GIT binary patch delta 2905 zcmYk-drXyO0LSr%!&NRPkOIZvfPjKXTvAaph0?qwNTfz4N(hA=Q8ZJte8n3YvZSNA zf>~Zzn`PyWZOLZM>L1OtT(w25Y`V1mXk9EOHP`pY`>^$l-}yYxd(Qj3&+QzJ&Obc= z-PjN((irnuyfG2@6{g~M=)-;t#gqhNqA?AlFc*hlF~;E(jKMj08!kjIHrVz$>kbU( z`hL`NI}?m!hEqAhh1>Bo-hr2pKXaWI#$ftU1Be;w4m1hXPDKqQ2Q`pl48u};eFo}5 z6{rUZQQ&kPHIO$@1AGV7;VJ8R)aQRdosAIo zkE)5rN$5kJiE7l=G+LXGfjDL@72UW6HN)Mg8xNqC=nK>XE~7g3B)J1hMs?^zEqxYh zr3z77Sb`p`K=u0&Y9Px{XJ<90o4LkpqH-q}x=?#_3N_OYQ7dy6+prh4RSop62ezQz zZ$}N}V6ZYQ&*P|zS$vDMXyw+0m`%F|b8x%8ejL@+d#Ev;LCyKRZGUUqKcVLI7izcT z(%kQf4|RP!YL4^LSWtDimZ85fSN%M>Xe>A-FOk( z@hWQR*YFk5`+HC`eHAs3w^4`gB-*HQi5Ku47jdeMzu)RHD4t7p=Y zKQo;dEu|mt!&cM)&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{Plqn1U6k&o!V5*krFeoisFpL-xW+oW=Q<$l%OxsKPv%!6{2bb(Cf;Mty!M zs?ZkH61HOvcB7VX7&SA$qJDZtkr{W)-!#-=*vw!dQ?ZKkTx2Vo4%8mmk1FU4YVC$m z--8j<%>0O2lD|-UCz7gMn1Py!S*U@Qp_Y0T&gJ>0k;ZH;^rA*^2DMAip>7<)UK~M9 z{bs%*dVeo!qK zehF%~FG7u^8t0(TzP}Guz+qJ3M^Oa_Pz^3G`M*~ExP)`=&Sw5~!$dCVhImv*(@`@K zI^Lymn3RzDq@E0rLUJd`A+M9rv4+Nr`5~|LfEI~Zc;=-M>~!Eq>*T*7m$4#I?Y)~OUJ`OOo8=5++f?KYi?-CZD^cJ4NHR$Lq>CIOTghW2bhOcUo0O3U z$OmM(F?tODe#kRKzmM8}I(CzM5=E+s4$Wcc(0;EXD~a~{LGm1F@V9%st5?ywpXfLl z#H_oAsNl3aVO)PKX1P_WvbiD|Zd6!r5rmpo29\n" "Language-Team: \n" @@ -147,6 +147,10 @@ msgstr "Croissant" msgid "Background color" msgstr "Couleur d'arrière plan" +#: src/view/AccountPanel.cpp:236 +msgid "Balance" +msgstr "Solde" + #: src/view/PreferencesPanel.cpp:200 msgid "Blocked" msgstr "Bloqué" @@ -650,10 +654,6 @@ msgstr "Quitter KissCount ?" msgid "Real" msgstr "Réel" -#: src/view/AccountPanel.cpp:236 -msgid "Remains" -msgstr "Restant" - #: src/view/SearchPanel.cpp:61 msgid "Rename" msgstr "Renommer" @@ -833,6 +833,9 @@ msgstr "octobre" msgid "september" msgstr "septembre" +#~ msgid "Remains" +#~ msgstr "Restant" + #~ msgid "Operating expense" #~ msgstr "Fonctionnement" diff --git a/ressources/po/kisscount.pot b/ressources/po/kisscount.pot index 6101e75..14a60ca 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: 2011-07-04 20:23+0200\n" +"POT-Creation-Date: 2011-08-06 17:24+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -133,6 +133,10 @@ msgstr "" msgid "Background color" msgstr "" +#: src/view/AccountPanel.cpp:236 +msgid "Balance" +msgstr "" + #: src/view/PreferencesPanel.cpp:200 msgid "Blocked" msgstr "" @@ -587,10 +591,6 @@ msgstr "" msgid "Real" msgstr "" -#: src/view/AccountPanel.cpp:236 -msgid "Remains" -msgstr "" - #: src/view/SearchPanel.cpp:61 msgid "Rename" msgstr "" diff --git a/src/view/AccountPanel.cpp b/src/view/AccountPanel.cpp index 25c216a..ca38474 100644 --- a/src/view/AccountPanel.cpp +++ b/src/view/AccountPanel.cpp @@ -20,7 +20,7 @@ #include "AccountPanel.h" enum {ACCOUNT_NUMBER, ACCOUNT_NAME, ACCOUNT_INIT, ACCOUNT_CUR, ACCOUNT_FINAL, NUMBER_COLS_ACCOUNTS}; -enum {CUR_CREDIT, CUR_DEBIT, TOTAL_CREDIT, TOTAL_DEBIT, REMAINS, STATS_ROW, CATS_STATS, NON_FIX}; +enum {CUR_CREDIT, CUR_DEBIT, TOTAL_CREDIT, TOTAL_DEBIT, BALANCE, STATS_ROW, CATS_STATS, NON_FIX}; enum {CALENDAR_TREE_ID=1, OPS_GRID_ID, CALENDAR_ID, ACCOUNTS_GRID_ID, MENU_GENERATE_ID, MENU_DELETE_ID, DISPLAY_MODE_ID, GROUP_ID, UNGROUP_ID, UPDATE_NEXT_MONTHS_ID}; enum {VIRTUAL_MODE=0, REAL_MODE, CHECK_MODE}; @@ -228,19 +228,19 @@ void AccountPanel::InitStatsGrid(User* user) font.SetWeight(wxFONTWEIGHT_BOLD); _statsGrid->SetCellFont(CUR_CREDIT, 0, font); _statsGrid->SetCellFont(CUR_DEBIT, 0, font); - _statsGrid->SetCellFont(REMAINS, 0, font); - _statsGrid->SetCellFont(REMAINS, 1, font); + _statsGrid->SetCellFont(BALANCE, 0, font); + _statsGrid->SetCellFont(BALANCE, 1, font); _statsGrid->SetCellValue(CUR_CREDIT, 0, _("Cur Credit")); _statsGrid->SetCellValue(CUR_DEBIT, 0, _("Cur Debit")); - _statsGrid->SetCellValue(REMAINS, 0, _("Remains")); + _statsGrid->SetCellValue(BALANCE, 0, _("Balance")); _statsGrid->SetCellValue(NON_FIX, 0, _("Non fix")); _statsGrid->SetCellAlignment(CUR_DEBIT, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); _statsGrid->SetCellAlignment(CUR_CREDIT, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); _statsGrid->SetCellAlignment(TOTAL_DEBIT, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); _statsGrid->SetCellAlignment(TOTAL_CREDIT, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); - _statsGrid->SetCellAlignment(REMAINS, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); + _statsGrid->SetCellAlignment(BALANCE, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); _statsGrid->SetCellAlignment(NON_FIX, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); } @@ -447,7 +447,7 @@ void AccountPanel::UpdateStats() int i; User* user = _kiss->GetUser(); std::vector::iterator it; - double curCredit, curDebit, totalCredit, totalDebit, remains, value, value2, percents; + double curCredit, curDebit, totalCredit, totalDebit, balance, value, value2, percents; std::map curAccountAmount, finalAccountAmount; std::map::iterator doubleIt; std::map::iterator intIt; @@ -623,14 +623,14 @@ void AccountPanel::UpdateStats() } } - remains = totalCredit - totalDebit; + balance = totalCredit - totalDebit; _statsGrid->SetCellValue(CUR_CREDIT, 1, wxString::Format(wxT("%.2lf"), curCredit)); _statsGrid->SetCellValue(CUR_DEBIT, 1, wxString::Format(wxT("%.2lf"), curDebit)); _statsGrid->SetCellValue(TOTAL_CREDIT, 1, wxString::Format(wxT("%.2lf"), totalCredit)); _statsGrid->SetCellValue(TOTAL_DEBIT, 1, wxString::Format(wxT("%.2lf"), totalDebit)); - _statsGrid->SetCellTextColour(REMAINS, 1, (remains >= 0) ? wxColor(0x00, 0xFF, 0x00) : wxColor(0xFF, 0x00, 0x00)); - _statsGrid->SetCellValue(REMAINS, 1, wxString::Format(wxT("%.2lf"), remains)); + _statsGrid->SetCellTextColour(BALANCE, 1, (balance >= 0) ? wxColor(0x00, 0xFF, 0x00) : wxColor(0xFF, 0x00, 0x00)); + _statsGrid->SetCellValue(BALANCE, 1, wxString::Format(wxT("%.2lf"), balance)); for(i=0; iGetCategoriesNumber()+1; i++) { diff --git a/src/view/grid/GridAccount.cpp b/src/view/grid/GridAccount.cpp index a07d7d4..d971cae 100644 --- a/src/view/grid/GridAccount.cpp +++ b/src/view/grid/GridAccount.cpp @@ -56,7 +56,7 @@ GridAccount::GridAccount(KissCount* kiss, wxWindow *parent, wxWindowID id, SetColLabelSize(0); SetRowLabelSize(0); - SetColSize (DESCRIPTION, GetColSize(DESCRIPTION)*3); + SetColSize (DESCRIPTION, GetColSize(DESCRIPTION)*5); SetDefaultCellFont(font); font.SetWeight(wxFONTWEIGHT_BOLD); diff --git a/src/view/wxUI.cpp b/src/view/wxUI.cpp index 99798d2..0d35e64 100644 --- a/src/view/wxUI.cpp +++ b/src/view/wxUI.cpp @@ -188,11 +188,12 @@ void wxUI::LoadPanels() void wxUI::LoadUser() { User* user = _kiss->GetUser(); - LoadPanels(); if (user->_preferences[wxT("language")] != wxT("")) SetLanguage(user->GetLanguage()); + LoadPanels(); + if (_panels.size()) ShowPanel(_panels[0]); }