author | zautrix <zautrix> | 2005-06-13 10:51:47 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-13 10:51:47 (UTC) |
commit | 4f3ff02932b39bf16b9692c3cb69c101a28b4616 (patch) (unidiff) | |
tree | bae36a7e654c788a0994bb353f3997b495e2459c /libkcal/calendar.cpp | |
parent | 2be8214908c52298ba79c8058d340edca5a8b417 (diff) | |
download | kdepimpi-4f3ff02932b39bf16b9692c3cb69c101a28b4616.zip kdepimpi-4f3ff02932b39bf16b9692c3cb69c101a28b4616.tar.gz kdepimpi-4f3ff02932b39bf16b9692c3cb69c101a28b4616.tar.bz2 |
fixx
-rw-r--r-- | libkcal/calendar.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index f4350d9..5092d1a 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp | |||
@@ -40,32 +40,33 @@ Calendar::Calendar() | |||
40 | init(); | 40 | init(); |
41 | setTimeZoneId( " 00:00 Europe/London(UTC)" ); | 41 | setTimeZoneId( " 00:00 Europe/London(UTC)" ); |
42 | } | 42 | } |
43 | 43 | ||
44 | Calendar::Calendar( const QString &timeZoneId ) | 44 | Calendar::Calendar( const QString &timeZoneId ) |
45 | { | 45 | { |
46 | 46 | ||
47 | init(); | 47 | init(); |
48 | setTimeZoneId(timeZoneId); | 48 | setTimeZoneId(timeZoneId); |
49 | } | 49 | } |
50 | 50 | ||
51 | void Calendar::init() | 51 | void Calendar::init() |
52 | { | 52 | { |
53 | mObserver = 0; | 53 | mObserver = 0; |
54 | mNewObserver = false; | 54 | mNewObserver = false; |
55 | mUndoIncidence = 0; | 55 | mUndoIncidence = 0; |
56 | mDeleteIncidencesOnClose = true; | ||
56 | mModified = false; | 57 | mModified = false; |
57 | mDefaultCalendar = 1; | 58 | mDefaultCalendar = 1; |
58 | // Setup default filter, which does nothing | 59 | // Setup default filter, which does nothing |
59 | mDefaultFilter = new CalFilter; | 60 | mDefaultFilter = new CalFilter; |
60 | mFilter = mDefaultFilter; | 61 | mFilter = mDefaultFilter; |
61 | mFilter->setEnabled(false); | 62 | mFilter->setEnabled(false); |
62 | 63 | ||
63 | // initialize random numbers. This is a hack, and not | 64 | // initialize random numbers. This is a hack, and not |
64 | // even that good of one at that. | 65 | // even that good of one at that. |
65 | // srandom(time(0)); | 66 | // srandom(time(0)); |
66 | 67 | ||
67 | // user information... | 68 | // user information... |
68 | setOwner(i18n("Unknown Name")); | 69 | setOwner(i18n("Unknown Name")); |
69 | setEmail(i18n("unknown@nowhere")); | 70 | setEmail(i18n("unknown@nowhere")); |
70 | 71 | ||
71 | #if 0 | 72 | #if 0 |
@@ -99,32 +100,36 @@ void Calendar::init() | |||
99 | KOPrefs::instance()->mTimeZone = tzStr; | 100 | KOPrefs::instance()->mTimeZone = tzStr; |
100 | KOPrefs::instance()->mDaylightSavings = now->tm_isdst; | 101 | KOPrefs::instance()->mDaylightSavings = now->tm_isdst; |
101 | } | 102 | } |
102 | 103 | ||
103 | setTimeZone(tzStr); | 104 | setTimeZone(tzStr); |
104 | #endif | 105 | #endif |
105 | 106 | ||
106 | // KOPrefs::instance()->writeConfig(); | 107 | // KOPrefs::instance()->writeConfig(); |
107 | } | 108 | } |
108 | 109 | ||
109 | Calendar::~Calendar() | 110 | Calendar::~Calendar() |
110 | { | 111 | { |
111 | delete mDefaultFilter; | 112 | delete mDefaultFilter; |
112 | if ( mUndoIncidence ) | 113 | if ( mUndoIncidence ) |
113 | delete mUndoIncidence; | 114 | delete mUndoIncidence; |
114 | } | 115 | } |
116 | void Calendar::setDontDeleteIncidencesOnClose () | ||
117 | { | ||
118 | mDeleteIncidencesOnClose = false; | ||
119 | } | ||
115 | void Calendar::setDefaultCalendar( int d ) | 120 | void Calendar::setDefaultCalendar( int d ) |
116 | { | 121 | { |
117 | mDefaultCalendar = d; | 122 | mDefaultCalendar = d; |
118 | } | 123 | } |
119 | int Calendar::defaultCalendar() | 124 | int Calendar::defaultCalendar() |
120 | { | 125 | { |
121 | return mDefaultCalendar; | 126 | return mDefaultCalendar; |
122 | } | 127 | } |
123 | const QString &Calendar::getOwner() const | 128 | const QString &Calendar::getOwner() const |
124 | { | 129 | { |
125 | return mOwner; | 130 | return mOwner; |
126 | } | 131 | } |
127 | 132 | ||
128 | bool Calendar::undoDeleteIncidence() | 133 | bool Calendar::undoDeleteIncidence() |
129 | { | 134 | { |
130 | if (!mUndoIncidence) | 135 | if (!mUndoIncidence) |