author | allenforsythe <allenforsythe> | 2003-05-16 20:08:38 (UTC) |
---|---|---|
committer | allenforsythe <allenforsythe> | 2003-05-16 20:08:38 (UTC) |
commit | e6ff2dbd2d128c3cf873e23f4df8006759b47079 (patch) (unidiff) | |
tree | bb3c996b76c8937d871f642f0e32032848d32396 /noncore/apps/qashmoney/preferences.cpp | |
parent | 87051a7ba4834aed152bc09aad7f4935c9729ccb (diff) | |
download | opie-e6ff2dbd2d128c3cf873e23f4df8006759b47079.zip opie-e6ff2dbd2d128c3cf873e23f4df8006759b47079.tar.gz opie-e6ff2dbd2d128c3cf873e23f4df8006759b47079.tar.bz2 |
Working on time frame for displaying cleared transactions. Not yet working.
Diffstat (limited to 'noncore/apps/qashmoney/preferences.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/preferences.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/qashmoney/preferences.cpp b/noncore/apps/qashmoney/preferences.cpp index 819d5cf..9bf64dd 100755 --- a/noncore/apps/qashmoney/preferences.cpp +++ b/noncore/apps/qashmoney/preferences.cpp | |||
@@ -39,49 +39,49 @@ void Preferences::addPreferences () | |||
39 | // showclearedtransactions preference 0 = no 1 = yes | 39 | // showclearedtransactions preference 0 = no 1 = yes |
40 | rows = 0; | 40 | rows = 0; |
41 | sqlite_get_table ( db, "select preference from preferences where id = 3;", &results, &rows, &columns, 0 ); | 41 | sqlite_get_table ( db, "select preference from preferences where id = 3;", &results, &rows, &columns, 0 ); |
42 | if ( rows == 0 ) | 42 | if ( rows == 0 ) |
43 | sqlite_exec ( db, "insert into preferences values ( 0, 'showclearedtransactions', 0, 0, 0, NULL );", 0, 0, 0 ); | 43 | sqlite_exec ( db, "insert into preferences values ( 0, 'showclearedtransactions', 0, 0, 0, NULL );", 0, 0, 0 ); |
44 | 44 | ||
45 | // enable currency support preference 0 = no 1 = yes | 45 | // enable currency support preference 0 = no 1 = yes |
46 | rows = 0; | 46 | rows = 0; |
47 | sqlite_get_table ( db, "select preference from preferences where id = 4;", &results, &rows, &columns, 0 ); | 47 | sqlite_get_table ( db, "select preference from preferences where id = 4;", &results, &rows, &columns, 0 ); |
48 | if ( rows == 0 ) | 48 | if ( rows == 0 ) |
49 | sqlite_exec ( db, "insert into preferences values ( 0, 'enablecurrencysupport', 0, 0, 0, NULL );", 0, 0, 0 ); | 49 | sqlite_exec ( db, "insert into preferences values ( 0, 'enablecurrencysupport', 0, 0, 0, NULL );", 0, 0, 0 ); |
50 | 50 | ||
51 | // one touch account viewing preference 0 = no 1 = yes | 51 | // one touch account viewing preference 0 = no 1 = yes |
52 | rows = 0; | 52 | rows = 0; |
53 | sqlite_get_table ( db, "select preference from preferences where id = 5;", &results, &rows, &columns, 0 ); | 53 | sqlite_get_table ( db, "select preference from preferences where id = 5;", &results, &rows, &columns, 0 ); |
54 | if ( rows == 0 ) | 54 | if ( rows == 0 ) |
55 | sqlite_exec ( db, "insert into preferences values ( 0, 'onetouchviewing', 0, 0, 0, NULL );", 0, 0, 0 ); | 55 | sqlite_exec ( db, "insert into preferences values ( 0, 'onetouchviewing', 0, 0, 0, NULL );", 0, 0, 0 ); |
56 | 56 | ||
57 | // exclude transfers from limit view 0 = no 1 = yes | 57 | // exclude transfers from limit view 0 = no 1 = yes |
58 | rows = 0; | 58 | rows = 0; |
59 | sqlite_get_table ( db, "select preference from preferences where id = 6;", &results, &rows, &columns, 0 ); | 59 | sqlite_get_table ( db, "select preference from preferences where id = 6;", &results, &rows, &columns, 0 ); |
60 | if ( rows == 0 ) | 60 | if ( rows == 0 ) |
61 | sqlite_exec ( db, "insert into preferences values ( 0, 'excludetransfersfromlimit', 0, 0, 0, NULL );", 0, 0, 0 ); | 61 | sqlite_exec ( db, "insert into preferences values ( 0, 'excludetransfersfromlimit', 0, 0, 0, NULL );", 0, 0, 0 ); |
62 | 62 | ||
63 | // limit number of transactions to 0 = 14 days 1 = 30 days, 2 = 60 days, 3 = 90 days, 4 = 180 days, 5 = 365 days, 6 = all | 63 | // limit number of transactions to 0 = 14 days 1 = 30 days, 2 = 90 days, 3 = 180 days, 4 = 365 days 5 = all |
64 | rows = 0; | 64 | rows = 0; |
65 | sqlite_get_table ( db, "select preference from preferences where id = 7;", &results, &rows, &columns, 0 ); | 65 | sqlite_get_table ( db, "select preference from preferences where id = 7;", &results, &rows, &columns, 0 ); |
66 | if ( rows == 0 ) | 66 | if ( rows == 0 ) |
67 | sqlite_exec ( db, "insert into preferences values ( 0, 'limittransactions', 0, 0, 0, NULL );", 0, 0, 0 ); | 67 | sqlite_exec ( db, "insert into preferences values ( 0, 'limittransactions', 0, 0, 0, NULL );", 0, 0, 0 ); |
68 | } | 68 | } |
69 | } | 69 | } |
70 | 70 | ||
71 | void Preferences::initializeColumnPreferences () | 71 | void Preferences::initializeColumnPreferences () |
72 | { | 72 | { |
73 | int rows = 0; | 73 | int rows = 0; |
74 | int columns = 0; | 74 | int columns = 0; |
75 | char **results; | 75 | char **results; |
76 | 76 | ||
77 | // initialize accountname column width | 77 | // initialize accountname column width |
78 | sqlite_get_table ( db, "select width from columns where id = 1;", &results, &rows, &columns, 0 ); | 78 | sqlite_get_table ( db, "select width from columns where id = 1;", &results, &rows, &columns, 0 ); |
79 | if ( rows == 0 ) | 79 | if ( rows == 0 ) |
80 | sqlite_exec ( db, "insert into columns values ( 'accountname', 90, 0, 0, 0, NULL );", 0, 0, 0 ); | 80 | sqlite_exec ( db, "insert into columns values ( 'accountname', 90, 0, 0, 0, NULL );", 0, 0, 0 ); |
81 | 81 | ||
82 | // initialize accountbalance column width | 82 | // initialize accountbalance column width |
83 | sqlite_get_table ( db, "select width from columns where id = 2;", &results, &rows, &columns, 0 ); | 83 | sqlite_get_table ( db, "select width from columns where id = 2;", &results, &rows, &columns, 0 ); |
84 | if ( rows == 0 ) | 84 | if ( rows == 0 ) |
85 | sqlite_exec ( db, "insert into columns values ( 'accountbalance', 90, 0, 0, 0, NULL );", 0, 0, 0 ); | 85 | sqlite_exec ( db, "insert into columns values ( 'accountbalance', 90, 0, 0, 0, NULL );", 0, 0, 0 ); |
86 | 86 | ||
87 | // initialize transactiondate column width | 87 | // initialize transactiondate column width |