-rw-r--r-- | korganizer/koprefs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 9e7f18c..6560877 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -75,385 +75,385 @@ KOPrefs::KOPrefs() : | |||
75 | addItemBool("ShowIconDay6",&mShowIconDay6,true); | 75 | addItemBool("ShowIconDay6",&mShowIconDay6,true); |
76 | addItemBool("ShowIconDay7",&mShowIconDay7,true); | 76 | addItemBool("ShowIconDay7",&mShowIconDay7,true); |
77 | addItemBool("ShowIconMonth",&mShowIconMonth,true); | 77 | addItemBool("ShowIconMonth",&mShowIconMonth,true); |
78 | addItemBool("ShowIconTodoview",&mShowIconTodoview,true); | 78 | addItemBool("ShowIconTodoview",&mShowIconTodoview,true); |
79 | addItemBool("ShowIconBackFast",&mShowIconBackFast,true); | 79 | addItemBool("ShowIconBackFast",&mShowIconBackFast,true); |
80 | addItemBool("ShowIconBack",&mShowIconBack,true); | 80 | addItemBool("ShowIconBack",&mShowIconBack,true); |
81 | addItemBool("ShowIconToday",&mShowIconToday,true); | 81 | addItemBool("ShowIconToday",&mShowIconToday,true); |
82 | addItemBool("ShowIconForward",&mShowIconForward,true); | 82 | addItemBool("ShowIconForward",&mShowIconForward,true); |
83 | addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); | 83 | addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); |
84 | addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); | 84 | addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); |
85 | addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); | 85 | addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); |
86 | addItemBool("ShowIconNextDays",&mShowIconNextDays,true); | 86 | addItemBool("ShowIconNextDays",&mShowIconNextDays,true); |
87 | addItemBool("ShowIconNext",&mShowIconNext,true); | 87 | addItemBool("ShowIconNext",&mShowIconNext,true); |
88 | addItemBool("ShowIconJournal",&mShowIconJournal,true); | 88 | addItemBool("ShowIconJournal",&mShowIconJournal,true); |
89 | addItemBool("ShowIconStretch",&mShowIconStretch,true); | 89 | addItemBool("ShowIconStretch",&mShowIconStretch,true); |
90 | addItemBool("ShowIconFilter",&mShowIconFilter,false); | 90 | addItemBool("ShowIconFilter",&mShowIconFilter,false); |
91 | addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); | 91 | addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); |
92 | 92 | ||
93 | bool addIcons = false; | 93 | bool addIcons = false; |
94 | #ifdef DESKTOP_VERSION | 94 | #ifdef DESKTOP_VERSION |
95 | addIcons = true; | 95 | addIcons = true; |
96 | #endif | 96 | #endif |
97 | addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); | 97 | addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); |
98 | addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); | 98 | addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); |
99 | addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); | 99 | addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); |
100 | addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); | 100 | addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); |
101 | 101 | ||
102 | addItemInt("LastLoadedLanguage",&mOldLanguage,0); | 102 | addItemInt("LastLoadedLanguage",&mOldLanguage,0); |
103 | 103 | ||
104 | addItemBool("AskForQuit",&mAskForQuit,false); | 104 | addItemBool("AskForQuit",&mAskForQuit,false); |
105 | 105 | ||
106 | #ifndef DESKTOP_VERSION | 106 | #ifndef DESKTOP_VERSION |
107 | addItemBool("ShowFullMenu",&mShowFullMenu,false); | 107 | addItemBool("ShowFullMenu",&mShowFullMenu,false); |
108 | #else | 108 | #else |
109 | addItemBool("ShowFullMenu",&mShowFullMenu,true); | 109 | addItemBool("ShowFullMenu",&mShowFullMenu,true); |
110 | #endif | 110 | #endif |
111 | addItemBool("ToolBarHor",&mToolBarHor, true ); | 111 | addItemBool("ToolBarHor",&mToolBarHor, true ); |
112 | addItemBool("ToolBarUp",&mToolBarUp, false ); | 112 | addItemBool("ToolBarUp",&mToolBarUp, false ); |
113 | addItemBool("ToolBarHorV",&mToolBarHorV, true ); | 113 | addItemBool("ToolBarHorV",&mToolBarHorV, true ); |
114 | addItemBool("ToolBarUpV",&mToolBarUpV, false ); | 114 | addItemBool("ToolBarUpV",&mToolBarUpV, false ); |
115 | addItemBool("ToolBarHorN",&mToolBarHorN, true ); | 115 | addItemBool("ToolBarHorN",&mToolBarHorN, true ); |
116 | addItemBool("ToolBarUpN",&mToolBarUpN, false ); | 116 | addItemBool("ToolBarUpN",&mToolBarUpN, false ); |
117 | addItemBool("ToolBarHorF",&mToolBarHorF, true ); | 117 | addItemBool("ToolBarHorF",&mToolBarHorF, true ); |
118 | addItemBool("ToolBarUpF",&mToolBarUpF, false ); | 118 | addItemBool("ToolBarUpF",&mToolBarUpF, false ); |
119 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); | 119 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); |
120 | addItemInt("Whats Next Days",&mWhatsNextDays,3); | 120 | addItemInt("Whats Next Days",&mWhatsNextDays,3); |
121 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); | 121 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); |
122 | 122 | ||
123 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); | 123 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); |
124 | addItemBool("ShowCompletedTodoInAgenda",&mShowCompletedTodoInAgenda,true); | 124 | addItemBool("ShowCompletedTodoInAgenda",&mShowCompletedTodoInAgenda,true); |
125 | addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); | 125 | addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); |
126 | addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); | 126 | addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); |
127 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); | 127 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); |
128 | addItemInt("AllDay Size",&mAllDaySize,28); | 128 | addItemInt("AllDay Size",&mAllDaySize,28); |
129 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; | 129 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; |
130 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); | 130 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); |
131 | 131 | ||
132 | addItemStringList("LocationDefaults",&mLocationDefaults ); | 132 | addItemStringList("LocationDefaults",&mLocationDefaults ); |
133 | addItemStringList("EventSummary User",&mEventSummaryUser); | 133 | addItemStringList("EventSummary User",&mEventSummaryUser); |
134 | addItemStringList("TodoSummary User",&mTodoSummaryUser); | 134 | addItemStringList("TodoSummary User",&mTodoSummaryUser); |
135 | addItemStringList("JournalSummary User",&mJournalSummaryUser); | 135 | addItemStringList("JournalSummary User",&mJournalSummaryUser); |
136 | 136 | ||
137 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); | 137 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); |
138 | addItemBool("Enable Project View",&mEnableProjectView,false); | 138 | addItemBool("Enable Project View",&mEnableProjectView,false); |
139 | addItemBool("Auto Save",&mAutoSave,false); | 139 | addItemBool("Auto Save",&mAutoSave,false); |
140 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); | 140 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); |
141 | addItemBool("Confirm Deletes",&mConfirm,true); | 141 | addItemBool("Confirm Deletes",&mConfirm,true); |
142 | addItemString("Archive File",&mArchiveFile); | 142 | addItemString("Archive File",&mArchiveFile); |
143 | addItemString("Html Export File",&mHtmlExportFile, | 143 | addItemString("Html Export File",&mHtmlExportFile, |
144 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); | 144 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); |
145 | addItemBool("Html With Save",&mHtmlWithSave,false); | 145 | addItemBool("Html With Save",&mHtmlWithSave,false); |
146 | 146 | ||
147 | KPrefs::setCurrentGroup("Personal Settings"); | 147 | KPrefs::setCurrentGroup("Personal Settings"); |
148 | 148 | ||
149 | addItemInt("Mail Client",&mMailClient,MailClientKMail); | 149 | addItemInt("Mail Client",&mMailClient,MailClientKMail); |
150 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); | 150 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); |
151 | addItemBool("Bcc",&mBcc,false); | 151 | addItemBool("Bcc",&mBcc,false); |
152 | 152 | ||
153 | KPrefs::setCurrentGroup("Time & Date"); | 153 | KPrefs::setCurrentGroup("Time & Date"); |
154 | 154 | ||
155 | 155 | ||
156 | addItemInt("Default Start Time",&mStartTime,10); | 156 | addItemInt("Default Start Time",&mStartTime,10); |
157 | addItemInt("Default Duration",&mDefaultDuration,2); | 157 | addItemInt("Default Duration",&mDefaultDuration,2); |
158 | addItemInt("Default Alarm Time",&mAlarmTime,3); | 158 | addItemInt("Default Alarm Time",&mAlarmTime,3); |
159 | KPrefs::setCurrentGroup("AlarmSettings"); | 159 | KPrefs::setCurrentGroup("AlarmSettings"); |
160 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); | 160 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); |
161 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); | 161 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); |
162 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); | 162 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); |
163 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); | 163 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); |
164 | 164 | ||
165 | 165 | ||
166 | KPrefs::setCurrentGroup("Calendar"); | 166 | KPrefs::setCurrentGroup("Calendar"); |
167 | 167 | ||
168 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); | 168 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); |
169 | 169 | ||
170 | KPrefs::setCurrentGroup("Fonts"); | 170 | KPrefs::setCurrentGroup("Fonts"); |
171 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); | 171 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); |
172 | QFont fon = KGlobalSettings::generalFont(); | 172 | QFont fon = KGlobalSettings::generalFont(); |
173 | addItemFont("TimeBar Font",&mTimeBarFont,fon ); | 173 | addItemFont("TimeBar Font",&mTimeBarFont,fon ); |
174 | addItemFont("MonthView Font",&mMonthViewFont,fon); | 174 | addItemFont("MonthView Font",&mMonthViewFont,fon); |
175 | addItemFont("AgendaView Font",&mAgendaViewFont,fon); | 175 | addItemFont("AgendaView Font",&mAgendaViewFont,fon); |
176 | addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); | 176 | addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); |
177 | addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); | 177 | addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); |
178 | addItemFont("TodoView Font",&mTodoViewFont,fon); | 178 | addItemFont("TodoView Font",&mTodoViewFont,fon); |
179 | addItemFont("ListView Font",&mListViewFont,fon); | 179 | addItemFont("ListView Font",&mListViewFont,fon); |
180 | addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); | 180 | addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); |
181 | addItemFont("EditBox Font",&mEditBoxFont,fon); | 181 | addItemFont("EditBox Font",&mEditBoxFont,fon); |
182 | addItemFont("JournalView Font",&mJornalViewFont,fon); | 182 | addItemFont("JournalView Font",&mJornalViewFont,fon); |
183 | addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); | 183 | addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); |
184 | addItemFont("EventView Font",&mEventViewFont,fon); | 184 | addItemFont("EventView Font",&mEventViewFont,fon); |
185 | 185 | ||
186 | KPrefs::setCurrentGroup("RemoteSyncing"); | 186 | KPrefs::setCurrentGroup("RemoteSyncing"); |
187 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); | 187 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); |
188 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); | 188 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); |
189 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); | 189 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); |
190 | addItemInt("LastSyncTime",&mLastSyncTime,0); | 190 | addItemInt("LastSyncTime",&mLastSyncTime,0); |
191 | 191 | ||
192 | #ifdef _WIN32_ | 192 | #ifdef _WIN32_ |
193 | QString hdp= locateLocal("data","korganizer")+"\\\\"; | 193 | QString hdp= locateLocal("data","korganizer")+"\\\\"; |
194 | #else | 194 | #else |
195 | QString hdp= locateLocal("data","korganizer")+"/"; | 195 | QString hdp= locateLocal("data","korganizer")+"/"; |
196 | #endif | 196 | #endif |
197 | 197 | ||
198 | KPrefs::setCurrentGroup("LoadSaveFileNames"); | 198 | KPrefs::setCurrentGroup("LoadSaveFileNames"); |
199 | 199 | ||
200 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); | 200 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); |
201 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); | 201 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); |
202 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); | 202 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); |
203 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); | 203 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); |
204 | 204 | ||
205 | 205 | ||
206 | KPrefs::setCurrentGroup("Locale"); | 206 | KPrefs::setCurrentGroup("Locale"); |
207 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 207 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
208 | 208 | ||
209 | 209 | ||
210 | KPrefs::setCurrentGroup("Colors"); | 210 | KPrefs::setCurrentGroup("Colors"); |
211 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); | 211 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); |
212 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); | 212 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); |
213 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); | 213 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); |
214 | addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); | 214 | addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); |
215 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); | 215 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); |
216 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); | 216 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); |
217 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); | 217 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); |
218 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); | 218 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); |
219 | addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor); | 219 | addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor); |
220 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); | 220 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); |
221 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); | 221 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); |
222 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); | 222 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); |
223 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); | 223 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); |
224 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); | 224 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); |
225 | addItemBool("MonthViewWeek",&mMonthViewWeek,false); | 225 | addItemBool("MonthViewWeek",&mMonthViewWeek,false); |
226 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); | 226 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); |
227 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); | 227 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); |
228 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); | 228 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); |
229 | addItemBool("UseAppColors",&mUseAppColors,false); | 229 | addItemBool("UseAppColors",&mUseAppColors,false); |
230 | 230 | ||
231 | 231 | ||
232 | 232 | ||
233 | KPrefs::setCurrentGroup("Views"); | 233 | KPrefs::setCurrentGroup("Views"); |
234 | addItemBool("Block Popup Menu",&mBlockPopupMenu,false); | 234 | addItemBool("Block Popup Menu",&mBlockPopupMenu,false); |
235 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); | 235 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); |
236 | addItemInt("Hour Size",&mHourSize,8); | 236 | addItemInt("Hour Size",&mHourSize,8); |
237 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); | 237 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); |
238 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); | 238 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); |
239 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); | 239 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); |
240 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); | 240 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); |
241 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); | 241 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); |
242 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); | 242 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); |
243 | addItemBool("ShowTimesInMonthCell",&mMonthShowTimes,true); | 243 | addItemBool("ShowTimesInMonthCell",&mMonthShowTimes,true); |
244 | #ifdef DESKTOP_VERION | 244 | #ifdef DESKTOP_VERION |
245 | addItemBool("Enable ToolTips",&mEnableToolTips,true); | 245 | addItemBool("Enable ToolTips",&mEnableToolTips,true); |
246 | #else | 246 | #else |
247 | addItemBool("Enable ToolTips",&mEnableToolTips,false); | 247 | addItemBool("Enable ToolTips",&mEnableToolTips,false); |
248 | #endif | 248 | #endif |
249 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); | 249 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); |
250 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); | 250 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); |
251 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); | 251 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); |
252 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); | 252 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); |
253 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); | 253 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); |
254 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); | 254 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); |
255 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); | 255 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); |
256 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); | 256 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); |
257 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); | 257 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); |
258 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; | 258 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; |
259 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); | 259 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); |
260 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); | 260 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); |
261 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); | 261 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); |
262 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); | 262 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); |
263 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); | 263 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); |
264 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); | 264 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); |
265 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); | 265 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); |
266 | addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); | 266 | addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); |
267 | addItemBool("MonthViewWeekRowlayout",&mMonthViewWeekRowlayout,true); | 267 | addItemBool("MonthViewWeekRowlayout",&mMonthViewWeekRowlayout,false); |
268 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); | 268 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); |
269 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); | 269 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); |
270 | #ifdef DESKTOP_VERSION | 270 | #ifdef DESKTOP_VERSION |
271 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); | 271 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); |
272 | #else | 272 | #else |
273 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); | 273 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); |
274 | #endif | 274 | #endif |
275 | addItemInt("Day Begins",&mDayBegins,7); | 275 | addItemInt("Day Begins",&mDayBegins,7); |
276 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); | 276 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); |
277 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); | 277 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); |
278 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); | 278 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); |
279 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); | 279 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); |
280 | 280 | ||
281 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); | 281 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); |
282 | addItemBool("Full View Month",&mFullViewMonth,true); | 282 | addItemBool("Full View Month",&mFullViewMonth,true); |
283 | addItemBool("Full View Todo",&mFullViewTodo,true); | 283 | addItemBool("Full View Todo",&mFullViewTodo,true); |
284 | addItemBool("Quick Todo",&mEnableQuickTodo,false); | 284 | addItemBool("Quick Todo",&mEnableQuickTodo,false); |
285 | 285 | ||
286 | addItemInt("Next X Days",&mNextXDays,3); | 286 | addItemInt("Next X Days",&mNextXDays,3); |
287 | 287 | ||
288 | KPrefs::setCurrentGroup("Printer"); | 288 | KPrefs::setCurrentGroup("Printer"); |
289 | 289 | ||
290 | KPrefs::setCurrentGroup("Layout"); | 290 | KPrefs::setCurrentGroup("Layout"); |
291 | 291 | ||
292 | addItemBool("CompactDialogs",&mCompactDialogs,false); | 292 | addItemBool("CompactDialogs",&mCompactDialogs,false); |
293 | addItemBool("VerticalScreen",&mVerticalScreen,true); | 293 | addItemBool("VerticalScreen",&mVerticalScreen,true); |
294 | 294 | ||
295 | KPrefs::setCurrentGroup("KOrganizer Plugins"); | 295 | KPrefs::setCurrentGroup("KOrganizer Plugins"); |
296 | 296 | ||
297 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); | 297 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); |
298 | 298 | ||
299 | KPrefs::setCurrentGroup("Group Scheduling"); | 299 | KPrefs::setCurrentGroup("Group Scheduling"); |
300 | 300 | ||
301 | addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); | 301 | addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); |
302 | addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); | 302 | addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); |
303 | addItemStringList("AdditionalMails",&mAdditionalMails,""); | 303 | addItemStringList("AdditionalMails",&mAdditionalMails,""); |
304 | addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); | 304 | addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); |
305 | addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); | 305 | addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); |
306 | addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); | 306 | addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); |
307 | addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); | 307 | addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); |
308 | addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); | 308 | addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); |
309 | 309 | ||
310 | KPrefs::setCurrentGroup( "Editors" ); | 310 | KPrefs::setCurrentGroup( "Editors" ); |
311 | 311 | ||
312 | addItemStringList( "EventTemplates", &mEventTemplates ); | 312 | addItemStringList( "EventTemplates", &mEventTemplates ); |
313 | addItemStringList( "TodoTemplates", &mTodoTemplates ); | 313 | addItemStringList( "TodoTemplates", &mTodoTemplates ); |
314 | 314 | ||
315 | addItemInt("DestinationPolicy",&mDestination,standardDestination); | 315 | addItemInt("DestinationPolicy",&mDestination,standardDestination); |
316 | 316 | ||
317 | KPrefs::setCurrentGroup( "ViewOptions" ); | 317 | KPrefs::setCurrentGroup( "ViewOptions" ); |
318 | addItemBool("EVshowDetails",&mEVshowDetails,true); | 318 | addItemBool("EVshowDetails",&mEVshowDetails,true); |
319 | addItemBool("EVshowCreated",&mEVshowCreated,true); | 319 | addItemBool("EVshowCreated",&mEVshowCreated,true); |
320 | addItemBool("EVshowChanged",&mEVshowChanged,true); | 320 | addItemBool("EVshowChanged",&mEVshowChanged,true); |
321 | addItemBool("WTshowDetails",&mWTshowDetails,false); | 321 | addItemBool("WTshowDetails",&mWTshowDetails,false); |
322 | addItemBool("WTshowCreated",&mWTshowCreated,false); | 322 | addItemBool("WTshowCreated",&mWTshowCreated,false); |
323 | addItemBool("WTshowChanged",&mWTshowChanged,false); | 323 | addItemBool("WTshowChanged",&mWTshowChanged,false); |
324 | mCalendars.setAutoDelete( true ); | 324 | mCalendars.setAutoDelete( true ); |
325 | } | 325 | } |
326 | 326 | ||
327 | 327 | ||
328 | KOPrefs::~KOPrefs() | 328 | KOPrefs::~KOPrefs() |
329 | { | 329 | { |
330 | if (mInstance == this) | 330 | if (mInstance == this) |
331 | mInstance = insd.setObject(0); | 331 | mInstance = insd.setObject(0); |
332 | mCalendars.setAutoDelete( true ); | 332 | mCalendars.setAutoDelete( true ); |
333 | mCalendars.clear(); | 333 | mCalendars.clear(); |
334 | //qDebug("KOPrefs::~KOPrefs() "); | 334 | //qDebug("KOPrefs::~KOPrefs() "); |
335 | } | 335 | } |
336 | 336 | ||
337 | 337 | ||
338 | KOPrefs *KOPrefs::instance() | 338 | KOPrefs *KOPrefs::instance() |
339 | { | 339 | { |
340 | if (!mInstance) { | 340 | if (!mInstance) { |
341 | mInstance = insd.setObject(new KOPrefs()); | 341 | mInstance = insd.setObject(new KOPrefs()); |
342 | mInstance->readConfig(); | 342 | mInstance->readConfig(); |
343 | } | 343 | } |
344 | 344 | ||
345 | return mInstance; | 345 | return mInstance; |
346 | } | 346 | } |
347 | 347 | ||
348 | void KOPrefs::usrSetDefaults() | 348 | void KOPrefs::usrSetDefaults() |
349 | { | 349 | { |
350 | 350 | ||
351 | } | 351 | } |
352 | 352 | ||
353 | void KOPrefs::fillMailDefaults() | 353 | void KOPrefs::fillMailDefaults() |
354 | { | 354 | { |
355 | if (mName.isEmpty()) mName = i18n("Anonymous"); | 355 | if (mName.isEmpty()) mName = i18n("Anonymous"); |
356 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); | 356 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); |
357 | } | 357 | } |
358 | 358 | ||
359 | void KOPrefs::setTimeZoneIdDefault() | 359 | void KOPrefs::setTimeZoneIdDefault() |
360 | { | 360 | { |
361 | ; | 361 | ; |
362 | } | 362 | } |
363 | 363 | ||
364 | void KOPrefs::setAllDefaults() | 364 | void KOPrefs::setAllDefaults() |
365 | { | 365 | { |
366 | setCategoryDefaults(); | 366 | setCategoryDefaults(); |
367 | mEventSummaryUser = getDefaultList() ; | 367 | mEventSummaryUser = getDefaultList() ; |
368 | mTodoSummaryUser = getDefaultList() ; | 368 | mTodoSummaryUser = getDefaultList() ; |
369 | mJournalSummaryUser = getDefaultList() ; | 369 | mJournalSummaryUser = getDefaultList() ; |
370 | mLocationDefaults = getLocationDefaultList(); | 370 | mLocationDefaults = getLocationDefaultList(); |
371 | } | 371 | } |
372 | 372 | ||
373 | void KOPrefs::setCategoryDefaults() | 373 | void KOPrefs::setCategoryDefaults() |
374 | { | 374 | { |
375 | mCustomCategories.clear(); | 375 | mCustomCategories.clear(); |
376 | mCustomCategories = getDefaultList(); | 376 | mCustomCategories = getDefaultList(); |
377 | 377 | ||
378 | QStringList::Iterator it; | 378 | QStringList::Iterator it; |
379 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 379 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
380 | setCategoryColor(*it,mDefaultCategoryColor); | 380 | setCategoryColor(*it,mDefaultCategoryColor); |
381 | } | 381 | } |
382 | } | 382 | } |
383 | QStringList KOPrefs::getLocationDefaultList() | 383 | QStringList KOPrefs::getLocationDefaultList() |
384 | { | 384 | { |
385 | QStringList retval ; | 385 | QStringList retval ; |
386 | retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") | 386 | retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") |
387 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") | 387 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") |
388 | << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") | 388 | << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") |
389 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; | 389 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; |
390 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") | 390 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") |
391 | 391 | ||
392 | retval.sort(); | 392 | retval.sort(); |
393 | return retval; | 393 | return retval; |
394 | } | 394 | } |
395 | QStringList KOPrefs::getDefaultList() | 395 | QStringList KOPrefs::getDefaultList() |
396 | { | 396 | { |
397 | QStringList retval ; | 397 | QStringList retval ; |
398 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Customer") | 398 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Customer") |
399 | << i18n("Break") | 399 | << i18n("Break") |
400 | << i18n("Family") << i18n("Favorites") << i18n("Fishing") << i18n("Gifts") | 400 | << i18n("Family") << i18n("Favorites") << i18n("Fishing") << i18n("Gifts") |
401 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") | 401 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") |
402 | << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner") << i18n("Personal") | 402 | << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner") << i18n("Personal") |
403 | << i18n("PHB") << i18n("Phone Calls") << i18n("Shopping") | 403 | << i18n("PHB") << i18n("Phone Calls") << i18n("Shopping") |
404 | << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV") | 404 | << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV") |
405 | << i18n("Vacation") ; | 405 | << i18n("Vacation") ; |
406 | retval.sort(); | 406 | retval.sort(); |
407 | //qDebug("cat %s ", retval.join("-").latin1()); | 407 | //qDebug("cat %s ", retval.join("-").latin1()); |
408 | return retval; | 408 | return retval; |
409 | } | 409 | } |
410 | // << i18n("Business Travel") << i18n("Education") << i18n("Hiking") << i18n("Hunting") << i18n("Recurring") << i18n("Personal Travel") << i18n("Speach") << i18n("Festival") << i18n("Competition")<< i18n("Party")<< i18n("Projects")<< i18n("Kids") << i18n("Special Occasion")<< i18n("Breakfast")<< i18n("Dinner") << i18n("Lunch")<< i18n("University")<< i18n("School")<< i18n("Flight")<< i18n("Key Customer") << i18n("VIP") << i18n("SyncEvent") << i18n("Cinema") | 410 | // << i18n("Business Travel") << i18n("Education") << i18n("Hiking") << i18n("Hunting") << i18n("Recurring") << i18n("Personal Travel") << i18n("Speach") << i18n("Festival") << i18n("Competition")<< i18n("Party")<< i18n("Projects")<< i18n("Kids") << i18n("Special Occasion")<< i18n("Breakfast")<< i18n("Dinner") << i18n("Lunch")<< i18n("University")<< i18n("School")<< i18n("Flight")<< i18n("Key Customer") << i18n("VIP") << i18n("SyncEvent") << i18n("Cinema") |
411 | void KOPrefs::usrReadConfig() | 411 | void KOPrefs::usrReadConfig() |
412 | { | 412 | { |
413 | config()->setGroup("General"); | 413 | config()->setGroup("General"); |
414 | 414 | ||
415 | //qDebug("KOPrefs::usrReadConfig() "); | 415 | //qDebug("KOPrefs::usrReadConfig() "); |
416 | mCustomCategories = config()->readListEntry("Custom Categories"); | 416 | mCustomCategories = config()->readListEntry("Custom Categories"); |
417 | mOldLoadedLanguage = mOldLanguage ; | 417 | mOldLoadedLanguage = mOldLanguage ; |
418 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; | 418 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; |
419 | if (mLocationDefaults.isEmpty()) { | 419 | if (mLocationDefaults.isEmpty()) { |
420 | mLocationDefaults = getLocationDefaultList(); | 420 | mLocationDefaults = getLocationDefaultList(); |
421 | } | 421 | } |
422 | 422 | ||
423 | if (mEventSummaryUser.isEmpty()) { | 423 | if (mEventSummaryUser.isEmpty()) { |
424 | mEventSummaryUser = getDefaultList() ; | 424 | mEventSummaryUser = getDefaultList() ; |
425 | } | 425 | } |
426 | if (mTodoSummaryUser.isEmpty()) { | 426 | if (mTodoSummaryUser.isEmpty()) { |
427 | mTodoSummaryUser = getDefaultList() ; | 427 | mTodoSummaryUser = getDefaultList() ; |
428 | } | 428 | } |
429 | 429 | ||
430 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); | 430 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); |
431 | 431 | ||
432 | config()->setGroup("Personal Settings"); | 432 | config()->setGroup("Personal Settings"); |
433 | mName = config()->readEntry("user_name",""); | 433 | mName = config()->readEntry("user_name",""); |
434 | mEmail = config()->readEntry("user_email",""); | 434 | mEmail = config()->readEntry("user_email",""); |
435 | fillMailDefaults(); | 435 | fillMailDefaults(); |
436 | 436 | ||
437 | config()->setGroup("Category Colors"); | 437 | config()->setGroup("Category Colors"); |
438 | QStringList::Iterator it; | 438 | QStringList::Iterator it; |
439 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 439 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
440 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); | 440 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); |
441 | 441 | ||
442 | } | 442 | } |
443 | KConfig fc (locateLocal("config","kopicalendarrc")); | 443 | KConfig fc (locateLocal("config","kopicalendarrc")); |
444 | fc.setGroup("CC"); | 444 | fc.setGroup("CC"); |
445 | int numCals = fc.readNumEntry("NumberCalendars",0 ); | 445 | int numCals = fc.readNumEntry("NumberCalendars",0 ); |
446 | mNextAvailableCalendar = 1; | 446 | mNextAvailableCalendar = 1; |
447 | if ( numCals == 0 ) { | 447 | if ( numCals == 0 ) { |
448 | KopiCalendarFile *kkf = getNewCalendar(); | 448 | KopiCalendarFile *kkf = getNewCalendar(); |
449 | kkf->isStandard = true; | 449 | kkf->isStandard = true; |
450 | kkf->mName = i18n("Standard"); | 450 | kkf->mName = i18n("Standard"); |
451 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); | 451 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); |
452 | } | 452 | } |
453 | while ( mNextAvailableCalendar <= numCals ) { | 453 | while ( mNextAvailableCalendar <= numCals ) { |
454 | //qDebug("Read cal #%d ", mNextAvailableCalendar ); | 454 | //qDebug("Read cal #%d ", mNextAvailableCalendar ); |
455 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); | 455 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); |
456 | KopiCalendarFile *kkf = getNewCalendar(); | 456 | KopiCalendarFile *kkf = getNewCalendar(); |
457 | kkf->isStandard = fc.readBoolEntry( prefix+"_isStandard", false ); | 457 | kkf->isStandard = fc.readBoolEntry( prefix+"_isStandard", false ); |
458 | kkf->isEnabled = fc.readBoolEntry( prefix+"_isEnabled", true); | 458 | kkf->isEnabled = fc.readBoolEntry( prefix+"_isEnabled", true); |
459 | kkf->isRelative = fc.readBoolEntry( prefix+"_isRelative", false ); | 459 | kkf->isRelative = fc.readBoolEntry( prefix+"_isRelative", false ); |