summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-08-22 10:49:00 (UTC)
committer zautrix <zautrix>2005-08-22 10:49:00 (UTC)
commitf516a558e6d18982a54152b28ca3da78fe76e3fc (patch) (side-by-side diff)
tree231fa0bd8fe72db6cdae319def362e07945b1e2c
parent4b60cc60255c64717a2d4011d561c72b6878cdb4 (diff)
downloadkdepimpi-f516a558e6d18982a54152b28ca3da78fe76e3fc.zip
kdepimpi-f516a558e6d18982a54152b28ca3da78fe76e3fc.tar.gz
kdepimpi-f516a558e6d18982a54152b28ca3da78fe76e3fc.tar.bz2
recurrence default fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt1
-rw-r--r--korganizer/koeditorrecurrence.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 37266bf..a864f1d 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,50 +1,51 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.2.3 ************
+Fixed a problem with (non empty) exception dates of recurring events for newly created events.
********** VERSION 2.2.2 ************
KO/Pi:
Fixed a problem with the sort order of last modified date in list view.
KA/Pi:
Fixed a resource config read problem on windows.
********** VERSION 2.2.1 ************
KO/Pi:
Fixed a problem displaying very long allday events in agenda view in single day mode.
Fixed a problem with the default settings for new todos.
Added an error message dialog if saving of calendar files is not possible.
Made it impossible to close KO/Pi if saving fails.
Fixed a problem adding calendars on windows such that these calendars can be used on the memory stick.
Added config options for conflict detection.
KA/Pi:
Added a config option to turn on asking before a contact is deleted.
Fixed a problem with the default view and view selection at startup.
Formatted name is now set on import, if formatted name is empty.
Fixed a problem of displaying images in the contact details view:
Now the wid/hei ratio is not changed.
I a picture is larger than 128 pixels in wid or hei it is downscaled to
max 128 pixels wid/hei.
********** VERSION 2.2.0 ************
New stable release!
Fixed some minor usability problems.
Added writing of next alarm to a file for usage on pdaXrom.
*************************************
You can find the complete changelog
from version 1.7.7 to 2.2.0
in the source package or on
http://www.pi-sync.net/html/changelog.html
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index 0e74a99..e0380c4 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -332,192 +332,194 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
mByMonthCombo->insertItem( i18n("September") );
mByMonthCombo->insertItem( i18n("October") );
mByMonthCombo->insertItem( i18n("November") );
mByMonthCombo->insertItem( i18n("December") );
buttonLayout->addWidget( mByMonthCombo, 0, 2,Qt::AlignLeft );
if ( QApplication::desktop()->width() <= 640 ) {
mByMonthCombo->setSizeLimit( 6 );
}
mByDayRadio = new QRadioButton( i18n("On day "), buttonGroup);
buttonLayout->addWidget( mByDayRadio, 1, 0 , Qt::AlignRight);
mDayOfLabel = new QLabel( i18n("%1 of the year").arg(1), buttonGroup );
buttonLayout->addMultiCellWidget( mDayOfLabel, 1, 1, 1,3 );
}
void RecurYearly::setByDay( int doy )
{
mByDayRadio->setChecked( true );
mDayOfLabel->setText(i18n("%1 of the year").arg( doy ) );
}
void RecurYearly::setByMonth( int month, int day )
{
mByMonthRadio->setChecked( true );
mByMonthCombo->setCurrentItem( month - 1 );
mByDayLabel->setText(i18n("%1 of ").arg( day ) );
mDay = day;
}
bool RecurYearly::byMonth()
{
return mByMonthRadio->isChecked();
}
bool RecurYearly::byDay()
{
return mByDayRadio->isChecked();
}
int RecurYearly::month()
{
return mByMonthCombo->currentItem() + 1;
}
int RecurYearly::day()
{
return mDay;//mByDayCombo->currentItem() + 1;
}
//////////////////////////// ExceptionsWidget //////////////////////////
ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) :
QWidget( parent, name )
{
QBoxLayout *topLayout = new QVBoxLayout( this );
QGroupBox *groupBox = new QGroupBox( 1, Horizontal, i18n("Exceptions"),
this );
topLayout->addWidget( groupBox );
QWidget *box = new QWidget( groupBox );
QGridLayout *boxLayout = new QGridLayout( box );
mExceptionDateEdit = new KDateEdit( box );
boxLayout->addWidget( mExceptionDateEdit, 0, 0 );
QPushButton *addExceptionButton = new QPushButton( i18n("Add"), box );
boxLayout->addWidget( addExceptionButton, 1, 0 );
QPushButton *changeExceptionButton = new QPushButton( i18n("Change"), box );
boxLayout->addWidget( changeExceptionButton, 2, 0 );
QPushButton *deleteExceptionButton = new QPushButton( i18n("Delete"), box );
boxLayout->addWidget( deleteExceptionButton, 3, 0 );
mExceptionList = new QListBox( box );
boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 );
boxLayout->setRowStretch( 4, 1 );
boxLayout->setColStretch( 1, 3 );
connect( addExceptionButton, SIGNAL( clicked() ),
SLOT( addException() ) );
connect( changeExceptionButton, SIGNAL( clicked() ),
SLOT( changeException() ) );
connect( deleteExceptionButton, SIGNAL( clicked() ),
SLOT( deleteException() ) );
if ( QApplication::desktop()->width() < 480 ) {
setMinimumWidth( 220 );
} else {
setMinimumWidth( 440 );
mExceptionDateEdit->setMinimumWidth( 200 );
}
}
void ExceptionsWidget::setDefaults( const QDateTime &from )
{
+ mExceptionList->clear();
+ mExceptionDates.clear();
mExceptionDateEdit->setDate( from.date() );
}
void ExceptionsWidget::addException()
{
QDate date = mExceptionDateEdit->date();
QString dateStr = KGlobal::locale()->formatDate( date );
if( !mExceptionList->findItem( dateStr ) ) {
mExceptionDates.append( date );
mExceptionList->insertItem( dateStr );
}
}
void ExceptionsWidget::changeException()
{
int pos = mExceptionList->currentItem();
if ( pos < 0 ) return;
QDate date = mExceptionDateEdit->date();
mExceptionDates[ pos ] = date;
mExceptionList->changeItem( KGlobal::locale()->formatDate( date ), pos );
}
void ExceptionsWidget::deleteException()
{
int pos = mExceptionList->currentItem();
if ( pos < 0 ) return;
mExceptionDates.remove( mExceptionDates.at( pos ) );
mExceptionList->removeItem( pos );
}
void ExceptionsWidget::setDates( const DateList &dates )
{
mExceptionList->clear();
mExceptionDates.clear();
DateList::ConstIterator dit;
for ( dit = dates.begin(); dit != dates.end(); ++dit ) {
mExceptionList->insertItem( KGlobal::locale()->formatDate(* dit ) );
mExceptionDates.append( *dit );
}
}
DateList ExceptionsWidget::dates()
{
return mExceptionDates;
}
///////////////////////// ExceptionsDialog ///////////////////////////
ExceptionsDialog::ExceptionsDialog( QWidget *parent, const char *name ) :
KDialogBase( parent, name, true, i18n("Edit exceptions"), Ok|Cancel )
{
mExceptions = new ExceptionsWidget( this );
setMainWidget( mExceptions );
resize(220,10);
}
void ExceptionsDialog::setDefaults( const QDateTime &from )
{
mExceptions->setDefaults( from );
}
void ExceptionsDialog::setDates( const DateList &dates )
{
mExceptions->setDates( dates );
}
DateList ExceptionsDialog::dates()
{
return mExceptions->dates();
}
///////////////////////// RecurrenceRangeWidget ///////////////////////////
RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
const char *name )
: QWidget( parent, name )
{
QBoxLayout *topLayout = new QVBoxLayout( this );
mRangeGroupBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Range"),
this );
topLayout->addWidget( mRangeGroupBox );
QWidget *rangeBox = new QWidget( mRangeGroupBox );
QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox );
rangeLayout->setSpacing( KDialog::spacingHint() );
rangeLayout->setMargin( KDialog::marginHintSmall() );
mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox );
rangeLayout->addWidget( mStartDateLabel );
mRangeButtonGroup = new QButtonGroup;
mNoEndDateButton = new QRadioButton( i18n("No ending date"), rangeBox );