From 2e756a3677b9d4ef426f06beab7ba595c9878f4a Mon Sep 17 00:00:00 2001 From: allenforsythe Date: Thu, 15 May 2003 10:54:55 +0000 Subject: Added limit transaction combobox to transaction prefs --- (limited to 'noncore/apps/qashmoney/preferences.cpp') diff --git a/noncore/apps/qashmoney/preferences.cpp b/noncore/apps/qashmoney/preferences.cpp index 8783a47..819d5cf 100755 --- a/noncore/apps/qashmoney/preferences.cpp +++ b/noncore/apps/qashmoney/preferences.cpp @@ -22,7 +22,7 @@ void Preferences::addPreferences () char **results; sqlite_get_table ( db, "select count() from preferences;", &results, 0, 0, 0 ); - if ( atoi ( results [ 1 ] ) != 6 ) + if ( atoi ( results [ 1 ] ) != 7 ) { // dateformat preference 1 = yyyymmdd 2 = yymmdd 3 = mmddyyyy 4 = mmddyy // 5 = yyyyddmm 6 = yyddmm 7 = ddmmyyyy 8 = ddmmyy @@ -59,6 +59,12 @@ void Preferences::addPreferences () sqlite_get_table ( db, "select preference from preferences where id = 6;", &results, &rows, &columns, 0 ); if ( rows == 0 ) sqlite_exec ( db, "insert into preferences values ( 0, 'excludetransfersfromlimit', 0, 0, 0, NULL );", 0, 0, 0 ); + + // 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 + rows = 0; + sqlite_get_table ( db, "select preference from preferences where id = 7;", &results, &rows, &columns, 0 ); + if ( rows == 0 ) + sqlite_exec ( db, "insert into preferences values ( 0, 'limittransactions', 0, 0, 0, NULL );", 0, 0, 0 ); } } -- cgit v0.9.0.2