-rw-r--r-- | korganizer/koagenda.cpp | 5 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 1 | ||||
-rw-r--r-- | korganizer/koprefs.h | 2 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 16 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 9 |
5 files changed, 23 insertions, 10 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 18c506e..114ed75 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -328,139 +328,140 @@ void KOAgenda::clear() | |||
328 | } | 328 | } |
329 | mItems.clear(); | 329 | mItems.clear(); |
330 | mSelectedItem = 0; | 330 | mSelectedItem = 0; |
331 | clearSelection(); | 331 | clearSelection(); |
332 | } | 332 | } |
333 | 333 | ||
334 | void KOAgenda::clearSelection() | 334 | void KOAgenda::clearSelection() |
335 | { | 335 | { |
336 | mSelectionCellX = 0; | 336 | mSelectionCellX = 0; |
337 | mSelectionYTop = 0; | 337 | mSelectionYTop = 0; |
338 | mSelectionHeight = 0; | 338 | mSelectionHeight = 0; |
339 | } | 339 | } |
340 | 340 | ||
341 | void KOAgenda::marcus_bains() | 341 | void KOAgenda::marcus_bains() |
342 | { | 342 | { |
343 | if(mMarcusBains) mMarcusBains->updateLocation(true); | 343 | if(mMarcusBains) mMarcusBains->updateLocation(true); |
344 | } | 344 | } |
345 | 345 | ||
346 | 346 | ||
347 | void KOAgenda::changeColumns(int columns) | 347 | void KOAgenda::changeColumns(int columns) |
348 | { | 348 | { |
349 | if (columns == 0) { | 349 | if (columns == 0) { |
350 | qDebug("KOAgenda::changeColumns() called with argument 0 "); | 350 | qDebug("KOAgenda::changeColumns() called with argument 0 "); |
351 | return; | 351 | return; |
352 | } | 352 | } |
353 | clear(); | 353 | clear(); |
354 | mColumns = columns; | 354 | mColumns = columns; |
355 | computeSizes(); | 355 | computeSizes(); |
356 | } | 356 | } |
357 | 357 | ||
358 | /* | 358 | /* |
359 | This is the eventFilter function, which gets all events from the KOAgendaItems | 359 | This is the eventFilter function, which gets all events from the KOAgendaItems |
360 | contained in the agenda. It has to handle moving and resizing for all items. | 360 | contained in the agenda. It has to handle moving and resizing for all items. |
361 | */ | 361 | */ |
362 | bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) | 362 | bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) |
363 | { | 363 | { |
364 | // kdDebug() << "KOAgenda::eventFilter" << endl; | 364 | // kdDebug() << "KOAgenda::eventFilter" << endl; |
365 | switch(event->type()) { | 365 | switch(event->type()) { |
366 | case QEvent::MouseButtonPress: | 366 | case QEvent::MouseButtonPress: |
367 | case QEvent::MouseButtonDblClick: | 367 | case QEvent::MouseButtonDblClick: |
368 | case QEvent::MouseButtonRelease: | 368 | case QEvent::MouseButtonRelease: |
369 | case QEvent::MouseMove: | 369 | case QEvent::MouseMove: |
370 | return eventFilter_mouse(object, static_cast<QMouseEvent *>(event)); | 370 | return eventFilter_mouse(object, static_cast<QMouseEvent *>(event)); |
371 | 371 | ||
372 | case (QEvent::Leave): | 372 | case (QEvent::Leave): |
373 | if (!mActionItem) | 373 | if (!mActionItem) |
374 | setCursor(arrowCursor); | 374 | setCursor(arrowCursor); |
375 | return true; | 375 | return true; |
376 | 376 | ||
377 | default: | 377 | default: |
378 | return QScrollView::eventFilter(object,event); | 378 | return QScrollView::eventFilter(object,event); |
379 | } | 379 | } |
380 | } | 380 | } |
381 | void KOAgenda::popupMenu() | 381 | void KOAgenda::popupMenu() |
382 | { | 382 | { |
383 | mPopupTimer->stop(); | 383 | mPopupTimer->stop(); |
384 | if ( mPopupKind == 1 ) { | 384 | if ( mPopupKind == 1 ) { |
385 | if (mActionItem ) { | 385 | if (mActionItem ) { |
386 | endItemAction(); | 386 | endItemAction(); |
387 | } | 387 | } |
388 | mLeftMouseDown = false; // no more leftMouse computation | 388 | mLeftMouseDown = false; // no more leftMouse computation |
389 | if (mPopupItem) { | 389 | if (mPopupItem) { |
390 | //mClickedItem = mPopupItem; | 390 | //mClickedItem = mPopupItem; |
391 | selectItem(mPopupItem); | 391 | selectItem(mPopupItem); |
392 | if ( mAllAgendaPopup ) | 392 | if ( mAllAgendaPopup && KOPrefs::instance()->mBlockPopupMenu ) |
393 | mAllAgendaPopup->installEventFilter( this ); | 393 | mAllAgendaPopup->installEventFilter( this ); |
394 | emit showIncidencePopupSignal(mPopupItem->incidence()); | 394 | emit showIncidencePopupSignal(mPopupItem->incidence()); |
395 | 395 | ||
396 | } | 396 | } |
397 | } else if ( mPopupKind == 2 ) { | 397 | } else if ( mPopupKind == 2 ) { |
398 | if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action | 398 | if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action |
399 | endSelectAction( false ); // do not emit new event signal | 399 | endSelectAction( false ); // do not emit new event signal |
400 | mLeftMouseDown = false; // no more leftMouse computation | 400 | mLeftMouseDown = false; // no more leftMouse computation |
401 | } | 401 | } |
402 | mNewItemPopup->installEventFilter( this ); | 402 | if ( KOPrefs::instance()->mBlockPopupMenu ) |
403 | mNewItemPopup->installEventFilter( this ); | ||
403 | mNewItemPopup->popup( mPopupPos); | 404 | mNewItemPopup->popup( mPopupPos); |
404 | 405 | ||
405 | } | 406 | } |
406 | mLeftMouseDown = false; | 407 | mLeftMouseDown = false; |
407 | mPopupItem = 0; | 408 | mPopupItem = 0; |
408 | mPopupKind = 0; | 409 | mPopupKind = 0; |
409 | } | 410 | } |
410 | 411 | ||
411 | bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | 412 | bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) |
412 | { | 413 | { |
413 | static int startX = 0; | 414 | static int startX = 0; |
414 | static int startY = 0; | 415 | static int startY = 0; |
415 | static int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 15 : 20 ); | 416 | static int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 15 : 20 ); |
416 | static bool blockMoving = true; | 417 | static bool blockMoving = true; |
417 | 418 | ||
418 | //qDebug("KOAgenda::eventFilter_mous "); | 419 | //qDebug("KOAgenda::eventFilter_mous "); |
419 | if ( object == mNewItemPopup ) { | 420 | if ( object == mNewItemPopup ) { |
420 | //qDebug("mNewItemPopup "); | 421 | //qDebug("mNewItemPopup "); |
421 | if ( me->type() == QEvent::MouseButtonRelease ) { | 422 | if ( me->type() == QEvent::MouseButtonRelease ) { |
422 | mNewItemPopup->removeEventFilter( this ); | 423 | mNewItemPopup->removeEventFilter( this ); |
423 | int dX = me->globalPos().x() - mPopupPos.x();; | 424 | int dX = me->globalPos().x() - mPopupPos.x();; |
424 | if ( dX < 0 ) | 425 | if ( dX < 0 ) |
425 | dX = -dX; | 426 | dX = -dX; |
426 | int dY = me->globalPos().y() - mPopupPos.y(); | 427 | int dY = me->globalPos().y() - mPopupPos.y(); |
427 | if ( dY < 0 ) | 428 | if ( dY < 0 ) |
428 | dY = -dY; | 429 | dY = -dY; |
429 | if ( dX > blockmoveDist || dY > blockmoveDist ) { | 430 | if ( dX > blockmoveDist || dY > blockmoveDist ) { |
430 | mNewItemPopup->hide(); | 431 | mNewItemPopup->hide(); |
431 | } | 432 | } |
432 | } | 433 | } |
433 | return true; | 434 | return true; |
434 | } | 435 | } |
435 | if ( object == mAllAgendaPopup ) { | 436 | if ( object == mAllAgendaPopup ) { |
436 | //qDebug(" mAllAgendaPopup "); | 437 | //qDebug(" mAllAgendaPopup "); |
437 | if ( me->type() == QEvent::MouseButtonRelease ) { | 438 | if ( me->type() == QEvent::MouseButtonRelease ) { |
438 | mAllAgendaPopup->removeEventFilter( this ); | 439 | mAllAgendaPopup->removeEventFilter( this ); |
439 | int dX = me->globalPos().x() - mPopupPos.x();; | 440 | int dX = me->globalPos().x() - mPopupPos.x();; |
440 | if ( dX < 0 ) | 441 | if ( dX < 0 ) |
441 | dX = -dX; | 442 | dX = -dX; |
442 | int dY = me->globalPos().y() - mPopupPos.y(); | 443 | int dY = me->globalPos().y() - mPopupPos.y(); |
443 | if ( dY < 0 ) | 444 | if ( dY < 0 ) |
444 | dY = -dY; | 445 | dY = -dY; |
445 | if ( dX > blockmoveDist || dY > blockmoveDist ) { | 446 | if ( dX > blockmoveDist || dY > blockmoveDist ) { |
446 | mAllAgendaPopup->hide(); | 447 | mAllAgendaPopup->hide(); |
447 | } | 448 | } |
448 | } | 449 | } |
449 | return true; | 450 | return true; |
450 | } | 451 | } |
451 | QPoint viewportPos; | 452 | QPoint viewportPos; |
452 | if (object != viewport()) { | 453 | if (object != viewport()) { |
453 | viewportPos = ((QWidget *)object)->mapToParent(me->pos()); | 454 | viewportPos = ((QWidget *)object)->mapToParent(me->pos()); |
454 | } else { | 455 | } else { |
455 | viewportPos = me->pos(); | 456 | viewportPos = me->pos(); |
456 | } | 457 | } |
457 | 458 | ||
458 | switch (me->type()) { | 459 | switch (me->type()) { |
459 | case QEvent::MouseButtonPress: | 460 | case QEvent::MouseButtonPress: |
460 | if (me->button() == LeftButton) { | 461 | if (me->button() == LeftButton) { |
461 | mPopupTimer->start( 600 ); | 462 | mPopupTimer->start( 600 ); |
462 | mLeftMouseDown = true; | 463 | mLeftMouseDown = true; |
463 | } | 464 | } |
464 | blockMoving = true; | 465 | blockMoving = true; |
465 | startX = viewportPos.x(); | 466 | startX = viewportPos.x(); |
466 | startY = viewportPos.y(); | 467 | startY = viewportPos.y(); |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index e8c7c76..a571ed4 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -167,128 +167,129 @@ KOPrefs::KOPrefs() : | |||
167 | KPrefs::setCurrentGroup("Fonts"); | 167 | KPrefs::setCurrentGroup("Fonts"); |
168 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); | 168 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); |
169 | QFont fon = KGlobalSettings::generalFont(); | 169 | QFont fon = KGlobalSettings::generalFont(); |
170 | addItemFont("TimeBar Font",&mTimeBarFont,fon ); | 170 | addItemFont("TimeBar Font",&mTimeBarFont,fon ); |
171 | addItemFont("MonthView Font",&mMonthViewFont,fon); | 171 | addItemFont("MonthView Font",&mMonthViewFont,fon); |
172 | addItemFont("AgendaView Font",&mAgendaViewFont,fon); | 172 | addItemFont("AgendaView Font",&mAgendaViewFont,fon); |
173 | addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); | 173 | addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); |
174 | addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); | 174 | addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); |
175 | addItemFont("TodoView Font",&mTodoViewFont,fon); | 175 | addItemFont("TodoView Font",&mTodoViewFont,fon); |
176 | addItemFont("ListView Font",&mListViewFont,fon); | 176 | addItemFont("ListView Font",&mListViewFont,fon); |
177 | addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); | 177 | addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); |
178 | addItemFont("EditBox Font",&mEditBoxFont,fon); | 178 | addItemFont("EditBox Font",&mEditBoxFont,fon); |
179 | addItemFont("JournalView Font",&mJornalViewFont,fon); | 179 | addItemFont("JournalView Font",&mJornalViewFont,fon); |
180 | addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); | 180 | addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); |
181 | addItemFont("EventView Font",&mEventViewFont,fon); | 181 | addItemFont("EventView Font",&mEventViewFont,fon); |
182 | 182 | ||
183 | KPrefs::setCurrentGroup("RemoteSyncing"); | 183 | KPrefs::setCurrentGroup("RemoteSyncing"); |
184 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); | 184 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); |
185 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); | 185 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); |
186 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); | 186 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); |
187 | addItemInt("LastSyncTime",&mLastSyncTime,0); | 187 | addItemInt("LastSyncTime",&mLastSyncTime,0); |
188 | 188 | ||
189 | #ifdef _WIN32_ | 189 | #ifdef _WIN32_ |
190 | QString hdp= locateLocal("data","korganizer")+"\\\\"; | 190 | QString hdp= locateLocal("data","korganizer")+"\\\\"; |
191 | #else | 191 | #else |
192 | QString hdp= locateLocal("data","korganizer")+"/"; | 192 | QString hdp= locateLocal("data","korganizer")+"/"; |
193 | #endif | 193 | #endif |
194 | 194 | ||
195 | KPrefs::setCurrentGroup("LoadSaveFileNames"); | 195 | KPrefs::setCurrentGroup("LoadSaveFileNames"); |
196 | 196 | ||
197 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); | 197 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); |
198 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); | 198 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); |
199 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); | 199 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); |
200 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); | 200 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); |
201 | 201 | ||
202 | 202 | ||
203 | KPrefs::setCurrentGroup("Locale"); | 203 | KPrefs::setCurrentGroup("Locale"); |
204 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 204 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
205 | 205 | ||
206 | 206 | ||
207 | KPrefs::setCurrentGroup("Colors"); | 207 | KPrefs::setCurrentGroup("Colors"); |
208 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); | 208 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); |
209 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); | 209 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); |
210 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); | 210 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); |
211 | addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); | 211 | addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); |
212 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); | 212 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); |
213 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); | 213 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); |
214 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); | 214 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); |
215 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); | 215 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); |
216 | addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor); | 216 | addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor); |
217 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); | 217 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); |
218 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); | 218 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); |
219 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); | 219 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); |
220 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); | 220 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); |
221 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); | 221 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); |
222 | addItemBool("MonthViewWeek",&mMonthViewWeek,false); | 222 | addItemBool("MonthViewWeek",&mMonthViewWeek,false); |
223 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); | 223 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); |
224 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); | 224 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); |
225 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); | 225 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); |
226 | addItemBool("UseAppColors",&mUseAppColors,false); | 226 | addItemBool("UseAppColors",&mUseAppColors,false); |
227 | 227 | ||
228 | 228 | ||
229 | 229 | ||
230 | KPrefs::setCurrentGroup("Views"); | 230 | KPrefs::setCurrentGroup("Views"); |
231 | addItemBool("Block Popup Menu",&mBlockPopupMenu,true); | ||
231 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); | 232 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); |
232 | addItemInt("Hour Size",&mHourSize,8); | 233 | addItemInt("Hour Size",&mHourSize,8); |
233 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); | 234 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); |
234 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); | 235 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); |
235 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); | 236 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); |
236 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); | 237 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); |
237 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); | 238 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); |
238 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); | 239 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); |
239 | #ifdef DESKTOP_VERION | 240 | #ifdef DESKTOP_VERION |
240 | addItemBool("Enable ToolTips",&mEnableToolTips,true); | 241 | addItemBool("Enable ToolTips",&mEnableToolTips,true); |
241 | #else | 242 | #else |
242 | addItemBool("Enable ToolTips",&mEnableToolTips,false); | 243 | addItemBool("Enable ToolTips",&mEnableToolTips,false); |
243 | #endif | 244 | #endif |
244 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); | 245 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); |
245 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); | 246 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); |
246 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); | 247 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); |
247 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); | 248 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); |
248 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); | 249 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); |
249 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); | 250 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); |
250 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); | 251 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); |
251 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); | 252 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); |
252 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); | 253 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); |
253 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; | 254 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; |
254 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); | 255 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); |
255 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); | 256 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); |
256 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); | 257 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); |
257 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); | 258 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); |
258 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); | 259 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); |
259 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); | 260 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); |
260 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); | 261 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); |
261 | addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); | 262 | addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); |
262 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); | 263 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); |
263 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); | 264 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); |
264 | #ifdef DESKTOP_VERSION | 265 | #ifdef DESKTOP_VERSION |
265 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); | 266 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); |
266 | #else | 267 | #else |
267 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); | 268 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); |
268 | #endif | 269 | #endif |
269 | addItemInt("Day Begins",&mDayBegins,7); | 270 | addItemInt("Day Begins",&mDayBegins,7); |
270 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); | 271 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); |
271 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); | 272 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); |
272 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); | 273 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); |
273 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); | 274 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); |
274 | 275 | ||
275 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); | 276 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); |
276 | addItemBool("Full View Month",&mFullViewMonth,true); | 277 | addItemBool("Full View Month",&mFullViewMonth,true); |
277 | addItemBool("Full View Todo",&mFullViewTodo,true); | 278 | addItemBool("Full View Todo",&mFullViewTodo,true); |
278 | addItemBool("Quick Todo",&mEnableQuickTodo,false); | 279 | addItemBool("Quick Todo",&mEnableQuickTodo,false); |
279 | 280 | ||
280 | addItemInt("Next X Days",&mNextXDays,3); | 281 | addItemInt("Next X Days",&mNextXDays,3); |
281 | 282 | ||
282 | KPrefs::setCurrentGroup("Printer"); | 283 | KPrefs::setCurrentGroup("Printer"); |
283 | 284 | ||
284 | KPrefs::setCurrentGroup("Layout"); | 285 | KPrefs::setCurrentGroup("Layout"); |
285 | 286 | ||
286 | addItemBool("CompactDialogs",&mCompactDialogs,false); | 287 | addItemBool("CompactDialogs",&mCompactDialogs,false); |
287 | addItemBool("VerticalScreen",&mVerticalScreen,true); | 288 | addItemBool("VerticalScreen",&mVerticalScreen,true); |
288 | 289 | ||
289 | KPrefs::setCurrentGroup("KOrganizer Plugins"); | 290 | KPrefs::setCurrentGroup("KOrganizer Plugins"); |
290 | 291 | ||
291 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); | 292 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); |
292 | 293 | ||
293 | KPrefs::setCurrentGroup("Group Scheduling"); | 294 | KPrefs::setCurrentGroup("Group Scheduling"); |
294 | 295 | ||
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index d511faa..2a0ee64 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -160,128 +160,130 @@ class KOPrefs : public KPimPrefs | |||
160 | bool mMonthWeeklyRecur; | 160 | bool mMonthWeeklyRecur; |
161 | bool mMonthShowIcons; | 161 | bool mMonthShowIcons; |
162 | bool mMonthShowShort; | 162 | bool mMonthShowShort; |
163 | bool mEnableToolTips; | 163 | bool mEnableToolTips; |
164 | bool mEnableMonthScroll; | 164 | bool mEnableMonthScroll; |
165 | bool mFullViewMonth; | 165 | bool mFullViewMonth; |
166 | bool mMonthViewUsesCategoryColor; | 166 | bool mMonthViewUsesCategoryColor; |
167 | bool mFullViewTodo; | 167 | bool mFullViewTodo; |
168 | bool mShowCompletedTodo; | 168 | bool mShowCompletedTodo; |
169 | bool mMarcusBainsEnabled; | 169 | bool mMarcusBainsEnabled; |
170 | int mNextXDays; | 170 | int mNextXDays; |
171 | int mWhatsNextDays; | 171 | int mWhatsNextDays; |
172 | int mWhatsNextPrios; | 172 | int mWhatsNextPrios; |
173 | bool mEnableQuickTodo; | 173 | bool mEnableQuickTodo; |
174 | 174 | ||
175 | bool mCompactDialogs; | 175 | bool mCompactDialogs; |
176 | bool mVerticalScreen; | 176 | bool mVerticalScreen; |
177 | 177 | ||
178 | bool mShowIconNewTodo; | 178 | bool mShowIconNewTodo; |
179 | bool mShowIconNewEvent; | 179 | bool mShowIconNewEvent; |
180 | bool mShowIconSearch; | 180 | bool mShowIconSearch; |
181 | bool mShowIconList; | 181 | bool mShowIconList; |
182 | bool mShowIconDay1; | 182 | bool mShowIconDay1; |
183 | bool mShowIconDay5; | 183 | bool mShowIconDay5; |
184 | bool mShowIconDay6; | 184 | bool mShowIconDay6; |
185 | bool mShowIconDay7; | 185 | bool mShowIconDay7; |
186 | bool mShowIconMonth; | 186 | bool mShowIconMonth; |
187 | bool mShowIconTodoview; | 187 | bool mShowIconTodoview; |
188 | bool mShowIconBackFast; | 188 | bool mShowIconBackFast; |
189 | bool mShowIconBack; | 189 | bool mShowIconBack; |
190 | bool mShowIconToday; | 190 | bool mShowIconToday; |
191 | bool mShowIconForward; | 191 | bool mShowIconForward; |
192 | bool mShowIconForwardFast; | 192 | bool mShowIconForwardFast; |
193 | bool mShowIconWhatsThis; | 193 | bool mShowIconWhatsThis; |
194 | bool mShowIconWeekNum; | 194 | bool mShowIconWeekNum; |
195 | bool mShowIconNextDays; | 195 | bool mShowIconNextDays; |
196 | bool mShowIconNext; | 196 | bool mShowIconNext; |
197 | bool mShowIconJournal; | 197 | bool mShowIconJournal; |
198 | bool mShowIconFilter; | 198 | bool mShowIconFilter; |
199 | bool mShowIconOnetoolbar; | 199 | bool mShowIconOnetoolbar; |
200 | bool mShowIconNavigator; | 200 | bool mShowIconNavigator; |
201 | bool mShowIconAllday; | 201 | bool mShowIconAllday; |
202 | bool mShowIconFilterview; | 202 | bool mShowIconFilterview; |
203 | bool mShowIconToggleFull; | 203 | bool mShowIconToggleFull; |
204 | 204 | ||
205 | bool mShowIconStretch; | 205 | bool mShowIconStretch; |
206 | 206 | ||
207 | bool mToolBarHor; | 207 | bool mToolBarHor; |
208 | bool mToolBarUp; | 208 | bool mToolBarUp; |
209 | bool mToolBarHorV; | 209 | bool mToolBarHorV; |
210 | bool mToolBarUpV; | 210 | bool mToolBarUpV; |
211 | bool mToolBarHorN; | 211 | bool mToolBarHorN; |
212 | bool mToolBarUpN; | 212 | bool mToolBarUpN; |
213 | bool mToolBarHorF; | 213 | bool mToolBarHorF; |
214 | bool mToolBarUpF; | 214 | bool mToolBarUpF; |
215 | bool mToolBarMiniIcons; | 215 | bool mToolBarMiniIcons; |
216 | 216 | ||
217 | bool mAskForQuit; | 217 | bool mAskForQuit; |
218 | bool mUsePassWd; | 218 | bool mUsePassWd; |
219 | bool mShowSyncEvents; | 219 | bool mShowSyncEvents; |
220 | bool mShowTodoInAgenda; | 220 | bool mShowTodoInAgenda; |
221 | bool mShowTimeInAgenda; | 221 | bool mShowTimeInAgenda; |
222 | bool mHideNonStartedTodos; | 222 | bool mHideNonStartedTodos; |
223 | 223 | ||
224 | bool mBlockPopupMenu; | ||
225 | |||
224 | int mLastSyncTime; | 226 | int mLastSyncTime; |
225 | void setCategoryColor(QString cat,const QColor & color); | 227 | void setCategoryColor(QString cat,const QColor & color); |
226 | QColor *categoryColor(QString cat); | 228 | QColor *categoryColor(QString cat); |
227 | 229 | ||
228 | QString mArchiveFile; | 230 | QString mArchiveFile; |
229 | QString mHtmlExportFile; | 231 | QString mHtmlExportFile; |
230 | bool mHtmlWithSave; | 232 | bool mHtmlWithSave; |
231 | 233 | ||
232 | QStringList mSelectedPlugins; | 234 | QStringList mSelectedPlugins; |
233 | 235 | ||
234 | QString mLastImportFile; | 236 | QString mLastImportFile; |
235 | QString mLastVcalFile; | 237 | QString mLastVcalFile; |
236 | QString mLastSaveFile; | 238 | QString mLastSaveFile; |
237 | QString mLastLoadFile; | 239 | QString mLastLoadFile; |
238 | 240 | ||
239 | 241 | ||
240 | QString mDefaultAlarmFile; | 242 | QString mDefaultAlarmFile; |
241 | int mIMIPScheduler; | 243 | int mIMIPScheduler; |
242 | int mIMIPSend; | 244 | int mIMIPSend; |
243 | QStringList mAdditionalMails; | 245 | QStringList mAdditionalMails; |
244 | int mIMIPAutoRefresh; | 246 | int mIMIPAutoRefresh; |
245 | int mIMIPAutoInsertReply; | 247 | int mIMIPAutoInsertReply; |
246 | int mIMIPAutoInsertRequest; | 248 | int mIMIPAutoInsertRequest; |
247 | int mIMIPAutoFreeBusy; | 249 | int mIMIPAutoFreeBusy; |
248 | int mIMIPAutoFreeBusyReply; | 250 | int mIMIPAutoFreeBusyReply; |
249 | 251 | ||
250 | QStringList mTodoTemplates; | 252 | QStringList mTodoTemplates; |
251 | QStringList mEventTemplates; | 253 | QStringList mEventTemplates; |
252 | 254 | ||
253 | int mDestination; | 255 | int mDestination; |
254 | 256 | ||
255 | 257 | ||
256 | bool mEditOnDoubleClick; | 258 | bool mEditOnDoubleClick; |
257 | bool mViewChangeHoldFullscreen; | 259 | bool mViewChangeHoldFullscreen; |
258 | bool mViewChangeHoldNonFullscreen; | 260 | bool mViewChangeHoldNonFullscreen; |
259 | bool mCenterOnCurrentTime; | 261 | bool mCenterOnCurrentTime; |
260 | bool mSetTimeToDayStartAt; | 262 | bool mSetTimeToDayStartAt; |
261 | bool mHighlightCurrentDay; | 263 | bool mHighlightCurrentDay; |
262 | bool mUseHighlightLightColor; | 264 | bool mUseHighlightLightColor; |
263 | bool mListViewMonthTimespan; | 265 | bool mListViewMonthTimespan; |
264 | bool mWNViewShowsParents; | 266 | bool mWNViewShowsParents; |
265 | bool mWNViewShowsPast; | 267 | bool mWNViewShowsPast; |
266 | bool mWNViewShowLocation; | 268 | bool mWNViewShowLocation; |
267 | bool mTodoViewShowsPercentage; | 269 | bool mTodoViewShowsPercentage; |
268 | bool mTodoViewUsesCatColors; | 270 | bool mTodoViewUsesCatColors; |
269 | bool mMonthViewUsesBigFont; | 271 | bool mMonthViewUsesBigFont; |
270 | bool mTodoViewUsesSmallFont; | 272 | bool mTodoViewUsesSmallFont; |
271 | bool mTodoViewUsesForegroundColor; | 273 | bool mTodoViewUsesForegroundColor; |
272 | bool mMonthViewUsesForegroundColor; | 274 | bool mMonthViewUsesForegroundColor; |
273 | 275 | ||
274 | bool mHightlightDateTimeEdit; | 276 | bool mHightlightDateTimeEdit; |
275 | bool mShortDateInViewer; | 277 | bool mShortDateInViewer; |
276 | 278 | ||
277 | bool mShowDateNavigator; | 279 | bool mShowDateNavigator; |
278 | 280 | ||
279 | QStringList mLocationDefaults; | 281 | QStringList mLocationDefaults; |
280 | QStringList mEventSummaryUser; | 282 | QStringList mEventSummaryUser; |
281 | QStringList mTodoSummaryUser; | 283 | QStringList mTodoSummaryUser; |
282 | 284 | ||
283 | bool mUseInternalAlarmNotification; | 285 | bool mUseInternalAlarmNotification; |
284 | int mAlarmPlayBeeps; | 286 | int mAlarmPlayBeeps; |
285 | int mAlarmSuspendTime; | 287 | int mAlarmSuspendTime; |
286 | int mAlarmSuspendCount; | 288 | int mAlarmSuspendCount; |
287 | int mAlarmBeepInterval; | 289 | int mAlarmBeepInterval; |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index a8943de..ad3c61c 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -320,170 +320,178 @@ void KOPrefsDialog::setupSyncTab() | |||
320 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); | 320 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); |
321 | topLayout->addWidget(lab ,iii,0); | 321 | topLayout->addWidget(lab ,iii,0); |
322 | topLayout->addWidget(mLocalTempFile,iii,1); | 322 | topLayout->addWidget(mLocalTempFile,iii,1); |
323 | ++iii; | 323 | ++iii; |
324 | 324 | ||
325 | KPrefsDialogWidBool *wb = | 325 | KPrefsDialogWidBool *wb = |
326 | addWidBool(i18n("Write back synced file"), | 326 | addWidBool(i18n("Write back synced file"), |
327 | &(KOPrefs::instance()->mWriteBackFile),topFrame); | 327 | &(KOPrefs::instance()->mWriteBackFile),topFrame); |
328 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 328 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
329 | ++iii; | 329 | ++iii; |
330 | wb = | 330 | wb = |
331 | addWidBool(i18n("Write back existing entries only"), | 331 | addWidBool(i18n("Write back existing entries only"), |
332 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); | 332 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); |
333 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 333 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
334 | ++iii; | 334 | ++iii; |
335 | 335 | ||
336 | #endif | 336 | #endif |
337 | } | 337 | } |
338 | 338 | ||
339 | void KOPrefsDialog::setupMainTab() | 339 | void KOPrefsDialog::setupMainTab() |
340 | { | 340 | { |
341 | QFrame *topFrame = addPage(i18n("General"),0,0); | 341 | QFrame *topFrame = addPage(i18n("General"),0,0); |
342 | // DesktopIcon("identity",KIcon::SizeMedium)); | 342 | // DesktopIcon("identity",KIcon::SizeMedium)); |
343 | 343 | ||
344 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 344 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
345 | topLayout->setSpacing(mSpacingHint); | 345 | topLayout->setSpacing(mSpacingHint); |
346 | topLayout->setMargin(mMarginHint); | 346 | topLayout->setMargin(mMarginHint); |
347 | 347 | ||
348 | // KPrefsDialogWidBool *emailControlCenter = | 348 | // KPrefsDialogWidBool *emailControlCenter = |
349 | // addWidBool(i18n("&Use email settings from Control Center"), | 349 | // addWidBool(i18n("&Use email settings from Control Center"), |
350 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 350 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
351 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 351 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
352 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 352 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
353 | // SLOT(toggleEmailSettings(bool))); | 353 | // SLOT(toggleEmailSettings(bool))); |
354 | 354 | ||
355 | mNameEdit = new QLineEdit(topFrame); | 355 | mNameEdit = new QLineEdit(topFrame); |
356 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 356 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
357 | topLayout->addWidget(mNameLabel,0,0); | 357 | topLayout->addWidget(mNameLabel,0,0); |
358 | topLayout->addWidget(mNameEdit,0,1); | 358 | topLayout->addWidget(mNameEdit,0,1); |
359 | 359 | ||
360 | mEmailEdit = new QLineEdit(topFrame); | 360 | mEmailEdit = new QLineEdit(topFrame); |
361 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 361 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
362 | topLayout->addWidget(mEmailLabel,1,0); | 362 | topLayout->addWidget(mEmailLabel,1,0); |
363 | topLayout->addWidget(mEmailEdit,1,1); | 363 | topLayout->addWidget(mEmailEdit,1,1); |
364 | KPrefsDialogWidBool *wb; | 364 | KPrefsDialogWidBool *wb; |
365 | 365 | ||
366 | 366 | ||
367 | 367 | ||
368 | KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), | 368 | KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), |
369 | &(KOPrefs::instance()->mShowFullMenu),topFrame); | 369 | &(KOPrefs::instance()->mShowFullMenu),topFrame); |
370 | topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); | 370 | topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); |
371 | 371 | ||
372 | 372 | ||
373 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), | 373 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), |
374 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); | 374 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); |
375 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); | 375 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); |
376 | 376 | ||
377 | 377 | ||
378 | KPrefsDialogWidBool *verticalScreen = | 378 | KPrefsDialogWidBool *verticalScreen = |
379 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 379 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
380 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 380 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
381 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 381 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
382 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); | 382 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); |
383 | 383 | ||
384 | 384 | ||
385 | int iii = 5; | ||
386 | widbool = addWidBool(i18n("Block popup until mouse button release"), | ||
387 | &(KOPrefs::instance()->mBlockPopupMenu),topFrame); | ||
388 | topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); | ||
389 | ++iii; | ||
385 | QHBox *dummy = new QHBox(topFrame); | 390 | QHBox *dummy = new QHBox(topFrame); |
386 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 391 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
387 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 392 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
388 | 393 | ||
389 | topLayout->addMultiCellWidget(dummy,5,5,0,1); | 394 | topLayout->addMultiCellWidget(dummy,iii,iii,0,1); |
390 | 395 | ||
396 | ++iii; | ||
391 | 397 | ||
392 | 398 | ||
393 | // KPrefsDialogWidBool *bcc = | 399 | // KPrefsDialogWidBool *bcc = |
394 | // addWidBool(i18n("Send copy to owner when mailing events"), | 400 | // addWidBool(i18n("Send copy to owner when mailing events"), |
395 | // &(KOPrefs::instance()->mBcc),topFrame); | 401 | // &(KOPrefs::instance()->mBcc),topFrame); |
396 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 402 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
397 | 403 | ||
398 | 404 | ||
399 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 405 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
400 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 406 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
401 | 407 | ||
402 | // addWidBool(i18n("Enable automatic saving of calendar"), | 408 | // addWidBool(i18n("Enable automatic saving of calendar"), |
403 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 409 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
404 | 410 | ||
405 | QHBox *intervalBox = new QHBox(topFrame); | 411 | QHBox *intervalBox = new QHBox(topFrame); |
406 | // intervalBox->setSpacing(mSpacingHint); | 412 | // intervalBox->setSpacing(mSpacingHint); |
407 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); | 413 | topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); |
414 | ++iii; | ||
408 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 415 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
409 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 416 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
410 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 417 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
411 | /* | 418 | /* |
412 | QHBox * agendasize = new QHBox ( topFrame ); | 419 | QHBox * agendasize = new QHBox ( topFrame ); |
413 | 420 | ||
414 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 421 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
415 | 422 | ||
416 | 423 | ||
417 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 424 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
418 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 425 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
419 | */ | 426 | */ |
420 | 427 | ||
421 | 428 | ||
422 | KPrefsDialogWidBool *ask = | 429 | KPrefsDialogWidBool *ask = |
423 | addWidBool(i18n("Ask for quit when closing KO/Pi"), | 430 | addWidBool(i18n("Ask for quit when closing KO/Pi"), |
424 | &(KOPrefs::instance()->mAskForQuit),topFrame); | 431 | &(KOPrefs::instance()->mAskForQuit),topFrame); |
425 | topLayout->addMultiCellWidget(ask->checkBox(),7,7,0,1); | 432 | topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1); |
433 | ++iii; | ||
426 | 434 | ||
427 | 435 | ||
428 | /* | 436 | /* |
429 | KPrefsDialogWidBool *confirmCheck = | 437 | KPrefsDialogWidBool *confirmCheck = |
430 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), | 438 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), |
431 | topFrame); | 439 | topFrame); |
432 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); | 440 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); |
433 | 441 | ||
434 | 442 | ||
435 | mEnableGroupScheduling = | 443 | mEnableGroupScheduling = |
436 | addWidBool(i18n("Enable group scheduling"), | 444 | addWidBool(i18n("Enable group scheduling"), |
437 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); | 445 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); |
438 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); | 446 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); |
439 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), | 447 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), |
440 | SLOT(warningGroupScheduling())); | 448 | SLOT(warningGroupScheduling())); |
441 | 449 | ||
442 | mEnableProjectView = | 450 | mEnableProjectView = |
443 | addWidBool(i18n("Enable project view"), | 451 | addWidBool(i18n("Enable project view"), |
444 | &(KOPrefs::instance()->mEnableProjectView),topFrame); | 452 | &(KOPrefs::instance()->mEnableProjectView),topFrame); |
445 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); | 453 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); |
446 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), | 454 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), |
447 | SLOT(warningProjectView())); | 455 | SLOT(warningProjectView())); |
448 | 456 | ||
449 | // Can't be disabled anymore | 457 | // Can't be disabled anymore |
450 | mEnableGroupScheduling->checkBox()->hide(); | 458 | mEnableGroupScheduling->checkBox()->hide(); |
451 | 459 | ||
452 | // Disable setting, because this feature now becomes stable | 460 | // Disable setting, because this feature now becomes stable |
453 | mEnableProjectView->checkBox()->hide(); | 461 | mEnableProjectView->checkBox()->hide(); |
454 | 462 | ||
455 | KPrefsDialogWidRadios *defaultFormatGroup = | 463 | KPrefsDialogWidRadios *defaultFormatGroup = |
456 | addWidRadios(i18n("Default Calendar Format"), | 464 | addWidRadios(i18n("Default Calendar Format"), |
457 | &(KOPrefs::instance()->mDefaultFormat),topFrame); | 465 | &(KOPrefs::instance()->mDefaultFormat),topFrame); |
458 | defaultFormatGroup->addRadio(i18n("vCalendar")); | 466 | defaultFormatGroup->addRadio(i18n("vCalendar")); |
459 | defaultFormatGroup->addRadio(i18n("iCalendar")); | 467 | defaultFormatGroup->addRadio(i18n("iCalendar")); |
460 | 468 | ||
461 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); | 469 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); |
462 | 470 | ||
463 | // Default format unconditionally is iCalendar | 471 | // Default format unconditionally is iCalendar |
464 | defaultFormatGroup->groupBox()->hide(); | 472 | defaultFormatGroup->groupBox()->hide(); |
465 | 473 | ||
466 | KPrefsDialogWidRadios *mailClientGroup = | 474 | KPrefsDialogWidRadios *mailClientGroup = |
467 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), | 475 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), |
468 | topFrame); | 476 | topFrame); |
469 | mailClientGroup->addRadio(i18n("KMail")); | 477 | mailClientGroup->addRadio(i18n("KMail")); |
470 | mailClientGroup->addRadio(i18n("Sendmail")); | 478 | mailClientGroup->addRadio(i18n("Sendmail")); |
471 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); | 479 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); |
472 | 480 | ||
473 | KPrefsDialogWidBool *htmlsave = | 481 | KPrefsDialogWidBool *htmlsave = |
474 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), | 482 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), |
475 | topFrame); | 483 | topFrame); |
476 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); | 484 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); |
477 | 485 | ||
478 | KPrefsDialogWidRadios *destinationGroup = | 486 | KPrefsDialogWidRadios *destinationGroup = |
479 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), | 487 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), |
480 | topFrame); | 488 | topFrame); |
481 | destinationGroup->addRadio(i18n("be added to the standard resource")); | 489 | destinationGroup->addRadio(i18n("be added to the standard resource")); |
482 | destinationGroup->addRadio(i18n("be asked which resource to use")); | 490 | destinationGroup->addRadio(i18n("be asked which resource to use")); |
483 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); | 491 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); |
484 | 492 | ||
485 | topLayout->setRowStretch(14,1); | 493 | topLayout->setRowStretch(14,1); |
486 | */ | 494 | */ |
487 | } | 495 | } |
488 | 496 | ||
489 | 497 | ||
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 9b5d4ce..7817a75 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1034,140 +1034,141 @@ void KOTodoView::setNewPercentage(int index) | |||
1034 | KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); | 1034 | KOTodoViewItem* par = (static_cast<KOTodoViewItem*>(mActiveItem->parent())); |
1035 | if ( par && par->isOn() ) | 1035 | if ( par && par->isOn() ) |
1036 | par->setOn( false ); | 1036 | par->setOn( false ); |
1037 | } | 1037 | } |
1038 | if (mPercentage[index] == 100) { | 1038 | if (mPercentage[index] == 100) { |
1039 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); | 1039 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); |
1040 | } else { | 1040 | } else { |
1041 | mActiveItem->todo()->setCompleted(false); | 1041 | mActiveItem->todo()->setCompleted(false); |
1042 | } | 1042 | } |
1043 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); | 1043 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); |
1044 | mActiveItem->construct(); | 1044 | mActiveItem->construct(); |
1045 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); | 1045 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); |
1046 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1046 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1047 | } | 1047 | } |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | 1050 | ||
1051 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) | 1051 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) |
1052 | { | 1052 | { |
1053 | QPopupMenu* tempMenu = new QPopupMenu (this); | 1053 | QPopupMenu* tempMenu = new QPopupMenu (this); |
1054 | QStringList checkedCategories = todoItem->todo()->categories (); | 1054 | QStringList checkedCategories = todoItem->todo()->categories (); |
1055 | 1055 | ||
1056 | tempMenu->setCheckable (true); | 1056 | tempMenu->setCheckable (true); |
1057 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); | 1057 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); |
1058 | it != KOPrefs::instance()->mCustomCategories.end (); | 1058 | it != KOPrefs::instance()->mCustomCategories.end (); |
1059 | ++it) { | 1059 | ++it) { |
1060 | int index = tempMenu->insertItem (*it); | 1060 | int index = tempMenu->insertItem (*it); |
1061 | mCategory[index] = *it; | 1061 | mCategory[index] = *it; |
1062 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); | 1062 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); | 1065 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); |
1066 | return tempMenu; | 1066 | return tempMenu; |
1067 | 1067 | ||
1068 | 1068 | ||
1069 | } | 1069 | } |
1070 | void KOTodoView::changedCategories(int index) | 1070 | void KOTodoView::changedCategories(int index) |
1071 | { | 1071 | { |
1072 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1072 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1073 | QStringList categories = mActiveItem->todo()->categories (); | 1073 | QStringList categories = mActiveItem->todo()->categories (); |
1074 | QString colcat = categories.first(); | 1074 | QString colcat = categories.first(); |
1075 | if (categories.find (mCategory[index]) != categories.end ()) | 1075 | if (categories.find (mCategory[index]) != categories.end ()) |
1076 | categories.remove (mCategory[index]); | 1076 | categories.remove (mCategory[index]); |
1077 | else | 1077 | else |
1078 | categories.insert (categories.end(), mCategory[index]); | 1078 | categories.insert (categories.end(), mCategory[index]); |
1079 | categories.sort (); | 1079 | categories.sort (); |
1080 | if ( !colcat.isEmpty() ) { | 1080 | if ( !colcat.isEmpty() ) { |
1081 | if ( categories.find ( colcat ) != categories.end () ) { | 1081 | if ( categories.find ( colcat ) != categories.end () ) { |
1082 | categories.remove( colcat ); | 1082 | categories.remove( colcat ); |
1083 | categories.prepend( colcat ); | 1083 | categories.prepend( colcat ); |
1084 | } | 1084 | } |
1085 | } | 1085 | } |
1086 | mActiveItem->todo()->setCategories (categories); | 1086 | mActiveItem->todo()->setCategories (categories); |
1087 | mActiveItem->construct(); | 1087 | mActiveItem->construct(); |
1088 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1088 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1089 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); | 1089 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); |
1090 | } | 1090 | } |
1091 | } | 1091 | } |
1092 | void KOTodoView::itemDoubleClicked(QListViewItem *item) | 1092 | void KOTodoView::itemDoubleClicked(QListViewItem *item) |
1093 | { | 1093 | { |
1094 | if ( pendingSubtodo != 0 ) { | 1094 | if ( pendingSubtodo != 0 ) { |
1095 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1095 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1096 | } | 1096 | } |
1097 | pendingSubtodo = 0; | 1097 | pendingSubtodo = 0; |
1098 | int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); | 1098 | //int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); |
1099 | //qDebug("ROW %d ", row); | 1099 | int row = mTodoListView->header()->sectionAt ( mTodoListView->viewportToContents(mTodoListView->viewport()->mapFromGlobal( QCursor::pos())) .x() ); |
1100 | qDebug("ROW %d ", row); | ||
1100 | if (!item) { | 1101 | if (!item) { |
1101 | newTodo(); | 1102 | newTodo(); |
1102 | return; | 1103 | return; |
1103 | } else { | 1104 | } else { |
1104 | if ( row == 2 ) { | 1105 | if ( row == 2 || row == 1 ) { |
1105 | mActiveItem = (KOTodoViewItem *) item; | 1106 | mActiveItem = (KOTodoViewItem *) item; |
1106 | newSubTodo(); | 1107 | newSubTodo(); |
1107 | return; | 1108 | return; |
1108 | } | 1109 | } |
1109 | if ( row == 1 ) { | 1110 | if ( row == 5 || row == 6 ) { |
1110 | mActiveItem = (KOTodoViewItem *) item; | 1111 | mActiveItem = (KOTodoViewItem *) item; |
1111 | toggleRunningItem(); | 1112 | toggleRunningItem(); |
1112 | return; | 1113 | return; |
1113 | } | 1114 | } |
1114 | } | 1115 | } |
1115 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 1116 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
1116 | editItem( item ); | 1117 | editItem( item ); |
1117 | else | 1118 | else |
1118 | showItem( item , QPoint(), 0 ); | 1119 | showItem( item , QPoint(), 0 ); |
1119 | } | 1120 | } |
1120 | void KOTodoView::toggleRunningItem() | 1121 | void KOTodoView::toggleRunningItem() |
1121 | { | 1122 | { |
1122 | // qDebug("KOTodoView::toggleRunning() "); | 1123 | // qDebug("KOTodoView::toggleRunning() "); |
1123 | if ( ! mActiveItem ) | 1124 | if ( ! mActiveItem ) |
1124 | return; | 1125 | return; |
1125 | Todo * t = mActiveItem->todo(); | 1126 | Todo * t = mActiveItem->todo(); |
1126 | if ( t->isRunning() ) { | 1127 | if ( t->isRunning() ) { |
1127 | int result = KMessageBox::warningContinueCancel(this, | 1128 | int result = KMessageBox::warningContinueCancel(this, |
1128 | i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true); | 1129 | i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true); |
1129 | if (result != KMessageBox::Continue) return; | 1130 | if (result != KMessageBox::Continue) return; |
1130 | t->setRunning( false ); | 1131 | t->setRunning( false ); |
1131 | mActiveItem->construct(); | 1132 | mActiveItem->construct(); |
1132 | } else { | 1133 | } else { |
1133 | int result = KMessageBox::warningContinueCancel(this, | 1134 | int result = KMessageBox::warningContinueCancel(this, |
1134 | i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true); | 1135 | i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true); |
1135 | if (result != KMessageBox::Continue) return; | 1136 | if (result != KMessageBox::Continue) return; |
1136 | t->setRunning( true ); | 1137 | t->setRunning( true ); |
1137 | mActiveItem->construct(); | 1138 | mActiveItem->construct(); |
1138 | } | 1139 | } |
1139 | } | 1140 | } |
1140 | 1141 | ||
1141 | void KOTodoView::itemClicked(QListViewItem *item) | 1142 | void KOTodoView::itemClicked(QListViewItem *item) |
1142 | { | 1143 | { |
1143 | //qDebug("KOTodoView::itemClicked %d", item); | 1144 | //qDebug("KOTodoView::itemClicked %d", item); |
1144 | if (!item) { | 1145 | if (!item) { |
1145 | if ( pendingSubtodo != 0 ) { | 1146 | if ( pendingSubtodo != 0 ) { |
1146 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1147 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1147 | } | 1148 | } |
1148 | pendingSubtodo = 0; | 1149 | pendingSubtodo = 0; |
1149 | return; | 1150 | return; |
1150 | } | 1151 | } |
1151 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 1152 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
1152 | if ( pendingSubtodo != 0 ) { | 1153 | if ( pendingSubtodo != 0 ) { |
1153 | bool allowReparent = true; | 1154 | bool allowReparent = true; |
1154 | QListViewItem *par = item; | 1155 | QListViewItem *par = item; |
1155 | while ( par ) { | 1156 | while ( par ) { |
1156 | if ( par == pendingSubtodo ) { | 1157 | if ( par == pendingSubtodo ) { |
1157 | allowReparent = false; | 1158 | allowReparent = false; |
1158 | break; | 1159 | break; |
1159 | } | 1160 | } |
1160 | par = par->parent(); | 1161 | par = par->parent(); |
1161 | } | 1162 | } |
1162 | if ( !allowReparent ) { | 1163 | if ( !allowReparent ) { |
1163 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); | 1164 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); |
1164 | qDebug("Recursive reparenting not possible "); | 1165 | qDebug("Recursive reparenting not possible "); |
1165 | pendingSubtodo = 0; | 1166 | pendingSubtodo = 0; |
1166 | } else { | 1167 | } else { |
1167 | Todo* newParent = todoItem->todo(); | 1168 | Todo* newParent = todoItem->todo(); |
1168 | Todo* newSub = pendingSubtodo->todo(); | 1169 | Todo* newSub = pendingSubtodo->todo(); |
1169 | pendingSubtodo = 0; | 1170 | pendingSubtodo = 0; |
1170 | emit reparentTodoSignal( newParent,newSub ); | 1171 | emit reparentTodoSignal( newParent,newSub ); |
1171 | return; | 1172 | return; |
1172 | } | 1173 | } |
1173 | } | 1174 | } |