-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 | |||
@@ -2210,194 +2210,197 @@ void CalendarView::slotSelectPickerDate( QDate d) | |||
2210 | 2210 | ||
2211 | void CalendarView::removeCategories() | 2211 | void CalendarView::removeCategories() |
2212 | { | 2212 | { |
2213 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); | 2213 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); |
2214 | QStringList catList = KOPrefs::instance()->mCustomCategories; | 2214 | QStringList catList = KOPrefs::instance()->mCustomCategories; |
2215 | QStringList catIncList; | 2215 | QStringList catIncList; |
2216 | QStringList newCatList; | 2216 | QStringList newCatList; |
2217 | Incidence* inc = incList.first(); | 2217 | Incidence* inc = incList.first(); |
2218 | int i; | 2218 | int i; |
2219 | int count = 0; | 2219 | int count = 0; |
2220 | while ( inc ) { | 2220 | while ( inc ) { |
2221 | newCatList.clear(); | 2221 | newCatList.clear(); |
2222 | catIncList = inc->categories() ; | 2222 | catIncList = inc->categories() ; |
2223 | for( i = 0; i< catIncList.count(); ++i ) { | 2223 | for( i = 0; i< catIncList.count(); ++i ) { |
2224 | if ( catList.contains (catIncList[i])) | 2224 | if ( catList.contains (catIncList[i])) |
2225 | newCatList.append( catIncList[i] ); | 2225 | newCatList.append( catIncList[i] ); |
2226 | } | 2226 | } |
2227 | newCatList.sort(); | 2227 | newCatList.sort(); |
2228 | inc->setCategories( newCatList.join(",") ); | 2228 | inc->setCategories( newCatList.join(",") ); |
2229 | inc = incList.next(); | 2229 | inc = incList.next(); |
2230 | } | 2230 | } |
2231 | } | 2231 | } |
2232 | 2232 | ||
2233 | int CalendarView::addCategories() | 2233 | int CalendarView::addCategories() |
2234 | { | 2234 | { |
2235 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); | 2235 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); |
2236 | QStringList catList = KOPrefs::instance()->mCustomCategories; | 2236 | QStringList catList = KOPrefs::instance()->mCustomCategories; |
2237 | QStringList catIncList; | 2237 | QStringList catIncList; |
2238 | Incidence* inc = incList.first(); | 2238 | Incidence* inc = incList.first(); |
2239 | int i; | 2239 | int i; |
2240 | int count = 0; | 2240 | int count = 0; |
2241 | while ( inc ) { | 2241 | while ( inc ) { |
2242 | catIncList = inc->categories() ; | 2242 | catIncList = inc->categories() ; |
2243 | for( i = 0; i< catIncList.count(); ++i ) { | 2243 | for( i = 0; i< catIncList.count(); ++i ) { |
2244 | if ( !catList.contains (catIncList[i])) { | 2244 | if ( !catList.contains (catIncList[i])) { |
2245 | catList.append( catIncList[i] ); | 2245 | catList.append( catIncList[i] ); |
2246 | //qDebug("add cat %s ", catIncList[i].latin1()); | 2246 | //qDebug("add cat %s ", catIncList[i].latin1()); |
2247 | ++count; | 2247 | ++count; |
2248 | } | 2248 | } |
2249 | } | 2249 | } |
2250 | inc = incList.next(); | 2250 | inc = incList.next(); |
2251 | } | 2251 | } |
2252 | catList.sort(); | 2252 | catList.sort(); |
2253 | KOPrefs::instance()->mCustomCategories = catList; | 2253 | KOPrefs::instance()->mCustomCategories = catList; |
2254 | return count; | 2254 | return count; |
2255 | } | 2255 | } |
2256 | 2256 | ||
2257 | void CalendarView::manageCategories() | 2257 | 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 | } |
2356 | } | 2359 | } |
2357 | void CalendarView::beamDone( Ir *ir ) | 2360 | void CalendarView::beamDone( Ir *ir ) |
2358 | { | 2361 | { |
2359 | #ifndef DESKTOP_VERSION | 2362 | #ifndef DESKTOP_VERSION |
2360 | delete ir; | 2363 | delete ir; |
2361 | #endif | 2364 | #endif |
2362 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); | 2365 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); |
2363 | topLevelWidget()->raise(); | 2366 | topLevelWidget()->raise(); |
2364 | } | 2367 | } |
2365 | 2368 | ||
2366 | void CalendarView::moveIncidence(Incidence * inc ) | 2369 | void CalendarView::moveIncidence(Incidence * inc ) |
2367 | { | 2370 | { |
2368 | if ( !inc ) return; | 2371 | if ( !inc ) return; |
2369 | // qDebug("showDatePickerForIncidence( ) "); | 2372 | // qDebug("showDatePickerForIncidence( ) "); |
2370 | if ( mDateFrame->isVisible() ) | 2373 | if ( mDateFrame->isVisible() ) |
2371 | mDateFrame->hide(); | 2374 | mDateFrame->hide(); |
2372 | else { | 2375 | else { |
2373 | int w =mDatePicker->sizeHint().width()+2*mDateFrame->lineWidth() ; | 2376 | int w =mDatePicker->sizeHint().width()+2*mDateFrame->lineWidth() ; |
2374 | int h = mDatePicker->sizeHint().height()+2*mDateFrame->lineWidth() ; | 2377 | int h = mDatePicker->sizeHint().height()+2*mDateFrame->lineWidth() ; |
2375 | int dw = QApplication::desktop()->width(); | 2378 | int dw = QApplication::desktop()->width(); |
2376 | int dh = QApplication::desktop()->height(); | 2379 | int dh = QApplication::desktop()->height(); |
2377 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2380 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2378 | mDateFrame->show(); | 2381 | mDateFrame->show(); |
2379 | } | 2382 | } |
2380 | mDatePickerMode = 2; | 2383 | mDatePickerMode = 2; |
2381 | mMoveIncidence = inc ; | 2384 | mMoveIncidence = inc ; |
2382 | QDate da; | 2385 | QDate da; |
2383 | if ( mMoveIncidence->type() == "Todo" ) { | 2386 | if ( mMoveIncidence->type() == "Todo" ) { |
2384 | Todo * to = (Todo *) mMoveIncidence; | 2387 | Todo * to = (Todo *) mMoveIncidence; |
2385 | if ( to->hasDueDate() ) | 2388 | if ( to->hasDueDate() ) |
2386 | da = to->dtDue().date(); | 2389 | da = to->dtDue().date(); |
2387 | else | 2390 | else |
2388 | da = QDate::currentDate(); | 2391 | da = QDate::currentDate(); |
2389 | } else { | 2392 | } else { |
2390 | da = mMoveIncidence->dtStart().date(); | 2393 | da = mMoveIncidence->dtStart().date(); |
2391 | } | 2394 | } |
2392 | mDatePicker->setDate( da ); | 2395 | mDatePicker->setDate( da ); |
2393 | } | 2396 | } |
2394 | void CalendarView::showDatePicker( ) | 2397 | void CalendarView::showDatePicker( ) |
2395 | { | 2398 | { |
2396 | //qDebug("CalendarView::showDatePicker( ) "); | 2399 | //qDebug("CalendarView::showDatePicker( ) "); |
2397 | if ( mDateFrame->isVisible() ) | 2400 | if ( mDateFrame->isVisible() ) |
2398 | mDateFrame->hide(); | 2401 | mDateFrame->hide(); |
2399 | else { | 2402 | else { |
2400 | int w =mDatePicker->sizeHint().width() ; | 2403 | int w =mDatePicker->sizeHint().width() ; |
2401 | int h = mDatePicker->sizeHint().height() ; | 2404 | int h = mDatePicker->sizeHint().height() ; |
2402 | int dw = QApplication::desktop()->width(); | 2405 | int dw = QApplication::desktop()->width(); |
2403 | int dh = QApplication::desktop()->height(); | 2406 | int dh = QApplication::desktop()->height(); |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 651442b..258f738 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -109,198 +109,192 @@ KOPrefs::KOPrefs() : | |||
109 | #else | 109 | #else |
110 | addItemBool("ShowFullMenu",&mShowFullMenu,true); | 110 | addItemBool("ShowFullMenu",&mShowFullMenu,true); |
111 | #endif | 111 | #endif |
112 | addItemBool("ToolBarHor",&mToolBarHor, true ); | 112 | addItemBool("ToolBarHor",&mToolBarHor, true ); |
113 | addItemBool("ToolBarUp",&mToolBarUp, false ); | 113 | addItemBool("ToolBarUp",&mToolBarUp, false ); |
114 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); | 114 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); |
115 | addItemInt("Whats Next Days",&mWhatsNextDays,3); | 115 | addItemInt("Whats Next Days",&mWhatsNextDays,3); |
116 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); | 116 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); |
117 | 117 | ||
118 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); | 118 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); |
119 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); | 119 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); |
120 | addItemInt("AllDay Size",&mAllDaySize,28); | 120 | addItemInt("AllDay Size",&mAllDaySize,28); |
121 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; | 121 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; |
122 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); | 122 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); |
123 | 123 | ||
124 | addItemStringList("LocationDefaults",&mLocationDefaults ); | 124 | addItemStringList("LocationDefaults",&mLocationDefaults ); |
125 | addItemStringList("EventSummary User",&mEventSummaryUser); | 125 | addItemStringList("EventSummary User",&mEventSummaryUser); |
126 | addItemStringList("TodoSummary User",&mTodoSummaryUser); | 126 | addItemStringList("TodoSummary User",&mTodoSummaryUser); |
127 | 127 | ||
128 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); | 128 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); |
129 | addItemBool("Enable Project View",&mEnableProjectView,false); | 129 | addItemBool("Enable Project View",&mEnableProjectView,false); |
130 | addItemBool("Auto Save",&mAutoSave,false); | 130 | addItemBool("Auto Save",&mAutoSave,false); |
131 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); | 131 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); |
132 | addItemBool("Confirm Deletes",&mConfirm,true); | 132 | addItemBool("Confirm Deletes",&mConfirm,true); |
133 | addItemString("Archive File",&mArchiveFile); | 133 | addItemString("Archive File",&mArchiveFile); |
134 | addItemString("Html Export File",&mHtmlExportFile, | 134 | addItemString("Html Export File",&mHtmlExportFile, |
135 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); | 135 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); |
136 | addItemBool("Html With Save",&mHtmlWithSave,false); | 136 | addItemBool("Html With Save",&mHtmlWithSave,false); |
137 | 137 | ||
138 | KPrefs::setCurrentGroup("Personal Settings"); | 138 | KPrefs::setCurrentGroup("Personal Settings"); |
139 | 139 | ||
140 | addItemInt("Mail Client",&mMailClient,MailClientKMail); | 140 | addItemInt("Mail Client",&mMailClient,MailClientKMail); |
141 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); | 141 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); |
142 | addItemBool("Bcc",&mBcc,false); | 142 | addItemBool("Bcc",&mBcc,false); |
143 | 143 | ||
144 | KPrefs::setCurrentGroup("Time & Date"); | 144 | KPrefs::setCurrentGroup("Time & Date"); |
145 | 145 | ||
146 | // addItemString("Time Zone",&mTimeZone,"+0100"); | 146 | // addItemString("Time Zone",&mTimeZone,"+0100"); |
147 | addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); | 147 | addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); |
148 | // addItemInt("TimeZoneOffset",&mTimeZoneOffset,60); | 148 | // addItemInt("TimeZoneOffset",&mTimeZoneOffset,60); |
149 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); | 149 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); |
150 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); | 150 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); |
151 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); | 151 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); |
152 | 152 | ||
153 | 153 | ||
154 | addItemInt("Default Start Time",&mStartTime,10); | 154 | addItemInt("Default Start Time",&mStartTime,10); |
155 | addItemInt("Default Duration",&mDefaultDuration,2); | 155 | addItemInt("Default Duration",&mDefaultDuration,2); |
156 | addItemInt("Default Alarm Time",&mAlarmTime,3); | 156 | addItemInt("Default Alarm Time",&mAlarmTime,3); |
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); |
259 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); | 253 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); |
260 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); | 254 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); |
261 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); | 255 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); |
262 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); | 256 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); |
263 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,false); | 257 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,false); |
264 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); | 258 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); |
265 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); | 259 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); |
266 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); | 260 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); |
267 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); | 261 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); |
268 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true); | 262 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true); |
269 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); | 263 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); |
270 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); | 264 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); |
271 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); | 265 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); |
272 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); | 266 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); |
273 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); | 267 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); |
274 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false); | 268 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,false); |
275 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); | 269 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); |
276 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); | 270 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); |
277 | #ifdef DESKTOP_VERSION | 271 | #ifdef DESKTOP_VERSION |
278 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); | 272 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); |
279 | #else | 273 | #else |
280 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); | 274 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); |
281 | #endif | 275 | #endif |
282 | addItemInt("Day Begins",&mDayBegins,7); | 276 | addItemInt("Day Begins",&mDayBegins,7); |
283 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); | 277 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); |
284 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); | 278 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); |
285 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); | 279 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); |
286 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); | 280 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); |
287 | 281 | ||
288 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); | 282 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); |
289 | addItemBool("Full View Month",&mFullViewMonth,true); | 283 | addItemBool("Full View Month",&mFullViewMonth,true); |
290 | addItemBool("Full View Todo",&mFullViewTodo,true); | 284 | addItemBool("Full View Todo",&mFullViewTodo,true); |
291 | addItemBool("Quick Todo",&mEnableQuickTodo,false); | 285 | addItemBool("Quick Todo",&mEnableQuickTodo,false); |
292 | 286 | ||
293 | addItemInt("Next X Days",&mNextXDays,3); | 287 | addItemInt("Next X Days",&mNextXDays,3); |
294 | 288 | ||
295 | KPrefs::setCurrentGroup("Printer"); | 289 | KPrefs::setCurrentGroup("Printer"); |
296 | 290 | ||
297 | KPrefs::setCurrentGroup("Layout"); | 291 | KPrefs::setCurrentGroup("Layout"); |
298 | 292 | ||
299 | addItemBool("CompactDialogs",&mCompactDialogs,false); | 293 | addItemBool("CompactDialogs",&mCompactDialogs,false); |
300 | addItemBool("VerticalScreen",&mVerticalScreen,true); | 294 | addItemBool("VerticalScreen",&mVerticalScreen,true); |
301 | 295 | ||
302 | KPrefs::setCurrentGroup("KOrganizer Plugins"); | 296 | KPrefs::setCurrentGroup("KOrganizer Plugins"); |
303 | 297 | ||
304 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); | 298 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); |
305 | 299 | ||
306 | KPrefs::setCurrentGroup("Group Scheduling"); | 300 | KPrefs::setCurrentGroup("Group Scheduling"); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 06470b8..c3e9f75 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1121,196 +1121,196 @@ void MainWindow::about() | |||
1121 | i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); | 1121 | i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); |
1122 | } | 1122 | } |
1123 | void MainWindow::keyBindings() | 1123 | void MainWindow::keyBindings() |
1124 | { | 1124 | { |
1125 | QString cap = i18n("Key bindings KOrganizer/Pi"); | 1125 | QString cap = i18n("Key bindings KOrganizer/Pi"); |
1126 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1126 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1127 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1127 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1128 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1128 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1129 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1129 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1130 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1130 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ |
1131 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1131 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1132 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1132 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1133 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ | 1133 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ |
1134 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1134 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1135 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1135 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1136 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1136 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1137 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1137 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1138 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1138 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1139 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ | 1139 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ |
1140 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1140 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1141 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1141 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1142 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1142 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1143 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1143 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1144 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1144 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1145 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1145 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1146 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1146 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1147 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1147 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1148 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1148 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1149 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1149 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1150 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | 1150 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ |
1151 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | 1151 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ |
1152 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | 1152 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ |
1153 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1153 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1154 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1154 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1155 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1155 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1156 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1156 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1157 | i18n("<p><h3>In list view:</h3></p>\n") + | 1157 | i18n("<p><h3>In list view:</h3></p>\n") + |
1158 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1158 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1159 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1159 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1160 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1160 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1161 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1161 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1162 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1162 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1163 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1163 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1164 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1164 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1165 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1165 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1166 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1166 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1167 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1167 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1168 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1168 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
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...") ); |
1269 | 1269 | ||
1270 | mNewSubTodoAction->setEnabled( false ); | 1270 | mNewSubTodoAction->setEnabled( false ); |
1271 | } else if ( incidence->type() == "Todo" ) { | 1271 | } else if ( incidence->type() == "Todo" ) { |
1272 | mShowAction->setText( i18n("Show Todo...") ); | 1272 | mShowAction->setText( i18n("Show Todo...") ); |
1273 | mEditAction->setText( i18n("Edit Todo...") ); | 1273 | mEditAction->setText( i18n("Edit Todo...") ); |
1274 | mDeleteAction->setText( i18n("Delete Todo...") ); | 1274 | mDeleteAction->setText( i18n("Delete Todo...") ); |
1275 | 1275 | ||
1276 | mNewSubTodoAction->setEnabled( true ); | 1276 | mNewSubTodoAction->setEnabled( true ); |
1277 | } else { | 1277 | } else { |
1278 | mShowAction->setText( i18n("Show...") ); | 1278 | mShowAction->setText( i18n("Show...") ); |
1279 | mShowAction->setText( i18n("Edit...") ); | 1279 | mShowAction->setText( i18n("Edit...") ); |
1280 | mShowAction->setText( i18n("Delete...") ); | 1280 | mShowAction->setText( i18n("Delete...") ); |
1281 | 1281 | ||
1282 | mNewSubTodoAction->setEnabled( false ); | 1282 | mNewSubTodoAction->setEnabled( false ); |
1283 | } | 1283 | } |
1284 | } | 1284 | } |
1285 | 1285 | ||
1286 | void MainWindow::enableIncidenceActions( bool enabled ) | 1286 | void MainWindow::enableIncidenceActions( bool enabled ) |
1287 | { | 1287 | { |
1288 | mShowAction->setEnabled( enabled ); | 1288 | mShowAction->setEnabled( enabled ); |
1289 | mEditAction->setEnabled( enabled ); | 1289 | mEditAction->setEnabled( enabled ); |
1290 | mDeleteAction->setEnabled( enabled ); | 1290 | mDeleteAction->setEnabled( enabled ); |
1291 | 1291 | ||
1292 | mCloneAction->setEnabled( enabled ); | 1292 | mCloneAction->setEnabled( enabled ); |
1293 | mMoveAction->setEnabled( enabled ); | 1293 | mMoveAction->setEnabled( enabled ); |
1294 | mBeamAction->setEnabled( enabled ); | 1294 | mBeamAction->setEnabled( enabled ); |
1295 | mCancelAction->setEnabled( enabled ); | 1295 | mCancelAction->setEnabled( enabled ); |
1296 | } | 1296 | } |
1297 | 1297 | ||
1298 | void MainWindow::importOL() | 1298 | void MainWindow::importOL() |
1299 | { | 1299 | { |
1300 | #ifdef _WIN32_ | 1300 | #ifdef _WIN32_ |
1301 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); | 1301 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); |
1302 | id->exec(); | 1302 | id->exec(); |
1303 | delete id; | 1303 | delete id; |
1304 | mView->updateView(); | 1304 | mView->updateView(); |
1305 | #endif | 1305 | #endif |
1306 | } | 1306 | } |
1307 | void MainWindow::importBday() | 1307 | void MainWindow::importBday() |
1308 | { | 1308 | { |
1309 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1309 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1310 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), | 1310 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), |
1311 | i18n("Import!"), i18n("Cancel"), 0, | 1311 | i18n("Import!"), i18n("Cancel"), 0, |
1312 | 0, 1 ); | 1312 | 0, 1 ); |
1313 | if ( result == 0 ) { | 1313 | if ( result == 0 ) { |
1314 | mView->importBday(); | 1314 | mView->importBday(); |
1315 | 1315 | ||
1316 | } | 1316 | } |