author | zautrix <zautrix> | 2005-07-26 13:38:06 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-26 13:38:06 (UTC) |
commit | b37d71f782540851846613a70a60daf86816f7ec (patch) (side-by-side diff) | |
tree | cd69f9e9a57903a2d463f9f30d376631b705f279 /korganizer | |
parent | 346437d384dd780a1f7b75dd9caa3770525edfda (diff) | |
download | kdepimpi-b37d71f782540851846613a70a60daf86816f7ec.zip kdepimpi-b37d71f782540851846613a70a60daf86816f7ec.tar.gz kdepimpi-b37d71f782540851846613a70a60daf86816f7ec.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/koprefs.cpp | 1 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 6 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 16 |
4 files changed, 22 insertions, 2 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 6560877..eb997f5 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -72,96 +72,97 @@ KOPrefs::KOPrefs() : addItemBool("ShowIconList",&mShowIconList,true); addItemBool("ShowIconDay1",&mShowIconDay1,true); addItemBool("ShowIconDay5",&mShowIconDay5,true); addItemBool("ShowIconDay6",&mShowIconDay6,true); addItemBool("ShowIconDay7",&mShowIconDay7,true); addItemBool("ShowIconMonth",&mShowIconMonth,true); addItemBool("ShowIconTodoview",&mShowIconTodoview,true); addItemBool("ShowIconBackFast",&mShowIconBackFast,true); addItemBool("ShowIconBack",&mShowIconBack,true); addItemBool("ShowIconToday",&mShowIconToday,true); addItemBool("ShowIconForward",&mShowIconForward,true); addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); addItemBool("ShowIconNextDays",&mShowIconNextDays,true); addItemBool("ShowIconNext",&mShowIconNext,true); addItemBool("ShowIconJournal",&mShowIconJournal,true); addItemBool("ShowIconStretch",&mShowIconStretch,true); addItemBool("ShowIconFilter",&mShowIconFilter,false); addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); bool addIcons = false; #ifdef DESKTOP_VERSION addIcons = true; #endif addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); addItemInt("LastLoadedLanguage",&mOldLanguage,0); addItemBool("AskForQuit",&mAskForQuit,false); #ifndef DESKTOP_VERSION addItemBool("ShowFullMenu",&mShowFullMenu,false); #else addItemBool("ShowFullMenu",&mShowFullMenu,true); #endif addItemBool("ToolBarHor",&mToolBarHor, true ); addItemBool("ToolBarUp",&mToolBarUp, false ); addItemBool("ToolBarHorV",&mToolBarHorV, true ); addItemBool("ToolBarUpV",&mToolBarUpV, false ); addItemBool("ToolBarHorN",&mToolBarHorN, true ); addItemBool("ToolBarUpN",&mToolBarUpN, false ); addItemBool("ToolBarHorF",&mToolBarHorF, true ); addItemBool("ToolBarUpF",&mToolBarUpF, false ); addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); + addItemBool("WhatsNextTime2Lines",&mWhatsNextTime2Lines, false ); addItemInt("Whats Next Days",&mWhatsNextDays,3); addItemInt("Whats Next Prios",&mWhatsNextPrios,1); addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); addItemBool("ShowCompletedTodoInAgenda",&mShowCompletedTodoInAgenda,true); addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); addItemInt("AllDay Size",&mAllDaySize,28); QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); addItemStringList("LocationDefaults",&mLocationDefaults ); addItemStringList("EventSummary User",&mEventSummaryUser); addItemStringList("TodoSummary User",&mTodoSummaryUser); addItemStringList("JournalSummary User",&mJournalSummaryUser); addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); addItemBool("Enable Project View",&mEnableProjectView,false); addItemBool("Auto Save",&mAutoSave,false); addItemInt("Auto Save Interval",&mAutoSaveInterval,3); addItemBool("Confirm Deletes",&mConfirm,true); addItemString("Archive File",&mArchiveFile); addItemString("Html Export File",&mHtmlExportFile, QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); addItemBool("Html With Save",&mHtmlWithSave,false); KPrefs::setCurrentGroup("Personal Settings"); addItemInt("Mail Client",&mMailClient,MailClientKMail); addItemBool("Use Control Center Email",&mEmailControlCenter,false); addItemBool("Bcc",&mBcc,false); KPrefs::setCurrentGroup("Time & Date"); addItemInt("Default Start Time",&mStartTime,10); addItemInt("Default Duration",&mDefaultDuration,2); addItemInt("Default Alarm Time",&mAlarmTime,3); KPrefs::setCurrentGroup("AlarmSettings"); addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); KPrefs::setCurrentGroup("Calendar"); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 2ff03fa..9749ba3 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -163,96 +163,97 @@ class KOPrefs : public KPimPrefs QFont mEditBoxFont; QFont mJornalViewFont; QFont mWhatsNextFont; QFont mEventViewFont; QColor mHolidayColor; QColor mHighlightColor; QColor mEventColor; QColor mTodoDoneColor; QColor mAgendaBgColor; QColor mWorkingHoursColor; QColor mTodoDueTodayColor; QColor mTodoOverdueColor; QColor mTodoRunColor; QColor mMonthViewEvenColor; QColor mMonthViewOddColor; QColor mMonthViewHolidayColor; bool mMonthViewUsesDayColors; bool mMonthViewSatSunTog; bool mMonthViewWeek; bool mMonthViewWeekRowlayout; QColor mAppColor1; QColor mAppColor2; bool mUseAppColors; int mDayBegins; int mHourSize; int mAllDaySize; bool mShowFullMenu; bool mDailyRecur; bool mWeeklyRecur; bool mMonthDailyRecur; bool mMonthWeeklyRecur; bool mMonthShowIcons; bool mMonthShowTimes; bool mMonthShowShort; bool mEnableToolTips; bool mEnableMonthScroll; bool mFullViewMonth; bool mMonthViewUsesCategoryColor; bool mFullViewTodo; bool mShowCompletedTodo; bool mMarcusBainsEnabled; int mNextXDays; int mWhatsNextDays; + bool mWhatsNextTime2Lines; int mWhatsNextPrios; bool mEnableQuickTodo; bool mCompactDialogs; bool mVerticalScreen; bool mShowIconNewTodo; bool mShowIconNewEvent; bool mShowIconSearch; bool mShowIconList; bool mShowIconDay1; bool mShowIconDay5; bool mShowIconDay6; bool mShowIconDay7; bool mShowIconMonth; bool mShowIconTodoview; bool mShowIconBackFast; bool mShowIconBack; bool mShowIconToday; bool mShowIconForward; bool mShowIconForwardFast; bool mShowIconWhatsThis; bool mShowIconWeekNum; bool mShowIconNextDays; bool mShowIconNext; bool mShowIconJournal; bool mShowIconFilter; bool mShowIconOnetoolbar; bool mShowIconNavigator; bool mShowIconAllday; bool mShowIconFilterview; bool mShowIconToggleFull; bool mShowIconStretch; bool mToolBarHor; bool mToolBarUp; bool mToolBarHorV; bool mToolBarUpV; bool mToolBarHorN; bool mToolBarUpN; bool mToolBarHorF; bool mToolBarUpF; bool mToolBarMiniIcons; bool mAskForQuit; bool mUsePassWd; bool mShowSyncEvents; diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 05bd73f..9e2378a 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -734,99 +734,103 @@ void KOPrefsDialog::setupViewsTab() coloredCategoriesInMonthView = addWidBool(i18n("Month view uses day colors"), &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); KPrefsDialogWidColor *holidayColor = addWidColor(i18n("Day color odd months"), &(KOPrefs::instance()->mMonthViewOddColor),topFrame); topLayout->addWidget(holidayColor->label(),ii,0); topLayout->addWidget(holidayColor->button(),ii++,1); holidayColor = addWidColor(i18n("Day color even months"), &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); topLayout->addWidget(holidayColor->label(),ii,0); topLayout->addWidget(holidayColor->button(),ii++,1); holidayColor = addWidColor(i18n("Color for Sundays + category \"Holiday\""), &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); topLayout->addWidget(holidayColor->label(),ii,0); topLayout->addWidget(holidayColor->button(),ii++,1); // *********************** What'sNext View topFrame = addPage(i18n("What's Next View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,4,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); ii = 0; QHBox* hdummy = new QHBox(topFrame); new QLabel(i18n("Days in What's Next:"),hdummy); mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); topLayout->addWidget(hdummy,ii++,0); QHBox *prioBox = new QHBox(topFrame); // intervalBox->setSpacing(mSpacingHint); topLayout->addWidget(prioBox,ii++,0); QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); mPrioSpin = new QSpinBox(0,5,1,prioBox); if ( QApplication::desktop()->width() < 300 ) mPrioSpin->setFixedWidth( 40 ); - KPrefsDialogWidBool *passwdk = + addWidBool(i18n("Show times on two lines"), + &(KOPrefs::instance()->mWhatsNextTime2Lines),topFrame); + topLayout->addWidget(passwdk->checkBox(), ii++,0); + passwdk = + addWidBool(i18n("Show events that are done"), &(KOPrefs::instance()->mWNViewShowsPast),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); passwdk = addWidBool(i18n("Show parent To-Do's"), &(KOPrefs::instance()->mWNViewShowsParents),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); passwdk = addWidBool(i18n("Show location"), &(KOPrefs::instance()->mWNViewShowLocation),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); passwdk = addWidBool(i18n("Use short date in WN+Event view"), &(KOPrefs::instance()->mShortDateInViewer),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); // *********************** Todo View topFrame = addPage(i18n("Todo View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); topLayout = new QGridLayout(topFrame,4,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); ii = 0; dummy = addWidBool(i18n("Hide not running Todos in To-do view"), &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); KPrefsDialogWidBool *showCompletedTodo = addWidBool(i18n("To-do view shows completed Todos"), &(KOPrefs::instance()->mShowCompletedTodo),topFrame); topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); dummy = addWidBool(i18n("To-do view shows complete as 'xx %'"), &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); dummy = addWidBool(i18n("Small To-do view uses smaller font"), diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 221debc..fafcb58 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -484,131 +484,145 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a QDateTime noc; QString tempText; if ( appendTable && !notRed ) { tempText = "<table>"; } bool ok = true; if ( reply ) { noc = ev->getNextOccurence( cdt, &ok ); if (! ok && ev->typeID() == eventID) return false; } bool bDay = false; if ( ev->isBirthday() || ev->isAnniversary() ) bDay = true; tempText += "<tr><td><b>"; if (ev->typeID() == eventID ) { if (reply) { if (!ev->doesFloat()) tempText += KGlobal::locale()->formatDateTime( noc , KOPrefs::instance()->mShortDateInViewer) +": "; else tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; } else { if (!ev->doesFloat()) { Event *event = static_cast<Event *>(ev); QDateTime st,end; if ( event->recurrence()->doesRecur() ) { QDate recDate= mEventDate; int days = event->dtStart().date().daysTo (event->dtEnd().date() ); while ( ! event->recursOn( recDate ) ) { recDate = recDate.addDays( -1 ); } st = QDateTime ( recDate, event->dtStart().time() ); end = QDateTime ( recDate.addDays( days ), event->dtEnd().time() ); } else { st = event->dtStart(); end = event->dtEnd(); } QString dateText; // qDebug("%s %s %s %s ", mEventDate.toString().latin1(),event->summary().latin1(), st .toString().latin1(),end.toString().latin1() ); if ( st.date() < mEventDate ) dateText = "++:++-"; else dateText = event->dtStartTimeStr() + "-"; + if ( KOPrefs::instance()->mWhatsNextTime2Lines ) + dateText += " "; if ( end.date() > mEventDate ) dateText += "++:++"; else dateText += event->dtEndTimeStr(); if ( notRed ) tempText += dateText; else { if ( end < cdt ) { if ( !KOPrefs::instance()->mWNViewShowsPast ) return false; tempText += "<font color=\"#F00000\">" + dateText + "</font>"; } else if ( st < cdt ) tempText += "<font color=\"#008000\">" + dateText + "</font>"; else tempText += dateText; } } else { if ( bDay ) { if ( ev->isBirthday()) tempText += "<font color=\"#00B000\">" + i18n("Birthday") +":</font>"; else tempText += "<font color=\"#00B0000\">" + i18n("Anniversary")+":</font>"; } else { - tempText += i18n("Allday:"); + if ( ((Event*)ev)->isMultiDay() ) { + QString dfs = KGlobal::locale()->dateFormatShort(); + KGlobal::locale()->setDateFormatShort("%d.%b"); + tempText +=KGlobal::locale()->formatDate(((Event*)ev)->dtStart().date(), true, KLocale::Userdefined) + "-"; + if ( KOPrefs::instance()->mWhatsNextTime2Lines ) + tempText += " "; + tempText +=KGlobal::locale()->formatDate(((Event*)ev)->dtEnd().date(), true, KLocale::Userdefined); + KGlobal::locale()->setDateFormatShort(dfs); + } else { + tempText += " " ;//i18n("Allday:"); + } } } } } else { mTodos.append( ev ); tempText += i18n("ToDo:"); + if ( KOPrefs::instance()->mWhatsNextTime2Lines ) + tempText += " "; if (reply) { tempText += " "; if ( noc != cdt ) { tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; } } else { if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) { // tempText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; QString dfs = KGlobal::locale()->dateFormatShort(); KGlobal::locale()->setDateFormatShort("%d.%b"); tempText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "</font>"; KGlobal::locale()->setDateFormatShort(dfs); } else { if (!ev->doesFloat() ) if( ( (Todo*)ev)->dtDue() < cdt ) { tempText +="<font color=\"#F00000\">" + ((Todo*)ev)->dtDueTimeStr() + "</font>"; } else tempText +=((Todo*)ev)->dtDueTimeStr(); mTodos.append( ev ); } } } tempText += "</b></td><td>"; bool needClose = false; if ( ev->cancelled() ) { tempText += "<font color=\"#F00000\">[c"; needClose =true; } if ( ev->isAlarmEnabled() && ev->alarmEnabled()) { if ( !needClose) tempText +="["; tempText += "a"; needClose =true; } if ( ev->description().length() > 0 ) { if ( !needClose) tempText +="["; tempText += "i"; needClose =true; } if ( ev->recurrence()->doesRecur() ) { if ( !needClose) tempText +="["; tempText += "r"; |