summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-08-24 18:38:31 (UTC)
committer zautrix <zautrix>2005-08-24 18:38:31 (UTC)
commit2cde25d8061acd536bccd698722952ce8555f5db (patch) (side-by-side diff)
tree70f905e5de57b44c3503883b2f98925d9c92ef8b
parent645ceb7a95dce4716eb87a1b9191d3f3c1657be3 (diff)
downloadkdepimpi-2cde25d8061acd536bccd698722952ce8555f5db.zip
kdepimpi-2cde25d8061acd536bccd698722952ce8555f5db.tar.gz
kdepimpi-2cde25d8061acd536bccd698722952ce8555f5db.tar.bz2
conflict res fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt14
-rw-r--r--korganizer/calendarview.cpp7
-rw-r--r--korganizer/kodaymatrix.cpp6
-rw-r--r--korganizer/koprefs.cpp2
-rw-r--r--korganizer/koprefs.h2
-rw-r--r--korganizer/koprefsdialog.cpp15
6 files changed, 41 insertions, 5 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index fbd262c..2c0d626 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1547,15 +1547,25 @@
{ "Error saving data","Fehler beim Abspeichern" },
{ "Calendar(s) not saved:","Nicht gespeicherte Kalender:" },
{ "Enable conflict detection","Schalte Konflikterkennung an" },
-{ "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:" },
{ "Filter for the edited event","Filter für den bearbeiteten Termin" },
-{ "Filter for other existing events","Filter für die anderen Termine" },
+{ "Filter for other events","Filter für die anderen Termine" },
{ "Check Allday with Allday","Prüfe GanzTag mit GanzTag" },
{ "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" },
{ "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" },
{ "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" },
{ "Conflict detection","Konflikterkennung" },
{ "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" },
+{ "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." },
+{ "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" },
+{ "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." },
+{ "","" },
+{ "","" },
+{ "","" },
+{ "","" },
+{ "","" },
+{ "","" },
+{ "","" },
+{ "","" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 9928b48..14094bb 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3044,6 +3044,8 @@ void CalendarView::changeEventDisplay(Event *which, int action)
checkC = KOPrefs::instance()->mCheckConflictsNonADAllDay
|| KOPrefs::instance()->mCheckConflictsNonADNonAD;
}
+ if ( !KOPrefs::instance()->mIncludeFree && mConflictingEvent->transparency() == KCal::Event::Transparent )
+ checkC = false;
if ( checkC )
QTimer::singleShot( time, this, SLOT ( checkConflictForEvent() ) );
}
@@ -3095,6 +3097,11 @@ void CalendarView::checkConflictForEvent()
while ( test ) {
qApp->processEvents();
bool skip = ( test->doesFloat() && !chAD ) || ( !test->doesFloat() && !chNad );
+
+ if ( !skip ) {
+ if ( !KOPrefs::instance()->mIncludeFree && test->transparency() == KCal::Event::Transparent )
+ skip = true;
+ }
if ( !skip ) {
if ( filterALL ) {
if ( !filterALL->filterCalendarItem( test ) ) {
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 057df0d..7076e05 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -458,6 +458,9 @@ void KODayMatrix::updateViewTimed()
(recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) {
continue;
}
+ if ( !KOPrefs::instance()->mLongAllday && event->doesFloat()&& event->isMultiDay() ) {
+ continue;
+ }
if ( event->doesRecur() ) {
bool last;
QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last );
@@ -684,6 +687,9 @@ void KODayMatrix::updateEvents()
!KOPrefs::instance()->mWeeklyRecur ) ) {
numEvents--;
}
+ if ( !KOPrefs::instance()->mLongAllday && event->doesFloat()&& event->isMultiDay() ) {
+ numEvents--;
+ }
}
if ( numEvents )
eDays.setBit(i);
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 571ca11..1b0e5f4 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -232,6 +232,7 @@ KOPrefs::KOPrefs() :
KPrefs::setCurrentGroup("Conflicts");
addItemBool("EnableAutoDetect",&mDetectConflicts,true);
+ addItemBool("CheckConflictsFree",&mIncludeFree,true);
addItemBool("CheckConflictsAllDayAllDay",&mCheckConflictsAllDayAllDay,false);
addItemBool("CheckConflictsAllDayNonAD",&mCheckConflictsAllDayNonAD,false);
addItemBool("CheckConflictsNonADAllDay",&mCheckConflictsNonADAllDay,false);
@@ -244,6 +245,7 @@ KOPrefs::KOPrefs() :
addItemBool("Show Date Navigator",&mShowDateNavigator,true);
addItemInt("Hour Size",&mHourSize,8);
addItemBool("Show Daily Recurrences",&mDailyRecur,true);
+ addItemBool("ShowLongAllday",&mLongAllday,true);
addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true);
addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true);
addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true);
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 576edf9..bac8010 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -194,6 +194,7 @@ class KOPrefs : public KPimPrefs
bool mShowFullMenu;
bool mDailyRecur;
bool mWeeklyRecur;
+ bool mLongAllday;
bool mMonthDailyRecur;
bool mMonthWeeklyRecur;
bool mMonthShowIcons;
@@ -351,6 +352,7 @@ class KOPrefs : public KPimPrefs
bool mDetectConflicts;
+ bool mIncludeFree;
bool mCheckConflictsAllDayAllDay;
bool mCheckConflictsAllDayNonAD;
bool mCheckConflictsNonADAllDay;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index bbdf508..f1a6c3d 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -578,6 +578,11 @@ void KOPrefsDialog::setupViewsTab()
&(KOPrefs::instance()->mWeeklyRecur),topFrame);
topLayout->addWidget(weeklyRecur->checkBox(),ii++,0);
+ weeklyRecur =
+ addWidBool(i18n("Show multiday allday ev. in date nav."),
+ &(KOPrefs::instance()->mLongAllday),topFrame);
+ topLayout->addWidget(weeklyRecur->checkBox(),ii++,0);
+
#ifdef DESKTOP_VERSION
KPrefsDialogWidBool *enableToolTips =
addWidBool(i18n("Enable tooltips displaying summary of ev."),
@@ -933,13 +938,17 @@ dummy =
topLayout->addWidget(dummy->checkBox(), ii++,0);
topFrame = new QFrame( topFrame );
topLayout->addWidget(topFrame ,ii++,0);
- topLayout = new QGridLayout(topFrame,4,1);
+ topLayout = new QGridLayout(topFrame,4,1);
connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) );
- 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);
+ dummy = addWidBool(i18n("Include events which \"show as free\""),
+ &(KOPrefs::instance()->mIncludeFree),topFrame);
+ topLayout->addWidget(dummy->checkBox(), ii++,0);
+ topLayout->addWidget( new QLabel ( i18n("Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping."), topFrame ) , ii++,0);
+
topLayout->addWidget( new QLabel ( i18n("Filter for the edited event"), topFrame ) , ii++,0);
mFilterEditItem = new QComboBox( topFrame );
topLayout->addWidget(mFilterEditItem,ii++,0);
- topLayout->addWidget( new QLabel ( i18n("Filter for other existing events"), topFrame ) , ii++,0);
+ topLayout->addWidget( new QLabel ( i18n("Filter for other events"), topFrame ) , ii++,0);
mFilterAllItem = new QComboBox( topFrame );
topLayout->addWidget(mFilterAllItem,ii++,0);
dummy = addWidBool(i18n("Check Allday with Allday"),