summaryrefslogtreecommitdiffabout
path: root/libkdepim/kpimprefs.cpp
Unidiff
Diffstat (limited to 'libkdepim/kpimprefs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kpimprefs.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libkdepim/kpimprefs.cpp b/libkdepim/kpimprefs.cpp
index d68ccb6..714d1b7 100644
--- a/libkdepim/kpimprefs.cpp
+++ b/libkdepim/kpimprefs.cpp
@@ -5,78 +5,81 @@
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24/* 24/*
25Enhanced Version of the file for platform independent KDE tools. 25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk 26Copyright (c) 2004 Ulf Schenk
27 27
28$Id$ 28$Id$
29*/ 29*/
30 30
31#include <kglobal.h> 31#include <kglobal.h>
32#include <kconfig.h> 32#include <kconfig.h>
33#include <klocale.h> 33#include <klocale.h>
34#include <kdebug.h> 34#include <kdebug.h>
35 35
36#include "kpimprefs.h" 36#include "kpimprefs.h"
37 37
38KPimPrefs::KPimPrefs( const QString &name ) : 38KPimPrefs::KPimPrefs( const QString &name ) :
39 KPrefs( name ) 39 KPrefs( name )
40{ 40{
41#ifdef _WIN32_ 41#ifdef _WIN32_
42 QString hdp= locateLocal("data","korganizer")+"\\\\"; 42 QString hdp= locateLocal("data","korganizer")+"\\\\";
43#else 43#else
44 QString hdp= locateLocal("data","korganizer")+"/"; 44 QString hdp= locateLocal("data","korganizer")+"/";
45#endif 45#endif
46 setCurrentGroup("SyncOptions"); 46 setCurrentGroup("SyncOptions");
47 addItemString("PassiveSyncPort",&mPassiveSyncPort,"9197" ); 47 addItemString("PassiveSyncPort",&mPassiveSyncPort,"9197" );
48 addItemString("PassiveSyncPw",&mPassiveSyncPw,"abc" ); 48 addItemString("PassiveSyncPw",&mPassiveSyncPw,"abc" );
49 addItemString("LastSyncedLocalFile", &mLastSyncedLocalFile ,hdp +"lastsync.ics" ); 49 addItemString("LastSyncedLocalFile", &mLastSyncedLocalFile ,hdp +"lastsync.ics" );
50 addItemBool("PassiveSyncWithDesktop",&mPassiveSyncWithDesktop,false ); 50 addItemBool("PassiveSyncWithDesktop",&mPassiveSyncWithDesktop,false );
51 addItemBool("PassiveSyncAutoStart",&mPassiveSyncAutoStart,false ); 51 addItemBool("PassiveSyncAutoStart",&mPassiveSyncAutoStart,false );
52 addItemInt("RingSyncAlgoPrefs",&mRingSyncAlgoPrefs,3); 52 addItemInt("RingSyncAlgoPrefs",&mRingSyncAlgoPrefs,3);
53
54 setCurrentGroup("BackupDate");
55 addItemInt("LastBackupDate",&mLastBackupDate,0);
53} 56}
54 57
55KPimPrefs::~KPimPrefs() 58KPimPrefs::~KPimPrefs()
56{ 59{
57} 60}
58 61
59void KPimPrefs::usrSetDefaults() 62void KPimPrefs::usrSetDefaults()
60{ 63{
61 setCategoryDefaults(); 64 setCategoryDefaults();
62} 65}
63 66
64void KPimPrefs::usrReadConfig() 67void KPimPrefs::usrReadConfig()
65{ 68{
66 config()->setGroup("General"); 69 config()->setGroup("General");
67 mCustomCategories = config()->readListEntry("Custom Categories"); 70 mCustomCategories = config()->readListEntry("Custom Categories");
68 if (mCustomCategories.isEmpty()) setCategoryDefaults(); 71 if (mCustomCategories.isEmpty()) setCategoryDefaults();
69} 72}
70 73
71 74
72void KPimPrefs::usrWriteConfig() 75void KPimPrefs::usrWriteConfig()
73{ 76{
74 config()->setGroup("General"); 77 config()->setGroup("General");
75 config()->writeEntry("Custom Categories",mCustomCategories); 78 config()->writeEntry("Custom Categories",mCustomCategories);
76} 79}
77 80
78void KPimPrefs::setCategoryDefaults() 81void KPimPrefs::setCategoryDefaults()
79{ 82{
80 // empty implementation 83 // empty implementation
81} 84}
82 85