author | zautrix <zautrix> | 2004-10-18 09:08:13 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-18 09:08:13 (UTC) |
commit | 56990d318b15eacf7d3cc7425ab62f68da099ddf (patch) (unidiff) | |
tree | b2f021bd75bc6a08fa8fc51a07ce1755b8e4a95e /korganizer | |
parent | 1712d92ea25b220273859d985bc7211fa7a97a39 (diff) | |
download | kdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.zip kdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.tar.gz kdepimpi-56990d318b15eacf7d3cc7425ab62f68da099ddf.tar.bz2 |
fix of tmp file path for desktop version
-rw-r--r-- | korganizer/calendarview.cpp | 5 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 6 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 4 |
3 files changed, 6 insertions, 9 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 290c0b9..884c61a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2258,98 +2258,101 @@ void CalendarView::manageCategories() | |||
2258 | { | 2258 | { |
2259 | KOCatPrefs* cp = new KOCatPrefs(); | 2259 | KOCatPrefs* cp = new KOCatPrefs(); |
2260 | cp->show(); | 2260 | cp->show(); |
2261 | int w =cp->sizeHint().width() ; | 2261 | int w =cp->sizeHint().width() ; |
2262 | int h = cp->sizeHint().height() ; | 2262 | int h = cp->sizeHint().height() ; |
2263 | int dw = QApplication::desktop()->width(); | 2263 | int dw = QApplication::desktop()->width(); |
2264 | int dh = QApplication::desktop()->height(); | 2264 | int dh = QApplication::desktop()->height(); |
2265 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2265 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2266 | if ( !cp->exec() ) { | 2266 | if ( !cp->exec() ) { |
2267 | delete cp; | 2267 | delete cp; |
2268 | return; | 2268 | return; |
2269 | } | 2269 | } |
2270 | int count = 0; | 2270 | int count = 0; |
2271 | if ( cp->addCat() ) { | 2271 | if ( cp->addCat() ) { |
2272 | count = addCategories(); | 2272 | count = addCategories(); |
2273 | if ( count ) { | 2273 | if ( count ) { |
2274 | topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); | 2274 | topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); |
2275 | writeSettings(); | 2275 | writeSettings(); |
2276 | } | 2276 | } |
2277 | } else { | 2277 | } else { |
2278 | removeCategories(); | 2278 | removeCategories(); |
2279 | updateView(); | 2279 | updateView(); |
2280 | } | 2280 | } |
2281 | delete cp; | 2281 | delete cp; |
2282 | } | 2282 | } |
2283 | 2283 | ||
2284 | void CalendarView::beamIncidence(Incidence * Inc) | 2284 | void CalendarView::beamIncidence(Incidence * Inc) |
2285 | { | 2285 | { |
2286 | QPtrList<Incidence> delSel ; | 2286 | QPtrList<Incidence> delSel ; |
2287 | delSel.append(Inc); | 2287 | delSel.append(Inc); |
2288 | beamIncidenceList( delSel ); | 2288 | beamIncidenceList( delSel ); |
2289 | } | 2289 | } |
2290 | void CalendarView::beamCalendar() | 2290 | void CalendarView::beamCalendar() |
2291 | { | 2291 | { |
2292 | QPtrList<Incidence> delSel = mCalendar->rawIncidences(); | 2292 | QPtrList<Incidence> delSel = mCalendar->rawIncidences(); |
2293 | //qDebug("beamCalendar() "); | 2293 | //qDebug("beamCalendar() "); |
2294 | beamIncidenceList( delSel ); | 2294 | beamIncidenceList( delSel ); |
2295 | } | 2295 | } |
2296 | void CalendarView::beamFilteredCalendar() | 2296 | void CalendarView::beamFilteredCalendar() |
2297 | { | 2297 | { |
2298 | QPtrList<Incidence> delSel = mCalendar->incidences(); | 2298 | QPtrList<Incidence> delSel = mCalendar->incidences(); |
2299 | //qDebug("beamFilteredCalendar() "); | 2299 | //qDebug("beamFilteredCalendar() "); |
2300 | beamIncidenceList( delSel ); | 2300 | beamIncidenceList( delSel ); |
2301 | } | 2301 | } |
2302 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) | 2302 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) |
2303 | { | 2303 | { |
2304 | if ( beamDialog->exec () == QDialog::Rejected ) | 2304 | if ( beamDialog->exec () == QDialog::Rejected ) |
2305 | return; | 2305 | return; |
2306 | 2306 | #ifdef DESKTOP_VERSION | |
2307 | QString fn = locateLocal( "tmp", "kopibeamfile" ); | ||
2308 | #else | ||
2307 | QString fn = "/tmp/kopibeamfile"; | 2309 | QString fn = "/tmp/kopibeamfile"; |
2310 | #endif | ||
2308 | QString mes; | 2311 | QString mes; |
2309 | bool createbup = true; | 2312 | bool createbup = true; |
2310 | if ( createbup ) { | 2313 | if ( createbup ) { |
2311 | QString description = "\n"; | 2314 | QString description = "\n"; |
2312 | CalendarLocal* cal = new CalendarLocal(); | 2315 | CalendarLocal* cal = new CalendarLocal(); |
2313 | if ( beamDialog->beamLocal() ) | 2316 | if ( beamDialog->beamLocal() ) |
2314 | cal->setLocalTime(); | 2317 | cal->setLocalTime(); |
2315 | else | 2318 | else |
2316 | cal->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); | 2319 | cal->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); |
2317 | Incidence *incidence = delSel.first(); | 2320 | Incidence *incidence = delSel.first(); |
2318 | bool addText = false; | 2321 | bool addText = false; |
2319 | if ( delSel.count() < 10 ) | 2322 | if ( delSel.count() < 10 ) |
2320 | addText = true; | 2323 | addText = true; |
2321 | else { | 2324 | else { |
2322 | description.sprintf(i18n(" %d items?"),delSel.count() ); | 2325 | description.sprintf(i18n(" %d items?"),delSel.count() ); |
2323 | } | 2326 | } |
2324 | while ( incidence ) { | 2327 | while ( incidence ) { |
2325 | Incidence *in = incidence->clone(); | 2328 | Incidence *in = incidence->clone(); |
2326 | if ( ! in->summary().isEmpty() ) { | 2329 | if ( ! in->summary().isEmpty() ) { |
2327 | in->setDescription(""); | 2330 | in->setDescription(""); |
2328 | } else { | 2331 | } else { |
2329 | in->setSummary( in->description().left(20)); | 2332 | in->setSummary( in->description().left(20)); |
2330 | in->setDescription(""); | 2333 | in->setDescription(""); |
2331 | } | 2334 | } |
2332 | if ( addText ) | 2335 | if ( addText ) |
2333 | description += in->summary() + "\n"; | 2336 | description += in->summary() + "\n"; |
2334 | cal->addIncidence( in ); | 2337 | cal->addIncidence( in ); |
2335 | incidence = delSel.next(); | 2338 | incidence = delSel.next(); |
2336 | } | 2339 | } |
2337 | if ( beamDialog->beamVcal() ) { | 2340 | if ( beamDialog->beamVcal() ) { |
2338 | fn += ".vcs"; | 2341 | fn += ".vcs"; |
2339 | FileStorage storage( cal, fn, new VCalFormat ); | 2342 | FileStorage storage( cal, fn, new VCalFormat ); |
2340 | storage.save(); | 2343 | storage.save(); |
2341 | } else { | 2344 | } else { |
2342 | fn += ".ics"; | 2345 | fn += ".ics"; |
2343 | FileStorage storage( cal, fn, new ICalFormat( ) ); | 2346 | FileStorage storage( cal, fn, new ICalFormat( ) ); |
2344 | storage.save(); | 2347 | storage.save(); |
2345 | } | 2348 | } |
2346 | delete cal; | 2349 | delete cal; |
2347 | mes = i18n("KO/Pi: Ready for beaming"); | 2350 | mes = i18n("KO/Pi: Ready for beaming"); |
2348 | topLevelWidget()->setCaption(mes); | 2351 | topLevelWidget()->setCaption(mes); |
2349 | KApplication::convert2latin1( fn ); | 2352 | KApplication::convert2latin1( fn ); |
2350 | #ifndef DESKTOP_VERSION | 2353 | #ifndef DESKTOP_VERSION |
2351 | Ir *ir = new Ir( this ); | 2354 | Ir *ir = new Ir( this ); |
2352 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 2355 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
2353 | ir->send( fn, description, "text/x-vCalendar" ); | 2356 | ir->send( fn, description, "text/x-vCalendar" ); |
2354 | #endif | 2357 | #endif |
2355 | } | 2358 | } |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 651442b..258f738 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -157,102 +157,96 @@ KOPrefs::KOPrefs() : | |||
157 | addItemInt("Daylight Savings",&mDaylightSavings,0); | 157 | addItemInt("Daylight Savings",&mDaylightSavings,0); |
158 | KPrefs::setCurrentGroup("AlarmSettings"); | 158 | KPrefs::setCurrentGroup("AlarmSettings"); |
159 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); | 159 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); |
160 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); | 160 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); |
161 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); | 161 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); |
162 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); | 162 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); |
163 | 163 | ||
164 | 164 | ||
165 | KPrefs::setCurrentGroup("Calendar"); | 165 | KPrefs::setCurrentGroup("Calendar"); |
166 | 166 | ||
167 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); | 167 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); |
168 | 168 | ||
169 | KPrefs::setCurrentGroup("Fonts"); | 169 | KPrefs::setCurrentGroup("Fonts"); |
170 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); | 170 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); |
171 | addItemFont("TimeBar Font",&mTimeBarFont); | 171 | addItemFont("TimeBar Font",&mTimeBarFont); |
172 | addItemFont("MonthView Font",&mMonthViewFont); | 172 | addItemFont("MonthView Font",&mMonthViewFont); |
173 | addItemFont("AgendaView Font",&mAgendaViewFont); | 173 | addItemFont("AgendaView Font",&mAgendaViewFont); |
174 | addItemFont("MarcusBains Font",&mMarcusBainsFont); | 174 | addItemFont("MarcusBains Font",&mMarcusBainsFont); |
175 | addItemFont("TimeLabels Font",&mTimeLabelsFont); | 175 | addItemFont("TimeLabels Font",&mTimeLabelsFont); |
176 | addItemFont("TodoView Font",&mTodoViewFont); | 176 | addItemFont("TodoView Font",&mTodoViewFont); |
177 | addItemFont("ListView Font",&mListViewFont); | 177 | addItemFont("ListView Font",&mListViewFont); |
178 | addItemFont("DateNavigator Font",&mDateNavigatorFont); | 178 | addItemFont("DateNavigator Font",&mDateNavigatorFont); |
179 | addItemFont("EditBox Font",&mEditBoxFont); | 179 | addItemFont("EditBox Font",&mEditBoxFont); |
180 | addItemFont("JournalView Font",&mJornalViewFont); | 180 | addItemFont("JournalView Font",&mJornalViewFont); |
181 | addItemFont("WhatsNextView Font",&mWhatsNextFont); | 181 | addItemFont("WhatsNextView Font",&mWhatsNextFont); |
182 | addItemFont("EventView Font",&mEventViewFont); | 182 | addItemFont("EventView Font",&mEventViewFont); |
183 | 183 | ||
184 | // KPrefs::setCurrentGroup("SyncProfiles"); | 184 | // KPrefs::setCurrentGroup("SyncProfiles"); |
185 | // addItemString("LocalMachineName",&mLocalMachineName, "undefined"); | 185 | // addItemString("LocalMachineName",&mLocalMachineName, "undefined"); |
186 | // addItemStringList("SyncProfileNames",&mSyncProfileNames); | 186 | // addItemStringList("SyncProfileNames",&mSyncProfileNames); |
187 | // addItemStringList("ExternSyncProfiles",&mExternSyncProfileNames); | 187 | // addItemStringList("ExternSyncProfiles",&mExternSyncProfileNames); |
188 | 188 | ||
189 | KPrefs::setCurrentGroup("RemoteSyncing"); | 189 | KPrefs::setCurrentGroup("RemoteSyncing"); |
190 | // addItemBool("UsePasswd",&mUsePassWd,false); | 190 | // addItemBool("UsePasswd",&mUsePassWd,false); |
191 | // addItemBool("WriteBackFile",&mWriteBackFile,true); | 191 | // addItemBool("WriteBackFile",&mWriteBackFile,true); |
192 | // addItemBool("WriteBackExistingOnly",&mWriteBackExistingOnly,false); | 192 | // addItemBool("WriteBackExistingOnly",&mWriteBackExistingOnly,false); |
193 | // addItemBool("AskForPreferences",&mAskForPreferences,true); | 193 | // addItemBool("AskForPreferences",&mAskForPreferences,true); |
194 | // addItemBool("ShowSyncSummary",&mShowSyncSummary,true); | 194 | // addItemBool("ShowSyncSummary",&mShowSyncSummary,true); |
195 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); | 195 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); |
196 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); | 196 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); |
197 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); | 197 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); |
198 | addItemInt("LastSyncTime",&mLastSyncTime,0); | 198 | addItemInt("LastSyncTime",&mLastSyncTime,0); |
199 | 199 | ||
200 | #ifdef _WIN32_ | 200 | #ifdef _WIN32_ |
201 | QString hdp= locateLocal("data","korganizer")+"\\\\"; | 201 | QString hdp= locateLocal("data","korganizer")+"\\\\"; |
202 | #else | 202 | #else |
203 | QString hdp= locateLocal("data","korganizer")+"/"; | 203 | QString hdp= locateLocal("data","korganizer")+"/"; |
204 | #endif | 204 | #endif |
205 | // addItemString("RemoteIP",&mRemoteIP, "192.168.0.65"); | ||
206 | // addItemString("RemoteUser",&mRemoteUser, "zaurus"); | ||
207 | // addItemString("RemotePassWd",&mRemotePassWd, ""); | ||
208 | // addItemString("RemoteFile", &mRemoteFile, hdp+"mycalendar.ics"); | ||
209 | // addItemString("LocalTempFile",&mLocalTempFile, "/tmp/tempsyncfile.ics" ); | ||
210 | |||
211 | 205 | ||
212 | KPrefs::setCurrentGroup("LoadSaveFileNames"); | 206 | KPrefs::setCurrentGroup("LoadSaveFileNames"); |
213 | 207 | ||
214 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); | 208 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); |
215 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); | 209 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); |
216 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); | 210 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); |
217 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); | 211 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); |
218 | 212 | ||
219 | 213 | ||
220 | KPrefs::setCurrentGroup("Locale"); | 214 | KPrefs::setCurrentGroup("Locale"); |
221 | addItemInt("PreferredLanguage",&mPreferredLanguage,0); | 215 | addItemInt("PreferredLanguage",&mPreferredLanguage,0); |
222 | addItemInt("PreferredTime",&mPreferredTime,0); | 216 | addItemInt("PreferredTime",&mPreferredTime,0); |
223 | addItemInt("PreferredDate",&mPreferredDate,0); | 217 | addItemInt("PreferredDate",&mPreferredDate,0); |
224 | addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); | 218 | addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); |
225 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 219 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
226 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); | 220 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); |
227 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); | 221 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); |
228 | 222 | ||
229 | 223 | ||
230 | KPrefs::setCurrentGroup("Colors"); | 224 | KPrefs::setCurrentGroup("Colors"); |
231 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); | 225 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); |
232 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); | 226 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); |
233 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); | 227 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); |
234 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); | 228 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); |
235 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); | 229 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); |
236 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); | 230 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); |
237 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); | 231 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); |
238 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); | 232 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); |
239 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); | 233 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); |
240 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); | 234 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); |
241 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); | 235 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); |
242 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); | 236 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); |
243 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); | 237 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); |
244 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); | 238 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); |
245 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); | 239 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); |
246 | addItemBool("UseAppColors",&mUseAppColors,false); | 240 | addItemBool("UseAppColors",&mUseAppColors,false); |
247 | 241 | ||
248 | 242 | ||
249 | 243 | ||
250 | KPrefs::setCurrentGroup("Views"); | 244 | KPrefs::setCurrentGroup("Views"); |
251 | addItemInt("Hour Size",&mHourSize,8); | 245 | addItemInt("Hour Size",&mHourSize,8); |
252 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); | 246 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); |
253 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); | 247 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); |
254 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); | 248 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); |
255 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); | 249 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); |
256 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); | 250 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); |
257 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); | 251 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); |
258 | addItemBool("Enable ToolTips",&mEnableToolTips,false); | 252 | addItemBool("Enable ToolTips",&mEnableToolTips,false); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 06470b8..c3e9f75 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1169,100 +1169,100 @@ void MainWindow::keyBindings() | |||
1169 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1169 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1170 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1170 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1171 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1171 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1172 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1172 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1173 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1173 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
1174 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ | 1174 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ |
1175 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + | 1175 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + |
1176 | i18n("<p><b>White</b>: Item readonly</p>\n"); | 1176 | i18n("<p><b>White</b>: Item readonly</p>\n"); |
1177 | displayText( text, cap); | 1177 | displayText( text, cap); |
1178 | 1178 | ||
1179 | } | 1179 | } |
1180 | void MainWindow::aboutAutoSaving() | 1180 | void MainWindow::aboutAutoSaving() |
1181 | { | 1181 | { |
1182 | QMessageBox* msg; | 1182 | QMessageBox* msg; |
1183 | msg = new QMessageBox( i18n("Auto Saving in KOrganizer/Pi"), | 1183 | msg = new QMessageBox( i18n("Auto Saving in KOrganizer/Pi"), |
1184 | i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"), QMessageBox::NoIcon, | 1184 | i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"), QMessageBox::NoIcon, |
1185 | QMessageBox::Ok, | 1185 | QMessageBox::Ok, |
1186 | QMessageBox::NoButton, | 1186 | QMessageBox::NoButton, |
1187 | QMessageBox::NoButton); | 1187 | QMessageBox::NoButton); |
1188 | msg->exec(); | 1188 | msg->exec(); |
1189 | delete msg; | 1189 | delete msg; |
1190 | 1190 | ||
1191 | 1191 | ||
1192 | } | 1192 | } |
1193 | void MainWindow::aboutKnownBugs() | 1193 | void MainWindow::aboutKnownBugs() |
1194 | { | 1194 | { |
1195 | QMessageBox* msg; | 1195 | QMessageBox* msg; |
1196 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), | 1196 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), |
1197 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ | 1197 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ |
1198 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1198 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1199 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + | 1199 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + |
1200 | i18n("\nor report them in the bugtracker on\n") + | 1200 | i18n("\nor report them in the bugtracker on\n") + |
1201 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), | 1201 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), |
1202 | QMessageBox::NoIcon, | 1202 | QMessageBox::NoIcon, |
1203 | QMessageBox::Ok, | 1203 | QMessageBox::Ok, |
1204 | QMessageBox::NoButton, | 1204 | QMessageBox::NoButton, |
1205 | QMessageBox::NoButton); | 1205 | QMessageBox::NoButton); |
1206 | msg->exec(); | 1206 | msg->exec(); |
1207 | delete msg; | 1207 | delete msg; |
1208 | 1208 | ||
1209 | } | 1209 | } |
1210 | 1210 | ||
1211 | QString MainWindow::defaultFileName() | 1211 | QString MainWindow::defaultFileName() |
1212 | { | 1212 | { |
1213 | return locateLocal( "data", "korganizer/mycalendar.ics" ); | 1213 | return locateLocal( "data", "korganizer/mycalendar.ics" ); |
1214 | } | 1214 | } |
1215 | QString MainWindow::syncFileName() | 1215 | QString MainWindow::syncFileName() |
1216 | { | 1216 | { |
1217 | #ifdef _WIN32_ | 1217 | #ifdef DESKTOP_VERSION |
1218 | return locateLocal( "tmp", "synccalendar.ics" ); | 1218 | return locateLocal( "tmp", "synccalendar.ics" ); |
1219 | #else | 1219 | #else |
1220 | return QString( "/tmp/kopitempfile.ics" ); | 1220 | return QString( "/tmp/synccalendar.ics" ); |
1221 | #endif | 1221 | #endif |
1222 | } | 1222 | } |
1223 | 1223 | ||
1224 | void MainWindow::processIncidenceSelection( Incidence *incidence ) | 1224 | void MainWindow::processIncidenceSelection( Incidence *incidence ) |
1225 | { | 1225 | { |
1226 | if ( !incidence ) { | 1226 | if ( !incidence ) { |
1227 | enableIncidenceActions( false ); | 1227 | enableIncidenceActions( false ); |
1228 | 1228 | ||
1229 | mNewSubTodoAction->setEnabled( false ); | 1229 | mNewSubTodoAction->setEnabled( false ); |
1230 | setCaptionToDates(); | 1230 | setCaptionToDates(); |
1231 | return; | 1231 | return; |
1232 | 1232 | ||
1233 | } | 1233 | } |
1234 | 1234 | ||
1235 | //KGlobal::locale()->formatDateTime(nextA, true); | 1235 | //KGlobal::locale()->formatDateTime(nextA, true); |
1236 | QString startString = ""; | 1236 | QString startString = ""; |
1237 | if ( incidence->type() != "Todo" ) { | 1237 | if ( incidence->type() != "Todo" ) { |
1238 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { | 1238 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { |
1239 | if ( incidence->doesFloat() ) { | 1239 | if ( incidence->doesFloat() ) { |
1240 | startString += ": "+incidence->dtStartDateStr( true ); | 1240 | startString += ": "+incidence->dtStartDateStr( true ); |
1241 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); | 1241 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); |
1242 | 1242 | ||
1243 | } else { | 1243 | } else { |
1244 | startString = ": "+incidence->dtStartStr(true); | 1244 | startString = ": "+incidence->dtStartStr(true); |
1245 | startString += " --- "+((Event*)incidence)->dtEndStr(true); | 1245 | startString += " --- "+((Event*)incidence)->dtEndStr(true); |
1246 | 1246 | ||
1247 | } | 1247 | } |
1248 | 1248 | ||
1249 | } else { | 1249 | } else { |
1250 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) | 1250 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) |
1251 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ | 1251 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ |
1252 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); | 1252 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); |
1253 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); | 1253 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); |
1254 | } | 1254 | } |
1255 | 1255 | ||
1256 | } | 1256 | } |
1257 | else | 1257 | else |
1258 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); | 1258 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); |
1259 | if ( !incidence->location().isEmpty() ) | 1259 | if ( !incidence->location().isEmpty() ) |
1260 | startString += " (" +incidence->location()+")"; | 1260 | startString += " (" +incidence->location()+")"; |
1261 | setCaption( incidence->summary()+startString); | 1261 | setCaption( incidence->summary()+startString); |
1262 | 1262 | ||
1263 | enableIncidenceActions( true ); | 1263 | enableIncidenceActions( true ); |
1264 | 1264 | ||
1265 | if ( incidence->type() == "Event" ) { | 1265 | if ( incidence->type() == "Event" ) { |
1266 | mShowAction->setText( i18n("Show Event...") ); | 1266 | mShowAction->setText( i18n("Show Event...") ); |
1267 | mEditAction->setText( i18n("Edit Event...") ); | 1267 | mEditAction->setText( i18n("Edit Event...") ); |
1268 | mDeleteAction->setText( i18n("Delete Event...") ); | 1268 | mDeleteAction->setText( i18n("Delete Event...") ); |