summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt14
-rw-r--r--korganizer/calendarview.cpp45
-rw-r--r--korganizer/koprefs.cpp8
-rw-r--r--korganizer/koprefs.h9
-rw-r--r--korganizer/koprefsdialog.cpp52
-rw-r--r--korganizer/koprefsdialog.h2
6 files changed, 123 insertions, 7 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 1a1fd0e..fcfa282 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1498,13 +1498,13 @@
1498{ "Events with time","Termine mit Zeit" }, 1498{ "Events with time","Termine mit Zeit" },
1499{ "No conflict found","Kein Konflikt gefunden" }, 1499{ "No conflict found","Kein Konflikt gefunden" },
1500{ "Conflict %1 <-> %2","Konflikt %1 <-> %2" }, 1500{ "Conflict %1 <-> %2","Konflikt %1 <-> %2" },
1501{ "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " }, 1501{ "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " },
1502{ "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" }, 1502{ "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" },
1503{ "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" }, 1503{ "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" },
1504{ "KO/Pi Conflict delected","KO/Pi Konflikt erkannt" }, 1504{ "KO/Pi Conflict detected","KO/Pi Konflikt erkannt" },
1505{ "Show date","Zeige Datum" }, 1505{ "Show date","Zeige Datum" },
1506{ "No problem!","Null Problemo!" }, 1506{ "No problem!","Null Problemo!" },
1507{ "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, 1507{ "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" },
1508{ "Pi-Sync Port Error","Pi-Sync Port Fehler" }, 1508{ "Pi-Sync Port Error","Pi-Sync Port Fehler" },
1509{ "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, 1509{ "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" },
1510{ "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, 1510{ "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" },
@@ -1543,14 +1543,20 @@
1543{ "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." }, 1543{ "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." },
1544{ "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." }, 1544{ "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." },
1545{ "Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.","Klicken Sie diesen Knopf <b>um einen Kalender hinzuzufügen</b>. Sie können eine existierende Kalenderdatei hinzufügen oder einen neuen Kalender und KO/Pi legt dann eine neue leere Kalenderdatei für Sie an." }, 1545{ "Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.","Klicken Sie diesen Knopf <b>um einen Kalender hinzuzufügen</b>. Sie können eine existierende Kalenderdatei hinzufügen oder einen neuen Kalender und KO/Pi legt dann eine neue leere Kalenderdatei für Sie an." },
1546{ "<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)","<b>iCal (*.ics) Datei:</b><br>(Datei wird angelegt, wenn sie nicht existiert)" }, 1546{ "<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)","<b>iCal (*.ics) Datei:</b><br>(Datei wird angelegt, wenn sie nicht existiert)" },
1547{ "Error saving data","Fehler beim Abspeichern" }, 1547{ "Error saving data","Fehler beim Abspeichern" },
1548{ "Calendar(s) not saved:","Nicht gespeicherte Kalender:" }, 1548{ "Calendar(s) not saved:","Nicht gespeicherte Kalender:" },
1549{ "","" }, 1549{ "Enable conflict detection","Schalte Konflikterkennung an" },
1550{ "","" }, 1550{ "Conflict detection checks an <b>edited event</b> with other <b>existing events</b> for overlapping. You can define which events are checked:","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>. Sie können einstellen welche Termine überprüft werden:" },
1551{ "","" }, 1551{ "Filter for the edited event","Filter für den bearbeiteten Termin" },
1552{ "Filter for other existing events","Filter für die anderen Termine" },
1553{ "Check Allday with Allday","Prüfe GanzTag mit GanzTag" },
1554{ "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" },
1555{ "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" },
1556{ "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" },
1557{ "Conflict detection","Konflikterkennung" },
1552{ "","" }, 1558{ "","" },
1553{ "","" }, 1559{ "","" },
1554{ "","" }, 1560{ "","" },
1555{ "","" }, 1561{ "","" },
1556{ "","" }, 1562{ "","" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 26323b1..898da6c 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3033,12 +3033,21 @@ void CalendarView::changeEventDisplay(Event *which, int action)
3033 if ( action != KOGlobals::EVENTDELETED ) { 3033 if ( action != KOGlobals::EVENTDELETED ) {
3034 mConflictingEvent = which ; 3034 mConflictingEvent = which ;
3035 int time = 1000; 3035 int time = 1000;
3036#ifdef DESKTOP_VERSION 3036#ifdef DESKTOP_VERSION
3037 time = 500; 3037 time = 500;
3038#endif 3038#endif
3039 bool checkC = false;
3040 if ( mConflictingEvent->doesFloat() ) {
3041 checkC = KOPrefs::instance()->mCheckConflictsAllDayAllDay
3042 || KOPrefs::instance()->mCheckConflictsAllDayNonAD;
3043 } else {
3044 checkC = KOPrefs::instance()->mCheckConflictsNonADAllDay
3045 || KOPrefs::instance()->mCheckConflictsNonADNonAD;
3046 }
3047 if ( checkC )
3039 QTimer::singleShot( time, this, SLOT ( checkConflictForEvent() ) ); 3048 QTimer::singleShot( time, this, SLOT ( checkConflictForEvent() ) );
3040 } 3049 }
3041 // } 3050 // }
3042 } else { 3051 } else {
3043 mViewManager->currentView()->updateView(); 3052 mViewManager->currentView()->updateView();
3044 } 3053 }
@@ -3052,27 +3061,55 @@ void CalendarView::checkConflictForEvent()
3052 Event * conflictingEvent = mConflictingEvent; 3061 Event * conflictingEvent = mConflictingEvent;
3053 mConflictingEvent = 0; 3062 mConflictingEvent = 0;
3054 QDateTime current = QDateTime::currentDateTime(); 3063 QDateTime current = QDateTime::currentDateTime();
3055 if ( ! conflictingEvent->matchTime( &current, 0 ) ) { 3064 if ( ! conflictingEvent->matchTime( &current, 0 ) ) {
3056 return; 3065 return;
3057 } 3066 }
3067 CalFilter *filterIN = 0;
3068 CalFilter *filterALL = 0;
3069 CalFilter *filter = mFilters.first();
3070 while(filter) {
3071 if ( filter->name() == KOPrefs::instance()->mFilterConflictEditItem)
3072 filterIN = filter;
3073 if ( filter->name() == KOPrefs::instance()->mFilterConflictAllItem )
3074 filterALL = filter;
3075 filter = mFilters.next();
3076 }
3077 if ( filterIN ) {
3078 if ( !filterIN->filterCalendarItem( conflictingEvent ) ) {
3079 return;
3080 }
3081 }
3058 QPtrList<Event> testlist = mCalendar->events(); 3082 QPtrList<Event> testlist = mCalendar->events();
3059 Event * test = testlist.first(); 3083 Event * test = testlist.first();
3060 QDateTime conflict; 3084 QDateTime conflict;
3061 QDateTime retVal; 3085 QDateTime retVal;
3062 bool found = false; 3086 bool found = false;
3063 Event * cE = 0; 3087 Event * cE = 0;
3088 bool chAD = KOPrefs::instance()->mCheckConflictsAllDayAllDay;
3089 bool chNad = KOPrefs::instance()->mCheckConflictsAllDayNonAD;
3090 if ( !conflictingEvent->doesFloat() ) {
3091 chAD = KOPrefs::instance()->mCheckConflictsNonADAllDay;
3092 chNad = KOPrefs::instance()->mCheckConflictsNonADNonAD;
3093 }
3064 topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); 3094 topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") );
3065 while ( test ) { 3095 while ( test ) {
3066 qApp->processEvents(); 3096 qApp->processEvents();
3067 bool skip = false; 3097 bool skip = ( test->doesFloat() && !chAD ) || ( !test->doesFloat() && !chNad );
3098 if ( !skip ) {
3099 if ( filterALL ) {
3100 if ( !filterALL->filterCalendarItem( test ) ) {
3101 skip = true;
3102 }
3103 }
3104 if ( !skip ) {
3068 if ( found ) 3105 if ( found )
3069 skip = !test->matchTime( &current, &conflict ); 3106 skip = !test->matchTime( &current, &conflict );
3070 else 3107 else
3071 skip = !test->matchTime( &current, 0 ); 3108 skip = !test->matchTime( &current, 0 );
3072 if ( !skip && !test->doesFloat() ) { 3109 if ( !skip ) {
3073 if ( conflictingEvent->isOverlapping ( test, &retVal, &current ) ) { 3110 if ( conflictingEvent->isOverlapping ( test, &retVal, &current ) ) {
3074 if ( ! found ) { 3111 if ( ! found ) {
3075 conflict = retVal; 3112 conflict = retVal;
3076 cE = test; 3113 cE = test;
3077 } else { 3114 } else {
3078 if ( retVal < conflict ) { 3115 if ( retVal < conflict ) {
@@ -3080,20 +3117,22 @@ void CalendarView::checkConflictForEvent()
3080 cE = test; 3117 cE = test;
3081 } 3118 }
3082 } 3119 }
3083 found = true; 3120 found = true;
3084 } 3121 }
3085 } 3122 }
3123 }
3124 }
3086 test = testlist.next(); 3125 test = testlist.next();
3087 } 3126 }
3088 topLevelWidget()->setCaption( i18n("KO/Pi") ); 3127 topLevelWidget()->setCaption( i18n("KO/Pi") );
3089 if ( found ) { 3128 if ( found ) {
3090 QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( conflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ; 3129 QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( conflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ;
3091 qApp->processEvents(); 3130 qApp->processEvents();
3092 int km = KMessageBox::warningContinueCancel(this,mess, 3131 int km = KMessageBox::warningContinueCancel(this,mess,
3093 i18n("KO/Pi Conflict delected"),i18n("Show date"),i18n("No problem!")); 3132 i18n("KO/Pi Conflict detected"),i18n("Show date"),i18n("No problem!"));
3094 if ( km != KMessageBox::Continue ) { 3133 if ( km != KMessageBox::Continue ) {
3095 return; 3134 return;
3096 } 3135 }
3097 if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) 3136 if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 )
3098 mViewManager->showDayView(); 3137 mViewManager->showDayView();
3099 mNavigator->slotDaySelect( conflict.date() ); 3138 mNavigator->slotDaySelect( conflict.date() );
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 77f572c..571ca11 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -227,12 +227,20 @@ KOPrefs::KOPrefs() :
227 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); 227 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false);
228 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); 228 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 ));
229 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); 229 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 ));
230 addItemBool("UseAppColors",&mUseAppColors,false); 230 addItemBool("UseAppColors",&mUseAppColors,false);
231 231
232 232
233 KPrefs::setCurrentGroup("Conflicts");
234 addItemBool("EnableAutoDetect",&mDetectConflicts,true);
235 addItemBool("CheckConflictsAllDayAllDay",&mCheckConflictsAllDayAllDay,false);
236 addItemBool("CheckConflictsAllDayNonAD",&mCheckConflictsAllDayNonAD,false);
237 addItemBool("CheckConflictsNonADAllDay",&mCheckConflictsNonADAllDay,false);
238 addItemBool("CheckConflictsNonADNonAD",&mCheckConflictsNonADNonAD,true);
239 addItemString("FilterConflictEditItem", &mFilterConflictEditItem ,"nofilter" );
240 addItemString("FilterConflictAllItem", &mFilterConflictAllItem ,"nofilter" );
233 241
234 KPrefs::setCurrentGroup("Views"); 242 KPrefs::setCurrentGroup("Views");
235 addItemBool("Block Popup Menu",&mBlockPopupMenu,false); 243 addItemBool("Block Popup Menu",&mBlockPopupMenu,false);
236 addItemBool("Show Date Navigator",&mShowDateNavigator,true); 244 addItemBool("Show Date Navigator",&mShowDateNavigator,true);
237 addItemInt("Hour Size",&mHourSize,8); 245 addItemInt("Hour Size",&mHourSize,8);
238 addItemBool("Show Daily Recurrences",&mDailyRecur,true); 246 addItemBool("Show Daily Recurrences",&mDailyRecur,true);
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 9749ba3..576edf9 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -346,12 +346,21 @@ class KOPrefs : public KPimPrefs
346 346
347 int mCurrentDisplayedView; 347 int mCurrentDisplayedView;
348 QPtrList<KopiCalendarFile> mCalendars; 348 QPtrList<KopiCalendarFile> mCalendars;
349 int mNextAvailableCalendar; 349 int mNextAvailableCalendar;
350 bool mGlobalUpdateDisabled; 350 bool mGlobalUpdateDisabled;
351 351
352
353 bool mDetectConflicts;
354 bool mCheckConflictsAllDayAllDay;
355 bool mCheckConflictsAllDayNonAD;
356 bool mCheckConflictsNonADAllDay;
357 bool mCheckConflictsNonADNonAD;
358 QString mFilterConflictEditItem;
359 QString mFilterConflictAllItem;
360
352 private: 361 private:
353 QDict<QColor> mCategoryColors; 362 QDict<QColor> mCategoryColors;
354 QArray<KopiCalendarFile*> mDefCalColors; 363 QArray<KopiCalendarFile*> mDefCalColors;
355 QColor mDefaultCategoryColor; 364 QColor mDefaultCategoryColor;
356 365
357 QFont mDefaultTimeBarFont; 366 QFont mDefaultTimeBarFont;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 9e2378a..bbdf508 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -919,12 +919,47 @@ dummy =
919 &(KOPrefs::instance()->mWTshowCreated),topFrame); 919 &(KOPrefs::instance()->mWTshowCreated),topFrame);
920 topLayout->addWidget(dummy->checkBox(),ii++,0); 920 topLayout->addWidget(dummy->checkBox(),ii++,0);
921 dummy = addWidBool(i18n("Last modified time"), 921 dummy = addWidBool(i18n("Last modified time"),
922 &(KOPrefs::instance()->mWTshowChanged),topFrame); 922 &(KOPrefs::instance()->mWTshowChanged),topFrame);
923 topLayout->addWidget(dummy->checkBox(),ii++,0); 923 topLayout->addWidget(dummy->checkBox(),ii++,0);
924 924
925 topFrame = addPage(i18n("Conflict detection"),0,0);
926
927 topLayout = new QGridLayout(topFrame,2,1);
928 topLayout->setSpacing(mSpacingHint);
929 topLayout->setMargin(mMarginHint);
930 ii = 0;
931 dummy = addWidBool(i18n("Enable conflict detection"),
932 &(KOPrefs::instance()->mDetectConflicts),topFrame);
933 topLayout->addWidget(dummy->checkBox(), ii++,0);
934 topFrame = new QFrame( topFrame );
935 topLayout->addWidget(topFrame ,ii++,0);
936 topLayout = new QGridLayout(topFrame,4,1);
937 connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) );
938 topLayout->addWidget( new QLabel ( i18n("Conflict detection checks an <b>edited event</b> with other <b>existing events</b> for overlapping. You can define which events are checked:"), topFrame ) , ii++,0);
939 topLayout->addWidget( new QLabel ( i18n("Filter for the edited event"), topFrame ) , ii++,0);
940 mFilterEditItem = new QComboBox( topFrame );
941 topLayout->addWidget(mFilterEditItem,ii++,0);
942 topLayout->addWidget( new QLabel ( i18n("Filter for other existing events"), topFrame ) , ii++,0);
943 mFilterAllItem = new QComboBox( topFrame );
944 topLayout->addWidget(mFilterAllItem,ii++,0);
945 dummy = addWidBool(i18n("Check Allday with Allday"),
946 &(KOPrefs::instance()->mCheckConflictsAllDayAllDay),topFrame);
947 topLayout->addWidget(dummy->checkBox(), ii++,0);
948 dummy = addWidBool(i18n("Check Allday with NonAllday"),
949 &(KOPrefs::instance()->mCheckConflictsAllDayNonAD),topFrame);
950 topLayout->addWidget(dummy->checkBox(), ii++,0);
951 dummy = addWidBool(i18n("Check NonAllday with Allday"),
952 &(KOPrefs::instance()->mCheckConflictsNonADAllDay),topFrame);
953 topLayout->addWidget(dummy->checkBox(), ii++,0);
954 dummy = addWidBool(i18n("Check NonAllday with NonAllday"),
955 &(KOPrefs::instance()->mCheckConflictsNonADNonAD),topFrame);
956 topLayout->addWidget(dummy->checkBox(), ii++,0);
957
958
959
925 960
926 topFrame = addPage(i18n("Alarm"),0,0); 961 topFrame = addPage(i18n("Alarm"),0,0);
927 // DesktopIcon("viewmag",KIcon::SizeMedium)); 962 // DesktopIcon("viewmag",KIcon::SizeMedium));
928 963
929 topLayout = new QGridLayout(topFrame,2,1); 964 topLayout = new QGridLayout(topFrame,2,1);
930 topLayout->setSpacing(mSpacingHint); 965 topLayout->setSpacing(mSpacingHint);
@@ -1432,12 +1467,26 @@ void KOPrefsDialog::usrReadConfig()
1432 updateCategories(); 1467 updateCategories();
1433 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); 1468 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps );
1434 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); 1469 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime );
1435 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); 1470 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount );
1436 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); 1471 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
1437 mCatDefaultColor = KOPrefs::instance()->mEventColor; 1472 mCatDefaultColor = KOPrefs::instance()->mEventColor;
1473
1474
1475 KConfig cfgko(locateLocal("config","korganizerrc"));
1476 cfgko.setGroup("General");
1477 QStringList temp = cfgko.readListEntry("CalendarFilters");
1478 temp.prepend(i18n("No Filter") );
1479 mFilterEditItem->insertStringList( temp );
1480 mFilterAllItem->insertStringList( temp );
1481 int index = temp.findIndex( KOPrefs::instance()->mFilterConflictEditItem );
1482 if ( index >= 0 )
1483 mFilterEditItem->setCurrentItem( index );
1484 index = temp.findIndex( KOPrefs::instance()->mFilterConflictAllItem );
1485 if ( index >= 0 )
1486 mFilterAllItem->setCurrentItem( index );
1438} 1487}
1439 1488
1440 1489
1441void KOPrefsDialog::usrWriteConfig() 1490void KOPrefsDialog::usrWriteConfig()
1442{ 1491{
1443 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); 1492 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
@@ -1476,12 +1525,15 @@ void KOPrefsDialog::usrWriteConfig()
1476 // item = item->nextSibling(); 1525 // item = item->nextSibling();
1477 // } 1526 // }
1478 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); 1527 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value();
1479 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; 1528 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
1480 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; 1529 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
1481 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; 1530 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
1531
1532 KOPrefs::instance()->mFilterConflictEditItem = mFilterEditItem->currentText();
1533 KOPrefs::instance()->mFilterConflictAllItem = mFilterAllItem->currentText();
1482} 1534}
1483 1535
1484void KOPrefsDialog::updateCategories() 1536void KOPrefsDialog::updateCategories()
1485{ 1537{
1486 mCategoryCombo->clear(); 1538 mCategoryCombo->clear();
1487 mCategoryDict.clear(); 1539 mCategoryDict.clear();
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index baa6cf9..ee7a7aa 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -144,12 +144,14 @@ class KOPrefsDialog : public KPrefsDialog
144 KDateEdit* mEndDateSavingEdit; 144 KDateEdit* mEndDateSavingEdit;
145 QSpinBox * mAlarmPlayBeeps; 145 QSpinBox * mAlarmPlayBeeps;
146 QSpinBox * mAlarmSuspendTime; 146 QSpinBox * mAlarmSuspendTime;
147 QSpinBox * mAlarmSuspendCount; 147 QSpinBox * mAlarmSuspendCount;
148 QSpinBox * mAlarmBeepInterval; 148 QSpinBox * mAlarmBeepInterval;
149 149
150 QComboBox * mFilterEditItem, *mFilterAllItem;
151
150 QLineEdit * mDefaultAlarmFile; 152 QLineEdit * mDefaultAlarmFile;
151 int mSpacingHint; 153 int mSpacingHint;
152 int mMarginHint; 154 int mMarginHint;
153}; 155};
154 156
155#endif 157#endif