-rw-r--r-- | korganizer/koprefs.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index ddd9cf8..32cc291 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -129,193 +129,197 @@ KOPrefs::KOPrefs() : | |||
129 | addItemString("Archive File",&mArchiveFile); | 129 | addItemString("Archive File",&mArchiveFile); |
130 | addItemString("Html Export File",&mHtmlExportFile, | 130 | addItemString("Html Export File",&mHtmlExportFile, |
131 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); | 131 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); |
132 | addItemBool("Html With Save",&mHtmlWithSave,false); | 132 | addItemBool("Html With Save",&mHtmlWithSave,false); |
133 | 133 | ||
134 | KPrefs::setCurrentGroup("Personal Settings"); | 134 | KPrefs::setCurrentGroup("Personal Settings"); |
135 | 135 | ||
136 | addItemInt("Mail Client",&mMailClient,MailClientKMail); | 136 | addItemInt("Mail Client",&mMailClient,MailClientKMail); |
137 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); | 137 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); |
138 | addItemBool("Bcc",&mBcc,false); | 138 | addItemBool("Bcc",&mBcc,false); |
139 | 139 | ||
140 | KPrefs::setCurrentGroup("Time & Date"); | 140 | KPrefs::setCurrentGroup("Time & Date"); |
141 | 141 | ||
142 | 142 | ||
143 | addItemInt("Default Start Time",&mStartTime,10); | 143 | addItemInt("Default Start Time",&mStartTime,10); |
144 | addItemInt("Default Duration",&mDefaultDuration,2); | 144 | addItemInt("Default Duration",&mDefaultDuration,2); |
145 | addItemInt("Default Alarm Time",&mAlarmTime,3); | 145 | addItemInt("Default Alarm Time",&mAlarmTime,3); |
146 | KPrefs::setCurrentGroup("AlarmSettings"); | 146 | KPrefs::setCurrentGroup("AlarmSettings"); |
147 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); | 147 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); |
148 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); | 148 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); |
149 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); | 149 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); |
150 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); | 150 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); |
151 | 151 | ||
152 | 152 | ||
153 | KPrefs::setCurrentGroup("Calendar"); | 153 | KPrefs::setCurrentGroup("Calendar"); |
154 | 154 | ||
155 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); | 155 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); |
156 | 156 | ||
157 | KPrefs::setCurrentGroup("Fonts"); | 157 | KPrefs::setCurrentGroup("Fonts"); |
158 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); | 158 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); |
159 | addItemFont("TimeBar Font",&mTimeBarFont); | 159 | addItemFont("TimeBar Font",&mTimeBarFont); |
160 | addItemFont("MonthView Font",&mMonthViewFont); | 160 | addItemFont("MonthView Font",&mMonthViewFont); |
161 | addItemFont("AgendaView Font",&mAgendaViewFont); | 161 | addItemFont("AgendaView Font",&mAgendaViewFont); |
162 | addItemFont("MarcusBains Font",&mMarcusBainsFont); | 162 | addItemFont("MarcusBains Font",&mMarcusBainsFont); |
163 | addItemFont("TimeLabels Font",&mTimeLabelsFont); | 163 | addItemFont("TimeLabels Font",&mTimeLabelsFont); |
164 | addItemFont("TodoView Font",&mTodoViewFont); | 164 | addItemFont("TodoView Font",&mTodoViewFont); |
165 | addItemFont("ListView Font",&mListViewFont); | 165 | addItemFont("ListView Font",&mListViewFont); |
166 | addItemFont("DateNavigator Font",&mDateNavigatorFont); | 166 | addItemFont("DateNavigator Font",&mDateNavigatorFont); |
167 | addItemFont("EditBox Font",&mEditBoxFont); | 167 | addItemFont("EditBox Font",&mEditBoxFont); |
168 | addItemFont("JournalView Font",&mJornalViewFont); | 168 | addItemFont("JournalView Font",&mJornalViewFont); |
169 | addItemFont("WhatsNextView Font",&mWhatsNextFont); | 169 | addItemFont("WhatsNextView Font",&mWhatsNextFont); |
170 | addItemFont("EventView Font",&mEventViewFont); | 170 | addItemFont("EventView Font",&mEventViewFont); |
171 | 171 | ||
172 | KPrefs::setCurrentGroup("RemoteSyncing"); | 172 | KPrefs::setCurrentGroup("RemoteSyncing"); |
173 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); | 173 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); |
174 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); | 174 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); |
175 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); | 175 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); |
176 | addItemInt("LastSyncTime",&mLastSyncTime,0); | 176 | addItemInt("LastSyncTime",&mLastSyncTime,0); |
177 | 177 | ||
178 | #ifdef _WIN32_ | 178 | #ifdef _WIN32_ |
179 | QString hdp= locateLocal("data","korganizer")+"\\\\"; | 179 | QString hdp= locateLocal("data","korganizer")+"\\\\"; |
180 | #else | 180 | #else |
181 | QString hdp= locateLocal("data","korganizer")+"/"; | 181 | QString hdp= locateLocal("data","korganizer")+"/"; |
182 | #endif | 182 | #endif |
183 | 183 | ||
184 | KPrefs::setCurrentGroup("LoadSaveFileNames"); | 184 | KPrefs::setCurrentGroup("LoadSaveFileNames"); |
185 | 185 | ||
186 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); | 186 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); |
187 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); | 187 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); |
188 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); | 188 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); |
189 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); | 189 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); |
190 | 190 | ||
191 | 191 | ||
192 | KPrefs::setCurrentGroup("Locale"); | 192 | KPrefs::setCurrentGroup("Locale"); |
193 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 193 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
194 | 194 | ||
195 | 195 | ||
196 | KPrefs::setCurrentGroup("Colors"); | 196 | KPrefs::setCurrentGroup("Colors"); |
197 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); | 197 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); |
198 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); | 198 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); |
199 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); | 199 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); |
200 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); | 200 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); |
201 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); | 201 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); |
202 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); | 202 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); |
203 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); | 203 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); |
204 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); | 204 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); |
205 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); | 205 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); |
206 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); | 206 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); |
207 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); | 207 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); |
208 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); | 208 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); |
209 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); | 209 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); |
210 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); | 210 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); |
211 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); | 211 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); |
212 | addItemBool("UseAppColors",&mUseAppColors,false); | 212 | addItemBool("UseAppColors",&mUseAppColors,false); |
213 | 213 | ||
214 | 214 | ||
215 | 215 | ||
216 | KPrefs::setCurrentGroup("Views"); | 216 | KPrefs::setCurrentGroup("Views"); |
217 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); | 217 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); |
218 | addItemInt("Hour Size",&mHourSize,8); | 218 | addItemInt("Hour Size",&mHourSize,8); |
219 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); | 219 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); |
220 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); | 220 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); |
221 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); | 221 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); |
222 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); | 222 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); |
223 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); | 223 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); |
224 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); | 224 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); |
225 | #ifdef DESKTOP_VERION | ||
226 | addItemBool("Enable ToolTips",&mEnableToolTips,true); | ||
227 | #else | ||
225 | addItemBool("Enable ToolTips",&mEnableToolTips,false); | 228 | addItemBool("Enable ToolTips",&mEnableToolTips,false); |
229 | #endif | ||
226 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); | 230 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); |
227 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); | 231 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); |
228 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); | 232 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); |
229 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); | 233 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); |
230 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); | 234 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); |
231 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); | 235 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); |
232 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); | 236 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); |
233 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); | 237 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); |
234 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); | 238 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); |
235 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; | 239 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; |
236 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); | 240 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); |
237 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); | 241 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); |
238 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); | 242 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); |
239 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); | 243 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); |
240 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); | 244 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); |
241 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); | 245 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); |
242 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false); | 246 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false); |
243 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); | 247 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); |
244 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); | 248 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); |
245 | #ifdef DESKTOP_VERSION | 249 | #ifdef DESKTOP_VERSION |
246 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); | 250 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); |
247 | #else | 251 | #else |
248 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); | 252 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); |
249 | #endif | 253 | #endif |
250 | addItemInt("Day Begins",&mDayBegins,7); | 254 | addItemInt("Day Begins",&mDayBegins,7); |
251 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); | 255 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); |
252 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); | 256 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); |
253 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); | 257 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); |
254 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); | 258 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); |
255 | 259 | ||
256 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); | 260 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); |
257 | addItemBool("Full View Month",&mFullViewMonth,true); | 261 | addItemBool("Full View Month",&mFullViewMonth,true); |
258 | addItemBool("Full View Todo",&mFullViewTodo,true); | 262 | addItemBool("Full View Todo",&mFullViewTodo,true); |
259 | addItemBool("Quick Todo",&mEnableQuickTodo,false); | 263 | addItemBool("Quick Todo",&mEnableQuickTodo,false); |
260 | 264 | ||
261 | addItemInt("Next X Days",&mNextXDays,3); | 265 | addItemInt("Next X Days",&mNextXDays,3); |
262 | 266 | ||
263 | KPrefs::setCurrentGroup("Printer"); | 267 | KPrefs::setCurrentGroup("Printer"); |
264 | 268 | ||
265 | KPrefs::setCurrentGroup("Layout"); | 269 | KPrefs::setCurrentGroup("Layout"); |
266 | 270 | ||
267 | addItemBool("CompactDialogs",&mCompactDialogs,false); | 271 | addItemBool("CompactDialogs",&mCompactDialogs,false); |
268 | addItemBool("VerticalScreen",&mVerticalScreen,true); | 272 | addItemBool("VerticalScreen",&mVerticalScreen,true); |
269 | 273 | ||
270 | KPrefs::setCurrentGroup("KOrganizer Plugins"); | 274 | KPrefs::setCurrentGroup("KOrganizer Plugins"); |
271 | 275 | ||
272 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); | 276 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); |
273 | 277 | ||
274 | KPrefs::setCurrentGroup("Group Scheduling"); | 278 | KPrefs::setCurrentGroup("Group Scheduling"); |
275 | 279 | ||
276 | addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); | 280 | addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); |
277 | addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); | 281 | addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); |
278 | addItemStringList("AdditionalMails",&mAdditionalMails,""); | 282 | addItemStringList("AdditionalMails",&mAdditionalMails,""); |
279 | addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); | 283 | addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); |
280 | addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); | 284 | addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); |
281 | addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); | 285 | addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); |
282 | addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); | 286 | addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); |
283 | addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); | 287 | addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); |
284 | 288 | ||
285 | KPrefs::setCurrentGroup( "Editors" ); | 289 | KPrefs::setCurrentGroup( "Editors" ); |
286 | 290 | ||
287 | addItemStringList( "EventTemplates", &mEventTemplates ); | 291 | addItemStringList( "EventTemplates", &mEventTemplates ); |
288 | addItemStringList( "TodoTemplates", &mTodoTemplates ); | 292 | addItemStringList( "TodoTemplates", &mTodoTemplates ); |
289 | 293 | ||
290 | addItemInt("DestinationPolicy",&mDestination,standardDestination); | 294 | addItemInt("DestinationPolicy",&mDestination,standardDestination); |
291 | 295 | ||
292 | 296 | ||
293 | 297 | ||
294 | } | 298 | } |
295 | 299 | ||
296 | 300 | ||
297 | KOPrefs::~KOPrefs() | 301 | KOPrefs::~KOPrefs() |
298 | { | 302 | { |
299 | if (mInstance == this) | 303 | if (mInstance == this) |
300 | mInstance = insd.setObject(0); | 304 | mInstance = insd.setObject(0); |
301 | 305 | ||
302 | //qDebug("KOPrefs::~KOPrefs() "); | 306 | //qDebug("KOPrefs::~KOPrefs() "); |
303 | } | 307 | } |
304 | 308 | ||
305 | 309 | ||
306 | KOPrefs *KOPrefs::instance() | 310 | KOPrefs *KOPrefs::instance() |
307 | { | 311 | { |
308 | if (!mInstance) { | 312 | if (!mInstance) { |
309 | mInstance = insd.setObject(new KOPrefs()); | 313 | mInstance = insd.setObject(new KOPrefs()); |
310 | mInstance->readConfig(); | 314 | mInstance->readConfig(); |
311 | } | 315 | } |
312 | 316 | ||
313 | return mInstance; | 317 | return mInstance; |
314 | } | 318 | } |
315 | 319 | ||
316 | void KOPrefs::usrSetDefaults() | 320 | void KOPrefs::usrSetDefaults() |
317 | { | 321 | { |
318 | 322 | ||
319 | } | 323 | } |
320 | 324 | ||
321 | void KOPrefs::fillMailDefaults() | 325 | void KOPrefs::fillMailDefaults() |