* Fix a bug with not escaped characters

* Use GetLastRowId instead of doing another SQL request
* Handle request failling
* Fix a bug, wxGridCellFastBoolEditor crashes when deleted
This commit is contained in:
Grégory Soutadé 2010-09-05 12:08:48 +02:00
parent 0456397fc8
commit fc0159fbc5
9 changed files with 265 additions and 276 deletions

3
TODO
View File

@ -9,7 +9,6 @@ Can type a letter with a comboboxes
Windows version
Need packaging
Better build system for wxFreeChart (hacked by me)
Handle bad SQL return
Category color/font
Shared accounts
Documentation (en)
@ -25,7 +24,6 @@ Next version
More translations
Formulas
Import/Export module
Undo/redo
Printing (maybe in html)
Refactor web view code
@ -33,3 +31,4 @@ Refactor web view code
Will not be implemented
Copy and paste
Undo/redo

Binary file not shown.

View File

@ -2,10 +2,11 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-08-22 16:33+0200\n"
"POT-Creation-Date: 2010-09-05 12:06+0200\n"
"PO-Revision-Date: \n"
"Last-Translator: Soutadé <soutade@gmail.com>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -18,51 +19,51 @@ msgstr ""
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#: src/view/PreferencesPanel.cpp:574
#: src/view/StatsPanel.cpp:279
#: src/view/PreferencesPanel.cpp:582
#: src/view/StatsPanel.cpp:282
msgid " - "
msgstr " - "
#: src/view/PreferencesPanel.cpp:359
#: src/view/PreferencesPanel.cpp:378
#: src/view/PreferencesPanel.cpp:468
#: src/view/PreferencesPanel.cpp:487
#: src/view/PreferencesPanel.cpp:532
#: src/view/UsersDialog.cpp:114
#: src/view/PreferencesPanel.cpp:367
#: src/view/PreferencesPanel.cpp:386
#: src/view/PreferencesPanel.cpp:476
#: src/view/PreferencesPanel.cpp:495
#: src/view/PreferencesPanel.cpp:540
#: src/view/UsersDialog.cpp:116
msgid " already exists"
msgstr " existe déjà "
#: src/view/SearchPanel.cpp:214
#: src/view/SearchPanel.cpp:219
msgid " entries found"
msgstr " entrées trouvées"
#: src/model/Database.cpp:130
#: src/model/Database.cpp:141
msgid " not found, aborting"
msgstr " non trouvé, arrêt"
#: src/view/AccountPanel.cpp:982
#: src/view/AccountPanel.cpp:994
msgid " operations ?"
msgstr " opérations ?"
#: src/view/PreferencesPanel.cpp:581
#: src/view/PreferencesPanel.cpp:589
msgid " profil ?"
msgstr " profil ?"
#: src/view/SearchPanel.cpp:216
#: src/view/SearchPanel.cpp:221
msgid "1 entry found"
msgstr "1 entrée trouvée"
#: src/view/ButtonPanel.cpp:52
#: src/view/ButtonPanel.cpp:74
msgid "About"
msgstr "A propos"
#: src/view/GridAccount.cpp:46
#: src/view/SearchPanel.cpp:84
#: src/view/grid/GridAccount.cpp:55
#: src/view/SearchPanel.cpp:89
msgid "Account"
msgstr "Compte"
#: src/view/PreferencesPanel.cpp:359
#: src/view/PreferencesPanel.cpp:378
#: src/view/PreferencesPanel.cpp:367
#: src/view/PreferencesPanel.cpp:386
msgid "Account "
msgstr "Le compte "
@ -79,27 +80,27 @@ msgstr "Numéro de compte"
msgid "Accounts"
msgstr "Comptes"
#: src/view/SearchPanel.cpp:81
#: src/view/SearchPanel.cpp:86
msgid "Amount from"
msgstr "Montant min"
#: src/view/SearchPanel.cpp:82
#: src/view/SearchPanel.cpp:87
msgid "Amount to"
msgstr "Montant max"
#: src/view/PreferencesPanel.cpp:340
#: src/view/PreferencesPanel.cpp:581
#: src/view/AccountPanel.cpp:977
#: src/view/PreferencesPanel.cpp:348
#: src/view/PreferencesPanel.cpp:589
#: src/view/AccountPanel.cpp:989
msgid "Are you sure want to delete "
msgstr "Etes vous sûr de vouloir supprimer "
#: src/view/PreferencesPanel.cpp:449
#: src/view/AccountPanel.cpp:669
#: src/view/SearchPanel.cpp:345
#: src/view/PreferencesPanel.cpp:457
#: src/view/AccountPanel.cpp:673
#: src/view/SearchPanel.cpp:350
msgid "Are you sure want to delete : \n"
msgstr "Etes vous sûr de vouloir supprimer : \n"
#: src/view/PreferencesPanel.cpp:255
#: src/view/PreferencesPanel.cpp:263
msgid "Ascending"
msgstr "Croissant"
@ -113,13 +114,13 @@ msgstr "Annuler"
msgid "Categories"
msgstr "Catégories"
#: src/view/GridAccount.cpp:46
#: src/view/SearchPanel.cpp:83
#: src/view/grid/GridAccount.cpp:55
#: src/view/SearchPanel.cpp:88
msgid "Category"
msgstr "Catégorie"
#: src/view/PreferencesPanel.cpp:468
#: src/view/PreferencesPanel.cpp:487
#: src/view/PreferencesPanel.cpp:476
#: src/view/PreferencesPanel.cpp:495
msgid "Category "
msgstr "Catégorie"
@ -135,7 +136,7 @@ msgstr "Changer le mot de passe"
msgid "Change password"
msgstr "Changer le mot de passe"
#: src/view/ButtonPanel.cpp:51
#: src/view/ButtonPanel.cpp:73
msgid "Change user"
msgstr "Changer d'utilisateur"
@ -143,7 +144,7 @@ msgstr "Changer d'utilisateur"
msgid "Check mode"
msgstr "Mode rapprochement"
#: src/view/PreferencesPanel.cpp:207
#: src/view/PreferencesPanel.cpp:215
msgid "Color"
msgstr "Couleur"
@ -156,7 +157,7 @@ msgstr "Confirmer le mot de passe"
msgid "Cost repartition"
msgstr "Répartition des coûts"
#: src/view/GridAccount.cpp:46
#: src/view/grid/GridAccount.cpp:55
msgid "Credit"
msgstr "Crédit"
@ -172,67 +173,69 @@ msgstr "Cur Débit"
msgid "Current value"
msgstr "Valeur courante"
#: src/view/GridAccount.cpp:46
#: src/view/grid/GridAccount.cpp:55
msgid "Date"
msgstr "Date"
#: src/view/SearchPanel.cpp:48
#: src/view/SearchPanel.cpp:53
msgid "Date from"
msgstr "Date min"
#: src/view/SearchPanel.cpp:49
#: src/view/SearchPanel.cpp:54
msgid "Date to"
msgstr "Date max"
#: src/view/GridAccount.cpp:46
#: src/view/grid/GridAccount.cpp:55
msgid "Debit"
msgstr "Débit"
#: src/view/PreferencesPanel.cpp:158
#: src/view/PreferencesPanel.cpp:166
msgid "Default"
msgstr "Défaut"
#: src/view/PreferencesPanel.cpp:159
#: src/view/PreferencesPanel.cpp:209
#: src/view/AccountPanel.cpp:836
#: src/view/PreferencesPanel.cpp:167
#: src/view/PreferencesPanel.cpp:217
#: src/view/AccountPanel.cpp:848
msgid "Delete"
msgstr "Supprimer"
#: src/view/PreferencesPanel.cpp:256
#: src/view/PreferencesPanel.cpp:264
msgid "Descending"
msgstr "Décroissant"
#: src/view/GridAccount.cpp:46
#: src/view/SearchPanel.cpp:80
#: src/view/grid/GridAccount.cpp:55
#: src/view/SearchPanel.cpp:85
msgid "Description"
msgstr "Description"
#: src/model/Database.cpp:84
#: src/model/Database.cpp:91
#: src/model/Database.cpp:109
#: src/model/Database.cpp:130
#: src/model/Database.cpp:138
#: src/model/Database.cpp:159
#: src/model/Database.cpp:38
#: src/model/Database.cpp:55
#: src/model/Database.cpp:95
#: src/model/Database.cpp:102
#: src/model/Database.cpp:120
#: src/model/Database.cpp:141
#: src/model/Database.cpp:149
#: src/model/Database.cpp:170
#: src/view/PasswordDialog.cpp:72
#: src/view/PasswordDialog.cpp:78
#: 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:973
#: 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
#: src/view/PreferencesPanel.cpp:344
#: src/view/PreferencesPanel.cpp:367
#: src/view/PreferencesPanel.cpp:386
#: src/view/PreferencesPanel.cpp:476
#: src/view/PreferencesPanel.cpp:495
#: src/view/PreferencesPanel.cpp:534
#: src/view/PreferencesPanel.cpp:540
#: src/view/AccountPanel.cpp:985
#: src/view/UsersDialog.cpp:88
#: src/view/UsersDialog.cpp:116
#: src/view/SearchPanel.cpp:139
#: src/view/SearchPanel.cpp:149
#: src/view/SearchPanel.cpp:163
#: src/view/SearchPanel.cpp:174
msgid "Error"
msgstr "Erreur"
#: src/model/Database.cpp:159
#: src/model/Database.cpp:170
msgid "Error creating original database"
msgstr "Erreur durant la création de la base de données initiale"
@ -240,13 +243,13 @@ msgstr "Erreur durant la création de la base de données initiale"
msgid "Final value"
msgstr "Valeur finale"
#: src/model/Database.cpp:294
#: src/model/Database.cpp:305
#: src/controller/KissCount.cpp:276
#: src/view/GridAccount.cpp:126
#: src/view/grid/GridAccount.cpp:136
msgid "Fix"
msgstr "Fixe"
#: src/view/PreferencesPanel.cpp:208
#: src/view/PreferencesPanel.cpp:216
msgid "Font"
msgstr "Police"
@ -259,7 +262,7 @@ msgid "From "
msgstr "A partir de "
#: src/view/GenerateDialog.cpp:31
#: src/view/AccountPanel.cpp:833
#: src/view/AccountPanel.cpp:845
msgid "Generate month"
msgstr "Générer mois"
@ -275,23 +278,23 @@ msgstr "Loisirs"
msgid "Initial value"
msgstr "Valeur initiale"
#: src/view/SearchPanel.cpp:144
#: src/view/SearchPanel.cpp:149
msgid "Invalid amount from"
msgstr "Montant min invalide"
#: src/view/SearchPanel.cpp:169
#: src/view/SearchPanel.cpp:174
msgid "Invalid amount range"
msgstr "Intervalle des montants invalide"
#: src/view/SearchPanel.cpp:158
#: src/view/SearchPanel.cpp:163
msgid "Invalid amount to"
msgstr "Montant max invalide"
#: src/view/SearchPanel.cpp:134
#: src/view/SearchPanel.cpp:139
msgid "Invalid date range"
msgstr "Intervalle de temps invalide"
#: src/view/PreferencesPanel.cpp:526
#: src/view/PreferencesPanel.cpp:534
msgid "Invalid name"
msgstr "Nom invalide"
@ -299,19 +302,19 @@ msgstr "Nom invalide"
msgid "Invalid old password"
msgstr "Ancien mot de passe invalide"
#: src/view/UsersDialog.cpp:86
#: src/view/UsersDialog.cpp:88
msgid "Invalid password"
msgstr "Mot de passe invalide"
#: src/view/StatsPanel.cpp:294
#: src/view/StatsPanel.cpp:297
msgid "Invalide date range"
msgstr "Intervalle de temps invalide"
#: src/view/PreferencesPanel.cpp:336
#: src/view/PreferencesPanel.cpp:344
msgid "It must be at least one account !"
msgstr "Il doit y avoir au moins un compte !"
#: src/view/AccountPanel.cpp:973
#: src/view/AccountPanel.cpp:985
msgid "It must be at least one month !"
msgstr "Il doit rester au mois un mois"
@ -319,9 +322,9 @@ msgstr "Il doit rester au mois un mois"
msgid "Kill me"
msgstr "Kill me"
#: src/view/PreferencesPanel.cpp:566
#: src/view/PreferencesPanel.cpp:569
#: src/view/StatsPanel.cpp:294
#: src/view/PreferencesPanel.cpp:574
#: src/view/PreferencesPanel.cpp:577
#: src/view/StatsPanel.cpp:297
msgid "KissCount"
msgstr "KissCount"
@ -329,26 +332,26 @@ msgstr "KissCount"
msgid "Language"
msgstr "Langue"
#: src/view/PreferencesPanel.cpp:569
#: src/view/PreferencesPanel.cpp:577
msgid "Language not changed"
msgstr "Langue non changée"
#: src/view/PreferencesPanel.cpp:566
#: src/view/PreferencesPanel.cpp:574
msgid "Language successfully changed, please go to another panel"
msgstr "Langue changée, allez sur un autre panneau pour rendre le changement effectif"
#: src/view/PreferencesPanel.cpp:66
#: src/view/PreferencesPanel.cpp:155
#: src/view/PreferencesPanel.cpp:206
#: src/view/PreferencesPanel.cpp:163
#: src/view/PreferencesPanel.cpp:214
msgid "Name"
msgstr "Nom"
#: src/view/PreferencesPanel.cpp:538
#: src/view/PreferencesPanel.cpp:546
msgid "Name changed"
msgstr "Nom changé"
#: src/view/UsersDialog.cpp:52
#: src/view/UsersDialog.cpp:103
#: src/view/UsersDialog.cpp:105
msgid "New User"
msgstr "Nouvel utilisateur"
@ -356,15 +359,15 @@ msgstr "Nouvel utilisateur"
msgid "New password "
msgstr "Nouveau mot de passe"
#: src/model/Database.cpp:124
#: src/model/Database.cpp:135
msgid "No database found, creating a new one"
msgstr "Aucune base de données trouvée, création d'une nouvelle"
#: src/view/SearchPanel.cpp:219
#: src/view/SearchPanel.cpp:224
msgid "No entry found"
msgstr "Pas d'entrée trouvée"
#: src/view/PreferencesPanel.cpp:156
#: src/view/PreferencesPanel.cpp:164
msgid "Number"
msgstr "Numéro de compte"
@ -386,7 +389,7 @@ msgstr "Frais de fonctionnement"
msgid "Operation order"
msgstr "Ordre des opérations"
#: src/view/ButtonPanel.cpp:47
#: src/view/ButtonPanel.cpp:69
msgid "Operations"
msgstr "Opérations"
@ -402,7 +405,7 @@ msgstr "Mot de passe"
msgid "Password changed"
msgstr "Mot de passe changé"
#: src/view/ButtonPanel.cpp:102
#: src/view/ButtonPanel.cpp:105
msgid ""
"Personal accounting software\n"
"\n"
@ -416,17 +419,21 @@ msgstr ""
msgid "Please retype new password"
msgstr "Re entrez le mot de passe"
#: src/view/PreferencesPanel.cpp:540
#: src/view/PreferencesPanel.cpp:574
#: src/view/ButtonPanel.cpp:50
#: src/view/PreferencesPanel.cpp:548
#: src/view/PreferencesPanel.cpp:582
#: src/view/ButtonPanel.cpp:72
msgid "Preferences"
msgstr "Préférences"
#: src/view/ButtonPanel.cpp:53
#: src/model/Database.cpp:55
msgid "Query failed !\n"
msgstr "La requête a échouée !\n"
#: src/view/ButtonPanel.cpp:75
msgid "Quit"
msgstr "Quitter"
#: src/view/ButtonPanel.cpp:109
#: src/view/ButtonPanel.cpp:112
msgid "Quit KissCount ?"
msgstr "Quitter KissCount ?"
@ -434,9 +441,9 @@ msgstr "Quitter KissCount ?"
msgid "Remains"
msgstr "Restant"
#: src/view/SearchPanel.cpp:78
#: src/view/SearchPanel.cpp:239
#: src/view/ButtonPanel.cpp:49
#: src/view/SearchPanel.cpp:83
#: src/view/SearchPanel.cpp:244
#: src/view/ButtonPanel.cpp:71
msgid "Search"
msgstr "Chercher"
@ -445,12 +452,12 @@ msgstr "Chercher"
msgid "Serie 1"
msgstr "Série 1"
#: src/view/PreferencesPanel.cpp:157
#: src/view/PreferencesPanel.cpp:165
msgid "Shared"
msgstr "Partagé"
#: src/view/StatsPanel.cpp:279
#: src/view/ButtonPanel.cpp:48
#: src/view/StatsPanel.cpp:282
#: src/view/ButtonPanel.cpp:70
msgid "Statistics"
msgstr "Statistiques"
@ -470,10 +477,10 @@ msgstr "Total Crédit"
msgid "Total Debit"
msgstr "Total Débit"
#: src/model/Database.cpp:84
#: src/model/Database.cpp:91
#: src/model/Database.cpp:109
#: src/model/Database.cpp:138
#: src/model/Database.cpp:95
#: src/model/Database.cpp:102
#: src/model/Database.cpp:120
#: src/model/Database.cpp:149
msgid "Unable to open Database"
msgstr "Impossible d'ouvrir la base de données"
@ -487,13 +494,17 @@ msgstr "Exceptionnel"
msgid "Unknown"
msgstr "Inconnu"
#: src/model/Database.cpp:38
msgid "Update failed !\n"
msgstr "La mise à jour à échouée !\n"
#: src/view/PreferencesPanel.cpp:54
msgid "User"
msgstr "Utilisateur"
#: src/view/PreferencesPanel.cpp:532
#: src/view/PreferencesPanel.cpp:540
#: src/view/UsersDialog.cpp:38
#: src/view/UsersDialog.cpp:114
#: src/view/UsersDialog.cpp:116
msgid "User "
msgstr "Utilisateur"

View File

@ -8,53 +8,54 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-08-22 16:33+0200\n"
"POT-Creation-Date: 2010-09-05 12:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/view/PreferencesPanel.cpp:574 src/view/StatsPanel.cpp:279
#: src/view/PreferencesPanel.cpp:582 src/view/StatsPanel.cpp:282
msgid " - "
msgstr ""
#: src/view/PreferencesPanel.cpp:359 src/view/PreferencesPanel.cpp:378
#: src/view/PreferencesPanel.cpp:468 src/view/PreferencesPanel.cpp:487
#: src/view/PreferencesPanel.cpp:532 src/view/UsersDialog.cpp:114
#: src/view/PreferencesPanel.cpp:367 src/view/PreferencesPanel.cpp:386
#: src/view/PreferencesPanel.cpp:476 src/view/PreferencesPanel.cpp:495
#: src/view/PreferencesPanel.cpp:540 src/view/UsersDialog.cpp:116
msgid " already exists"
msgstr ""
#: src/view/SearchPanel.cpp:214
#: src/view/SearchPanel.cpp:219
msgid " entries found"
msgstr ""
#: src/model/Database.cpp:130
#: src/model/Database.cpp:141
msgid " not found, aborting"
msgstr ""
#: src/view/AccountPanel.cpp:982
#: src/view/AccountPanel.cpp:994
msgid " operations ?"
msgstr ""
#: src/view/PreferencesPanel.cpp:581
#: src/view/PreferencesPanel.cpp:589
msgid " profil ?"
msgstr ""
#: src/view/SearchPanel.cpp:216
#: src/view/SearchPanel.cpp:221
msgid "1 entry found"
msgstr ""
#: src/view/ButtonPanel.cpp:52
#: src/view/ButtonPanel.cpp:74
msgid "About"
msgstr ""
#: src/view/GridAccount.cpp:46 src/view/SearchPanel.cpp:84
#: src/view/grid/GridAccount.cpp:55 src/view/SearchPanel.cpp:89
msgid "Account"
msgstr ""
#: src/view/PreferencesPanel.cpp:359 src/view/PreferencesPanel.cpp:378
#: src/view/PreferencesPanel.cpp:367 src/view/PreferencesPanel.cpp:386
msgid "Account "
msgstr ""
@ -70,25 +71,25 @@ msgstr ""
msgid "Accounts"
msgstr ""
#: src/view/SearchPanel.cpp:81
#: src/view/SearchPanel.cpp:86
msgid "Amount from"
msgstr ""
#: src/view/SearchPanel.cpp:82
#: src/view/SearchPanel.cpp:87
msgid "Amount to"
msgstr ""
#: src/view/PreferencesPanel.cpp:340 src/view/PreferencesPanel.cpp:581
#: src/view/AccountPanel.cpp:977
#: src/view/PreferencesPanel.cpp:348 src/view/PreferencesPanel.cpp:589
#: src/view/AccountPanel.cpp:989
msgid "Are you sure want to delete "
msgstr ""
#: src/view/PreferencesPanel.cpp:449 src/view/AccountPanel.cpp:669
#: src/view/SearchPanel.cpp:345
#: src/view/PreferencesPanel.cpp:457 src/view/AccountPanel.cpp:673
#: src/view/SearchPanel.cpp:350
msgid "Are you sure want to delete : \n"
msgstr ""
#: src/view/PreferencesPanel.cpp:255
#: src/view/PreferencesPanel.cpp:263
msgid "Ascending"
msgstr ""
@ -101,11 +102,11 @@ msgstr ""
msgid "Categories"
msgstr ""
#: src/view/GridAccount.cpp:46 src/view/SearchPanel.cpp:83
#: src/view/grid/GridAccount.cpp:55 src/view/SearchPanel.cpp:88
msgid "Category"
msgstr ""
#: src/view/PreferencesPanel.cpp:468 src/view/PreferencesPanel.cpp:487
#: src/view/PreferencesPanel.cpp:476 src/view/PreferencesPanel.cpp:495
msgid "Category "
msgstr ""
@ -121,7 +122,7 @@ msgstr ""
msgid "Change password"
msgstr ""
#: src/view/ButtonPanel.cpp:51
#: src/view/ButtonPanel.cpp:73
msgid "Change user"
msgstr ""
@ -129,7 +130,7 @@ msgstr ""
msgid "Check mode"
msgstr ""
#: src/view/PreferencesPanel.cpp:207
#: src/view/PreferencesPanel.cpp:215
msgid "Color"
msgstr ""
@ -141,7 +142,7 @@ msgstr ""
msgid "Cost repartition"
msgstr ""
#: src/view/GridAccount.cpp:46
#: src/view/grid/GridAccount.cpp:55
msgid "Credit"
msgstr ""
@ -157,54 +158,55 @@ msgstr ""
msgid "Current value"
msgstr ""
#: src/view/GridAccount.cpp:46
#: src/view/grid/GridAccount.cpp:55
msgid "Date"
msgstr ""
#: src/view/SearchPanel.cpp:48
#: src/view/SearchPanel.cpp:53
msgid "Date from"
msgstr ""
#: src/view/SearchPanel.cpp:49
#: src/view/SearchPanel.cpp:54
msgid "Date to"
msgstr ""
#: src/view/GridAccount.cpp:46
#: src/view/grid/GridAccount.cpp:55
msgid "Debit"
msgstr ""
#: src/view/PreferencesPanel.cpp:158
#: src/view/PreferencesPanel.cpp:166
msgid "Default"
msgstr ""
#: src/view/PreferencesPanel.cpp:159 src/view/PreferencesPanel.cpp:209
#: src/view/AccountPanel.cpp:836
#: src/view/PreferencesPanel.cpp:167 src/view/PreferencesPanel.cpp:217
#: src/view/AccountPanel.cpp:848
msgid "Delete"
msgstr ""
#: src/view/PreferencesPanel.cpp:256
#: src/view/PreferencesPanel.cpp:264
msgid "Descending"
msgstr ""
#: src/view/GridAccount.cpp:46 src/view/SearchPanel.cpp:80
#: src/view/grid/GridAccount.cpp:55 src/view/SearchPanel.cpp:85
msgid "Description"
msgstr ""
#: src/model/Database.cpp:84 src/model/Database.cpp:91
#: src/model/Database.cpp:109 src/model/Database.cpp:130
#: src/model/Database.cpp:138 src/model/Database.cpp:159
#: src/model/Database.cpp:38 src/model/Database.cpp:55
#: src/model/Database.cpp:95 src/model/Database.cpp:102
#: src/model/Database.cpp:120 src/model/Database.cpp:141
#: src/model/Database.cpp:149 src/model/Database.cpp:170
#: src/view/PasswordDialog.cpp:72 src/view/PasswordDialog.cpp:78
#: 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:973
#: 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
#: src/view/PreferencesPanel.cpp:344 src/view/PreferencesPanel.cpp:367
#: src/view/PreferencesPanel.cpp:386 src/view/PreferencesPanel.cpp:476
#: src/view/PreferencesPanel.cpp:495 src/view/PreferencesPanel.cpp:534
#: src/view/PreferencesPanel.cpp:540 src/view/AccountPanel.cpp:985
#: src/view/UsersDialog.cpp:88 src/view/UsersDialog.cpp:116
#: src/view/SearchPanel.cpp:139 src/view/SearchPanel.cpp:149
#: src/view/SearchPanel.cpp:163 src/view/SearchPanel.cpp:174
msgid "Error"
msgstr ""
#: src/model/Database.cpp:159
#: src/model/Database.cpp:170
msgid "Error creating original database"
msgstr ""
@ -212,12 +214,12 @@ msgstr ""
msgid "Final value"
msgstr ""
#: src/model/Database.cpp:294 src/controller/KissCount.cpp:276
#: src/view/GridAccount.cpp:126
#: src/model/Database.cpp:305 src/controller/KissCount.cpp:276
#: src/view/grid/GridAccount.cpp:136
msgid "Fix"
msgstr ""
#: src/view/PreferencesPanel.cpp:208
#: src/view/PreferencesPanel.cpp:216
msgid "Font"
msgstr ""
@ -229,7 +231,7 @@ msgstr ""
msgid "From "
msgstr ""
#: src/view/GenerateDialog.cpp:31 src/view/AccountPanel.cpp:833
#: src/view/GenerateDialog.cpp:31 src/view/AccountPanel.cpp:845
msgid "Generate month"
msgstr ""
@ -245,23 +247,23 @@ msgstr ""
msgid "Initial value"
msgstr ""
#: src/view/SearchPanel.cpp:144
#: src/view/SearchPanel.cpp:149
msgid "Invalid amount from"
msgstr ""
#: src/view/SearchPanel.cpp:169
#: src/view/SearchPanel.cpp:174
msgid "Invalid amount range"
msgstr ""
#: src/view/SearchPanel.cpp:158
#: src/view/SearchPanel.cpp:163
msgid "Invalid amount to"
msgstr ""
#: src/view/SearchPanel.cpp:134
#: src/view/SearchPanel.cpp:139
msgid "Invalid date range"
msgstr ""
#: src/view/PreferencesPanel.cpp:526
#: src/view/PreferencesPanel.cpp:534
msgid "Invalid name"
msgstr ""
@ -269,19 +271,19 @@ msgstr ""
msgid "Invalid old password"
msgstr ""
#: src/view/UsersDialog.cpp:86
#: src/view/UsersDialog.cpp:88
msgid "Invalid password"
msgstr ""
#: src/view/StatsPanel.cpp:294
#: src/view/StatsPanel.cpp:297
msgid "Invalide date range"
msgstr ""
#: src/view/PreferencesPanel.cpp:336
#: src/view/PreferencesPanel.cpp:344
msgid "It must be at least one account !"
msgstr ""
#: src/view/AccountPanel.cpp:973
#: src/view/AccountPanel.cpp:985
msgid "It must be at least one month !"
msgstr ""
@ -289,8 +291,8 @@ msgstr ""
msgid "Kill me"
msgstr ""
#: src/view/PreferencesPanel.cpp:566 src/view/PreferencesPanel.cpp:569
#: src/view/StatsPanel.cpp:294
#: src/view/PreferencesPanel.cpp:574 src/view/PreferencesPanel.cpp:577
#: src/view/StatsPanel.cpp:297
msgid "KissCount"
msgstr ""
@ -298,24 +300,24 @@ msgstr ""
msgid "Language"
msgstr ""
#: src/view/PreferencesPanel.cpp:569
#: src/view/PreferencesPanel.cpp:577
msgid "Language not changed"
msgstr ""
#: src/view/PreferencesPanel.cpp:566
#: src/view/PreferencesPanel.cpp:574
msgid "Language successfully changed, please go to another panel"
msgstr ""
#: src/view/PreferencesPanel.cpp:66 src/view/PreferencesPanel.cpp:155
#: src/view/PreferencesPanel.cpp:206
#: src/view/PreferencesPanel.cpp:66 src/view/PreferencesPanel.cpp:163
#: src/view/PreferencesPanel.cpp:214
msgid "Name"
msgstr ""
#: src/view/PreferencesPanel.cpp:538
#: src/view/PreferencesPanel.cpp:546
msgid "Name changed"
msgstr ""
#: src/view/UsersDialog.cpp:52 src/view/UsersDialog.cpp:103
#: src/view/UsersDialog.cpp:52 src/view/UsersDialog.cpp:105
msgid "New User"
msgstr ""
@ -323,15 +325,15 @@ msgstr ""
msgid "New password "
msgstr ""
#: src/model/Database.cpp:124
#: src/model/Database.cpp:135
msgid "No database found, creating a new one"
msgstr ""
#: src/view/SearchPanel.cpp:219
#: src/view/SearchPanel.cpp:224
msgid "No entry found"
msgstr ""
#: src/view/PreferencesPanel.cpp:156
#: src/view/PreferencesPanel.cpp:164
msgid "Number"
msgstr ""
@ -352,7 +354,7 @@ msgstr ""
msgid "Operation order"
msgstr ""
#: src/view/ButtonPanel.cpp:47
#: src/view/ButtonPanel.cpp:69
msgid "Operations"
msgstr ""
@ -368,7 +370,7 @@ msgstr ""
msgid "Password changed"
msgstr ""
#: src/view/ButtonPanel.cpp:102
#: src/view/ButtonPanel.cpp:105
msgid ""
"Personal accounting software\n"
"\n"
@ -379,16 +381,20 @@ msgstr ""
msgid "Please retype new password"
msgstr ""
#: src/view/PreferencesPanel.cpp:540 src/view/PreferencesPanel.cpp:574
#: src/view/ButtonPanel.cpp:50
#: src/view/PreferencesPanel.cpp:548 src/view/PreferencesPanel.cpp:582
#: src/view/ButtonPanel.cpp:72
msgid "Preferences"
msgstr ""
#: src/view/ButtonPanel.cpp:53
#: src/model/Database.cpp:55
msgid "Query failed !\n"
msgstr ""
#: src/view/ButtonPanel.cpp:75
msgid "Quit"
msgstr ""
#: src/view/ButtonPanel.cpp:109
#: src/view/ButtonPanel.cpp:112
msgid "Quit KissCount ?"
msgstr ""
@ -396,8 +402,8 @@ msgstr ""
msgid "Remains"
msgstr ""
#: src/view/SearchPanel.cpp:78 src/view/SearchPanel.cpp:239
#: src/view/ButtonPanel.cpp:49
#: src/view/SearchPanel.cpp:83 src/view/SearchPanel.cpp:244
#: src/view/ButtonPanel.cpp:71
msgid "Search"
msgstr ""
@ -405,11 +411,11 @@ msgstr ""
msgid "Serie 1"
msgstr ""
#: src/view/PreferencesPanel.cpp:157
#: src/view/PreferencesPanel.cpp:165
msgid "Shared"
msgstr ""
#: src/view/StatsPanel.cpp:279 src/view/ButtonPanel.cpp:48
#: src/view/StatsPanel.cpp:282 src/view/ButtonPanel.cpp:70
msgid "Statistics"
msgstr ""
@ -429,8 +435,8 @@ msgstr ""
msgid "Total Debit"
msgstr ""
#: src/model/Database.cpp:84 src/model/Database.cpp:91
#: src/model/Database.cpp:109 src/model/Database.cpp:138
#: src/model/Database.cpp:95 src/model/Database.cpp:102
#: src/model/Database.cpp:120 src/model/Database.cpp:149
msgid "Unable to open Database"
msgstr ""
@ -442,12 +448,16 @@ msgstr ""
msgid "Unknown"
msgstr ""
#: src/model/Database.cpp:38
msgid "Update failed !\n"
msgstr ""
#: src/view/PreferencesPanel.cpp:54
msgid "User"
msgstr ""
#: src/view/PreferencesPanel.cpp:532 src/view/UsersDialog.cpp:38
#: src/view/UsersDialog.cpp:114
#: src/view/PreferencesPanel.cpp:540 src/view/UsersDialog.cpp:38
#: src/view/UsersDialog.cpp:116
msgid "User "
msgstr ""

View File

@ -35,6 +35,8 @@
} \
catch (wxSQLite3Exception e) \
{ \
wxMessageBox(_("Update failed !\n") + req, _("Error"), wxICON_ERROR | wxOK); \
std::cerr << __FUNCTION__ << "\n" ; \
std::cerr << req.mb_str() << "\n" ; \
std::cerr << e.GetMessage().mb_str() << "\n" ; \
code_if_fail; \
@ -50,6 +52,8 @@
} \
catch (wxSQLite3Exception e) \
{ \
wxMessageBox(_("Query failed !\n") + req, _("Error"), wxICON_ERROR | wxOK); \
std::cerr << __FUNCTION__ << "\n" ; \
std::cerr << req.mb_str() << "\n" ; \
std::cerr << e.GetMessage().mb_str() << "\n" ; \
code_if_fail; \
@ -61,6 +65,13 @@
#define EXECUTE_SQL_UPDATE(req, return_value) EXECUTE_SQL_UPDATE_WITH_CODE(req, return_value, {}, {})
#define ESCAPE_CHARS(s) { \
if (s.Find(wxT("\\\"")) == wxNOT_FOUND) \
s.Replace(wxT("\""), wxT("\\\""), true); \
if (s.Find(wxT("\\\'")) == wxNOT_FOUND) \
s.Replace(wxT("\'"), wxT("\\\'"), true); \
}
static inline wxString DoubleToString(double d)
{
wxString res;
@ -441,7 +452,7 @@ void Database::LinkOrUnlinkOperation(Operation& op)
EXECUTE_SQL_UPDATE(req, );
}
req = wxT("SELECT id FROM operation WHERE description='") + op.description + wxT("'");
req = wxT("SELECT id FROM operation WHERE description=\"") + op.description + wxT("\"");
req += wxT(" AND month='") + wxString::Format(wxT("%d"), op.month) + wxT("'");
req += wxT(" AND year='") + wxString::Format(wxT("%d"), op.year) + wxT("'");
req += wxT(" AND amount='") + DoubleToString(-op.amount) + wxT("'");
@ -471,6 +482,8 @@ void Database::UpdateOperation(Operation& op)
LinkOrUnlinkOperation(op);
ESCAPE_CHARS(op.description);
req = wxT("UPDATE operation SET ") ;
req += wxT("parent='") + op.parent + wxT("'");
req += wxT(", account='") + op.account + wxT("'");
@ -498,6 +511,8 @@ wxString Database::AddOperation(User* user, Operation& op)
wxString req, res;
wxSQLite3ResultSet set;
ESCAPE_CHARS(op.description);
req = wxT("INSERT INTO operation ('user', 'parent', 'account', 'year', 'month', 'day', 'amount', 'description', 'category', 'fix_cost', 'formula', 'transfert') VALUES ('") ;
req += user->_id + wxT("'");
req += wxT(", '") + op.parent + wxT("'");
@ -518,32 +533,7 @@ wxString Database::AddOperation(User* user, Operation& op)
EXECUTE_SQL_UPDATE(req, wxT("0"));
req = wxT("SELECT id FROM operation WHERE ");
req += wxT("user='") + user->_id + wxT("'");
req += wxT(" AND parent='") + op.parent + wxT("'");
req += wxT(" AND account='") + op.account + wxT("'");
req += wxT(" AND year='") + wxString::Format(wxT("%d"), op.year) + wxT("'");
req += wxT(" AND month='") + wxString::Format(wxT("%d"), op.month) + wxT("'");
req += wxT(" AND day='") + wxString::Format(wxT("%d"), op.day) + wxT("'");
req += wxT(" AND amount='") + DoubleToString(op.amount) + wxT("'");
req += wxT(" AND description=\"") + op.description + wxT("\"");
req += wxT(" AND category='") + op.category + wxT("'");
if (op.fix_cost)
req += wxT(" AND fix_cost='1'") ;
else
req += wxT(" AND fix_cost='0'") ;
req += wxT(" AND formula='") + op.formula + wxT("'");
req += wxT(" AND transfert='") + op.transfert + wxT("'");
req += wxT("ORDER BY id DESC") ;
EXECUTE_SQL_QUERY(req , set, wxT("0"));
if (set.NextRow())
res = set.GetAsString(wxT("id"));
else
res = wxT("0");
set.Finalize();
res = _db.GetLastRowId().ToString();
op.id = res;
@ -630,8 +620,7 @@ void Database::SetAccountAmount(int month, int year, const wxString& accountId,
wxString Database::AddAccount(User* user, Account& ac)
{
wxString req, res;
wxSQLite3ResultSet set;
wxString req;
req = wxT("INSERT INTO account ('user', 'name', 'number', 'shared', 'default_account') VALUES ('") ;
req += user->_id + wxT("'");
@ -649,19 +638,7 @@ wxString Database::AddAccount(User* user, Account& ac)
EXECUTE_SQL_UPDATE(req, wxT("0"));
req = wxT("SELECT id FROM account WHERE name='") + ac.name + wxT("'") ;
req += wxT("AND user='") + user->_id + wxT("'");
EXECUTE_SQL_QUERY(req , set, wxT("0"));
if (set.NextRow())
res = set.GetAsString(wxT("id"));
else
res = wxT("0");
set.Finalize();
return res;
return _db.GetLastRowId().ToString();
}
void Database::UpdateAccount(Account& ac)
@ -693,8 +670,7 @@ void Database::DeleteAccount(Account& ac)
wxString Database::AddCategory(User* user, Category& category)
{
wxString req, res;
wxSQLite3ResultSet set;
wxString req;
wxString color;
color = wxT("#") ;
@ -712,19 +688,7 @@ wxString Database::AddCategory(User* user, Category& category)
EXECUTE_SQL_UPDATE(req, wxT("0"));
req = wxT("SELECT id FROM preference WHERE user='") + user->_id + wxT("'") ;
req += wxT(" AND name='") + category.name + wxT("'");
EXECUTE_SQL_QUERY(req , set, wxT("0"));
if (set.NextRow())
res = set.GetAsString(wxT("id"));
else
res = wxT("0");
set.Finalize();
return res;
return _db.GetLastRowId().ToString();
}
void Database::UpdateCategory(Category& category)
@ -937,8 +901,7 @@ void Database::ChangeName(User* user, const wxString& name)
void Database::NewUser(const wxString& name)
{
wxString req, id;
wxSQLite3ResultSet set;
wxString req;
req = wxT("INSERT INTO user ('name', 'password') VALUES ('") ;
req += name + wxT("'");
@ -946,18 +909,6 @@ void Database::NewUser(const wxString& name)
req += wxT(")");
EXECUTE_SQL_UPDATE(req, );
req = wxT("SELECT id FROM user WHERE ");
req += wxT("name='") + name + wxT("'");
EXECUTE_SQL_QUERY(req , set, );
set.NextRow();
id = set.GetAsString(wxT("id"));
set.Finalize();
return ;
}
/*
@ -1050,6 +1001,7 @@ std::vector<Operation>* Database::Search(User* user, wxString* description, wxDa
wxString dayFrom, monthFrom, yearFrom;
wxString dayTo, monthTo, yearTo;
wxString desc;
if (dateFrom)
{
@ -1069,10 +1021,14 @@ std::vector<Operation>* Database::Search(User* user, wxString* description, wxDa
if (description)
{
desc = *description;
ESCAPE_CHARS(desc);
if (wildcards)
req += wxT("description LIKE '%") + *description + wxT("%'");
req += wxT("description LIKE '%") + desc + wxT("%'");
else
req += wxT("description='") + *description + wxT("'");
req += wxT("description=\"") + desc + wxT("\"");
firstCond = true;
}

View File

@ -179,7 +179,7 @@ void PreferencesPanel::InitAccounts(User* user)
_accountsGrid->SetCellRenderer(curLine, ACCOUNT_DEFAULT, new wxGridCellBoolRenderer ());
_accountsGrid->SetCellEditor(curLine, ACCOUNT_DEFAULT, new wxGridCellFastBoolEditor ());
_accountsGrid->SetCellRenderer(curLine, ACCOUNT_DELETE, new wxGridCellBoolRenderer ());
_accountsGrid->SetCellEditor(curLine, ACCOUNT_DELETE, new wxGridCellFastBoolEditor ());
_accountsGrid->SetCellEditor(curLine, ACCOUNT_DELETE, new wxGridCellBoolEditor ());
_accountsGrid->SetCellValue(curLine, ACCOUNT_SHARED, (it->shared)?wxT("1"):wxT("0"));
_accountsGrid->SetCellValue(curLine, ACCOUNT_DEFAULT, (it->_default)?wxT("1"):wxT("0"));
@ -225,7 +225,7 @@ void PreferencesPanel::InitCategories(User* user)
if (curLine)
{
_categoriesGrid->SetCellRenderer(curLine, CATEGORY_DELETE, new wxGridCellBoolRenderer ());
_categoriesGrid->SetCellEditor(curLine, CATEGORY_DELETE, new wxGridCellFastBoolEditor ());
_categoriesGrid->SetCellEditor(curLine, CATEGORY_DELETE, new wxGridCellBoolEditor ());
}
_categoriesGrid->SetCellAlignment(curLine, CATEGORY_COLOR, wxALIGN_CENTRE, wxALIGN_CENTRE);
@ -393,7 +393,7 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event)
_accountsGrid->SetCellRenderer(row, ACCOUNT_DEFAULT, new wxGridCellBoolRenderer ());
_accountsGrid->SetCellEditor(row, ACCOUNT_DEFAULT, new wxGridCellFastBoolEditor ());
_accountsGrid->SetCellRenderer(row, ACCOUNT_DELETE, new wxGridCellBoolRenderer ());
_accountsGrid->SetCellEditor(row, ACCOUNT_DELETE, new wxGridCellFastBoolEditor ());
_accountsGrid->SetCellEditor(row, ACCOUNT_DELETE, new wxGridCellBoolEditor ());
_accountsGrid->SetCellAlignment(row, ACCOUNT_SHARED, wxALIGN_CENTRE, wxALIGN_CENTRE);
_accountsGrid->SetCellAlignment(row, ACCOUNT_DEFAULT, wxALIGN_CENTRE, wxALIGN_CENTRE);
_accountsGrid->SetCellAlignment(row, ACCOUNT_DELETE, wxALIGN_CENTRE, wxALIGN_CENTRE);
@ -502,7 +502,7 @@ void PreferencesPanel::OnCategoryModified(wxGridEvent& event)
_categoriesGrid->SetReadOnly(row, CATEGORY_FONT, false);
_categoriesGrid->SetReadOnly(row, CATEGORY_DELETE, false);
_categoriesGrid->SetCellRenderer(row, CATEGORY_DELETE, new wxGridCellBoolRenderer ());
_categoriesGrid->SetCellEditor(row, CATEGORY_DELETE, new wxGridCellFastBoolEditor ());
_categoriesGrid->SetCellEditor(row, CATEGORY_DELETE, new wxGridCellBoolEditor ());
_categoriesGrid->SetCellAlignment(row, CATEGORY_COLOR, wxALIGN_CENTRE, wxALIGN_CENTRE);
_categoriesGrid->SetCellAlignment(row, CATEGORY_FONT, wxALIGN_CENTRE, wxALIGN_CENTRE);

View File

@ -34,6 +34,11 @@ END_EVENT_TABLE()
_grid->SetCellBackgroundColour(row, i, color); \
}
#define UNESCAPE_CHARS(s) { \
s.Replace(wxT("\\\""), wxT("\""), true); \
s.Replace(wxT("\\\'"), wxT("\'"), true); \
}
SearchPanel::SearchPanel(KissCount* kiss, wxUI *parent) : wxScrolledWindow(&(*parent)), _kiss(kiss), _wxUI(parent), _operations(NULL)
{
DEFAULT_FONT(font);

View File

@ -24,6 +24,11 @@
SetCellBackgroundColour(row, i, color); \
}
#define UNESCAPE_CHARS(s) { \
s.Replace(wxT("\\\""), wxT("\""), true); \
s.Replace(wxT("\\\'"), wxT("\'"), true); \
}
BEGIN_EVENT_TABLE(GridAccount, wxGrid)
EVT_GRID_CELL_LEFT_CLICK(GridAccount::OnCellLeftClick )
END_EVENT_TABLE()
@ -111,6 +116,7 @@ void GridAccount::InsertOperation(User* user, Operation* op, int line, bool fix,
int r, g, b;
wxColour color;
wxDateTime curDate;
wxString description;
curDate.SetToCurrent();
@ -134,7 +140,9 @@ void GridAccount::InsertOperation(User* user, Operation* op, int line, bool fix,
if (op)
{
SetCellEditor(line, DATE, new CalendarEditor(op->day, op->month, op->year));
SetCellValue(line, DESCRIPTION, op->description);
description = op->description;
UNESCAPE_CHARS(description);
SetCellValue(line, DESCRIPTION, description);
SetCellValue(line, DATE, wxString::Format(wxT("%02d/%02d/%d"), op->day+1, op->month+1, op->year));
if (op->amount < 0)
SetCellValue(line, DEBIT, wxString::Format(wxT("%.2lf"), -op->amount));
@ -144,7 +152,7 @@ void GridAccount::InsertOperation(User* user, Operation* op, int line, bool fix,
if (!fix)
SetCellValue(line, CATEGORY, user->GetCategoryName(op->category));
SetCellRenderer(line, DELETE, new wxGridCellBoolRenderer ());
SetCellEditor(line, DELETE, new wxGridCellFastBoolEditor ());
SetCellEditor(line, DELETE, new wxGridCellBoolEditor ());
SetCellRenderer(line, CHECKED, new wxGridCellBoolRenderer ());
SetCellEditor(line, CHECKED, new wxGridCellFastBoolEditor ());

View File

@ -12,7 +12,7 @@ public:
void BeginEdit (int row, int col, wxGrid* grid)
{
wxGridCellBoolEditor::BeginEdit(row, col, grid);
wxFocusEvent event (wxEVT_KILL_FOCUS);
if (m_control)
{