summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-08-22 10:49:00 (UTC)
committer zautrix <zautrix>2005-08-22 10:49:00 (UTC)
commitf516a558e6d18982a54152b28ca3da78fe76e3fc (patch) (unidiff)
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 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.2.3 ************ 3********** VERSION 2.2.3 ************
4 4
5Fixed a problem with (non empty) exception dates of recurring events for newly created events.
5 6
6 7
7********** VERSION 2.2.2 ************ 8********** VERSION 2.2.2 ************
8 9
9KO/Pi: 10KO/Pi:
10Fixed a problem with the sort order of last modified date in list view. 11Fixed a problem with the sort order of last modified date in list view.
11KA/Pi: 12KA/Pi:
12Fixed a resource config read problem on windows. 13Fixed a resource config read problem on windows.
13 14
14 15
15********** VERSION 2.2.1 ************ 16********** VERSION 2.2.1 ************
16 17
17KO/Pi: 18KO/Pi:
18Fixed a problem displaying very long allday events in agenda view in single day mode. 19Fixed a problem displaying very long allday events in agenda view in single day mode.
19Fixed a problem with the default settings for new todos. 20Fixed a problem with the default settings for new todos.
20Added an error message dialog if saving of calendar files is not possible. 21Added an error message dialog if saving of calendar files is not possible.
21Made it impossible to close KO/Pi if saving fails. 22Made it impossible to close KO/Pi if saving fails.
22Fixed a problem adding calendars on windows such that these calendars can be used on the memory stick. 23Fixed a problem adding calendars on windows such that these calendars can be used on the memory stick.
23Added config options for conflict detection. 24Added config options for conflict detection.
24 25
25KA/Pi: 26KA/Pi:
26Added a config option to turn on asking before a contact is deleted. 27Added a config option to turn on asking before a contact is deleted.
27Fixed a problem with the default view and view selection at startup. 28Fixed a problem with the default view and view selection at startup.
28Formatted name is now set on import, if formatted name is empty. 29Formatted name is now set on import, if formatted name is empty.
29Fixed a problem of displaying images in the contact details view: 30Fixed a problem of displaying images in the contact details view:
30Now the wid/hei ratio is not changed. 31Now the wid/hei ratio is not changed.
31I a picture is larger than 128 pixels in wid or hei it is downscaled to 32I a picture is larger than 128 pixels in wid or hei it is downscaled to
32max 128 pixels wid/hei. 33max 128 pixels wid/hei.
33 34
34********** VERSION 2.2.0 ************ 35********** VERSION 2.2.0 ************
35 36
36New stable release! 37New stable release!
37Fixed some minor usability problems. 38Fixed some minor usability problems.
38Added writing of next alarm to a file for usage on pdaXrom. 39Added writing of next alarm to a file for usage on pdaXrom.
39 40
40 41
41************************************* 42*************************************
42 43
43You can find the complete changelog 44You can find the complete changelog
44from version 1.7.7 to 2.2.0 45from version 1.7.7 to 2.2.0
45in the source package or on 46in the source package or on
46 47
47http://www.pi-sync.net/html/changelog.html 48http://www.pi-sync.net/html/changelog.html
48 49
49 50
50 51
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 ) :
332 mByMonthCombo->insertItem( i18n("September") ); 332 mByMonthCombo->insertItem( i18n("September") );
333 mByMonthCombo->insertItem( i18n("October") ); 333 mByMonthCombo->insertItem( i18n("October") );
334 mByMonthCombo->insertItem( i18n("November") ); 334 mByMonthCombo->insertItem( i18n("November") );
335 mByMonthCombo->insertItem( i18n("December") ); 335 mByMonthCombo->insertItem( i18n("December") );
336 buttonLayout->addWidget( mByMonthCombo, 0, 2,Qt::AlignLeft ); 336 buttonLayout->addWidget( mByMonthCombo, 0, 2,Qt::AlignLeft );
337 if ( QApplication::desktop()->width() <= 640 ) { 337 if ( QApplication::desktop()->width() <= 640 ) {
338 mByMonthCombo->setSizeLimit( 6 ); 338 mByMonthCombo->setSizeLimit( 6 );
339 } 339 }
340 340
341 mByDayRadio = new QRadioButton( i18n("On day "), buttonGroup); 341 mByDayRadio = new QRadioButton( i18n("On day "), buttonGroup);
342 buttonLayout->addWidget( mByDayRadio, 1, 0 , Qt::AlignRight); 342 buttonLayout->addWidget( mByDayRadio, 1, 0 , Qt::AlignRight);
343 mDayOfLabel = new QLabel( i18n("%1 of the year").arg(1), buttonGroup ); 343 mDayOfLabel = new QLabel( i18n("%1 of the year").arg(1), buttonGroup );
344 buttonLayout->addMultiCellWidget( mDayOfLabel, 1, 1, 1,3 ); 344 buttonLayout->addMultiCellWidget( mDayOfLabel, 1, 1, 1,3 );
345 345
346} 346}
347 347
348void RecurYearly::setByDay( int doy ) 348void RecurYearly::setByDay( int doy )
349{ 349{
350 mByDayRadio->setChecked( true ); 350 mByDayRadio->setChecked( true );
351 mDayOfLabel->setText(i18n("%1 of the year").arg( doy ) ); 351 mDayOfLabel->setText(i18n("%1 of the year").arg( doy ) );
352} 352}
353 353
354void RecurYearly::setByMonth( int month, int day ) 354void RecurYearly::setByMonth( int month, int day )
355{ 355{
356 mByMonthRadio->setChecked( true ); 356 mByMonthRadio->setChecked( true );
357 mByMonthCombo->setCurrentItem( month - 1 ); 357 mByMonthCombo->setCurrentItem( month - 1 );
358 mByDayLabel->setText(i18n("%1 of ").arg( day ) ); 358 mByDayLabel->setText(i18n("%1 of ").arg( day ) );
359 mDay = day; 359 mDay = day;
360} 360}
361 361
362bool RecurYearly::byMonth() 362bool RecurYearly::byMonth()
363{ 363{
364 return mByMonthRadio->isChecked(); 364 return mByMonthRadio->isChecked();
365} 365}
366 366
367bool RecurYearly::byDay() 367bool RecurYearly::byDay()
368{ 368{
369 return mByDayRadio->isChecked(); 369 return mByDayRadio->isChecked();
370} 370}
371 371
372int RecurYearly::month() 372int RecurYearly::month()
373{ 373{
374 return mByMonthCombo->currentItem() + 1; 374 return mByMonthCombo->currentItem() + 1;
375} 375}
376int RecurYearly::day() 376int RecurYearly::day()
377{ 377{
378 return mDay;//mByDayCombo->currentItem() + 1; 378 return mDay;//mByDayCombo->currentItem() + 1;
379} 379}
380 380
381//////////////////////////// ExceptionsWidget ////////////////////////// 381//////////////////////////// ExceptionsWidget //////////////////////////
382 382
383ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : 383ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) :
384 QWidget( parent, name ) 384 QWidget( parent, name )
385{ 385{
386 QBoxLayout *topLayout = new QVBoxLayout( this ); 386 QBoxLayout *topLayout = new QVBoxLayout( this );
387 387
388 QGroupBox *groupBox = new QGroupBox( 1, Horizontal, i18n("Exceptions"), 388 QGroupBox *groupBox = new QGroupBox( 1, Horizontal, i18n("Exceptions"),
389 this ); 389 this );
390 topLayout->addWidget( groupBox ); 390 topLayout->addWidget( groupBox );
391 391
392 QWidget *box = new QWidget( groupBox ); 392 QWidget *box = new QWidget( groupBox );
393 393
394 QGridLayout *boxLayout = new QGridLayout( box ); 394 QGridLayout *boxLayout = new QGridLayout( box );
395 395
396 mExceptionDateEdit = new KDateEdit( box ); 396 mExceptionDateEdit = new KDateEdit( box );
397 boxLayout->addWidget( mExceptionDateEdit, 0, 0 ); 397 boxLayout->addWidget( mExceptionDateEdit, 0, 0 );
398 398
399 QPushButton *addExceptionButton = new QPushButton( i18n("Add"), box ); 399 QPushButton *addExceptionButton = new QPushButton( i18n("Add"), box );
400 boxLayout->addWidget( addExceptionButton, 1, 0 ); 400 boxLayout->addWidget( addExceptionButton, 1, 0 );
401 QPushButton *changeExceptionButton = new QPushButton( i18n("Change"), box ); 401 QPushButton *changeExceptionButton = new QPushButton( i18n("Change"), box );
402 boxLayout->addWidget( changeExceptionButton, 2, 0 ); 402 boxLayout->addWidget( changeExceptionButton, 2, 0 );
403 QPushButton *deleteExceptionButton = new QPushButton( i18n("Delete"), box ); 403 QPushButton *deleteExceptionButton = new QPushButton( i18n("Delete"), box );
404 boxLayout->addWidget( deleteExceptionButton, 3, 0 ); 404 boxLayout->addWidget( deleteExceptionButton, 3, 0 );
405 405
406 mExceptionList = new QListBox( box ); 406 mExceptionList = new QListBox( box );
407 boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 ); 407 boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 );
408 408
409 boxLayout->setRowStretch( 4, 1 ); 409 boxLayout->setRowStretch( 4, 1 );
410 boxLayout->setColStretch( 1, 3 ); 410 boxLayout->setColStretch( 1, 3 );
411 411
412 connect( addExceptionButton, SIGNAL( clicked() ), 412 connect( addExceptionButton, SIGNAL( clicked() ),
413 SLOT( addException() ) ); 413 SLOT( addException() ) );
414 connect( changeExceptionButton, SIGNAL( clicked() ), 414 connect( changeExceptionButton, SIGNAL( clicked() ),
415 SLOT( changeException() ) ); 415 SLOT( changeException() ) );
416 connect( deleteExceptionButton, SIGNAL( clicked() ), 416 connect( deleteExceptionButton, SIGNAL( clicked() ),
417 SLOT( deleteException() ) ); 417 SLOT( deleteException() ) );
418 if ( QApplication::desktop()->width() < 480 ) { 418 if ( QApplication::desktop()->width() < 480 ) {
419 setMinimumWidth( 220 ); 419 setMinimumWidth( 220 );
420 } else { 420 } else {
421 setMinimumWidth( 440 ); 421 setMinimumWidth( 440 );
422 mExceptionDateEdit->setMinimumWidth( 200 ); 422 mExceptionDateEdit->setMinimumWidth( 200 );
423 } 423 }
424} 424}
425 425
426void ExceptionsWidget::setDefaults( const QDateTime &from ) 426void ExceptionsWidget::setDefaults( const QDateTime &from )
427{ 427{
428 mExceptionList->clear();
429 mExceptionDates.clear();
428 mExceptionDateEdit->setDate( from.date() ); 430 mExceptionDateEdit->setDate( from.date() );
429} 431}
430 432
431void ExceptionsWidget::addException() 433void ExceptionsWidget::addException()
432{ 434{
433 QDate date = mExceptionDateEdit->date(); 435 QDate date = mExceptionDateEdit->date();
434 QString dateStr = KGlobal::locale()->formatDate( date ); 436 QString dateStr = KGlobal::locale()->formatDate( date );
435 if( !mExceptionList->findItem( dateStr ) ) { 437 if( !mExceptionList->findItem( dateStr ) ) {
436 mExceptionDates.append( date ); 438 mExceptionDates.append( date );
437 mExceptionList->insertItem( dateStr ); 439 mExceptionList->insertItem( dateStr );
438 } 440 }
439} 441}
440 442
441void ExceptionsWidget::changeException() 443void ExceptionsWidget::changeException()
442{ 444{
443 int pos = mExceptionList->currentItem(); 445 int pos = mExceptionList->currentItem();
444 if ( pos < 0 ) return; 446 if ( pos < 0 ) return;
445 447
446 QDate date = mExceptionDateEdit->date(); 448 QDate date = mExceptionDateEdit->date();
447 mExceptionDates[ pos ] = date; 449 mExceptionDates[ pos ] = date;
448 mExceptionList->changeItem( KGlobal::locale()->formatDate( date ), pos ); 450 mExceptionList->changeItem( KGlobal::locale()->formatDate( date ), pos );
449} 451}
450 452
451void ExceptionsWidget::deleteException() 453void ExceptionsWidget::deleteException()
452{ 454{
453 int pos = mExceptionList->currentItem(); 455 int pos = mExceptionList->currentItem();
454 if ( pos < 0 ) return; 456 if ( pos < 0 ) return;
455 457
456 mExceptionDates.remove( mExceptionDates.at( pos ) ); 458 mExceptionDates.remove( mExceptionDates.at( pos ) );
457 mExceptionList->removeItem( pos ); 459 mExceptionList->removeItem( pos );
458} 460}
459 461
460void ExceptionsWidget::setDates( const DateList &dates ) 462void ExceptionsWidget::setDates( const DateList &dates )
461{ 463{
462 mExceptionList->clear(); 464 mExceptionList->clear();
463 mExceptionDates.clear(); 465 mExceptionDates.clear();
464 DateList::ConstIterator dit; 466 DateList::ConstIterator dit;
465 for ( dit = dates.begin(); dit != dates.end(); ++dit ) { 467 for ( dit = dates.begin(); dit != dates.end(); ++dit ) {
466 mExceptionList->insertItem( KGlobal::locale()->formatDate(* dit ) ); 468 mExceptionList->insertItem( KGlobal::locale()->formatDate(* dit ) );
467 mExceptionDates.append( *dit ); 469 mExceptionDates.append( *dit );
468 } 470 }
469} 471}
470 472
471DateList ExceptionsWidget::dates() 473DateList ExceptionsWidget::dates()
472{ 474{
473 return mExceptionDates; 475 return mExceptionDates;
474} 476}
475 477
476///////////////////////// ExceptionsDialog /////////////////////////// 478///////////////////////// ExceptionsDialog ///////////////////////////
477 479
478ExceptionsDialog::ExceptionsDialog( QWidget *parent, const char *name ) : 480ExceptionsDialog::ExceptionsDialog( QWidget *parent, const char *name ) :
479 KDialogBase( parent, name, true, i18n("Edit exceptions"), Ok|Cancel ) 481 KDialogBase( parent, name, true, i18n("Edit exceptions"), Ok|Cancel )
480{ 482{
481 mExceptions = new ExceptionsWidget( this ); 483 mExceptions = new ExceptionsWidget( this );
482 setMainWidget( mExceptions ); 484 setMainWidget( mExceptions );
483 resize(220,10); 485 resize(220,10);
484} 486}
485 487
486void ExceptionsDialog::setDefaults( const QDateTime &from ) 488void ExceptionsDialog::setDefaults( const QDateTime &from )
487{ 489{
488 mExceptions->setDefaults( from ); 490 mExceptions->setDefaults( from );
489} 491}
490 492
491void ExceptionsDialog::setDates( const DateList &dates ) 493void ExceptionsDialog::setDates( const DateList &dates )
492{ 494{
493 mExceptions->setDates( dates ); 495 mExceptions->setDates( dates );
494} 496}
495 497
496DateList ExceptionsDialog::dates() 498DateList ExceptionsDialog::dates()
497{ 499{
498 return mExceptions->dates(); 500 return mExceptions->dates();
499} 501}
500 502
501///////////////////////// RecurrenceRangeWidget /////////////////////////// 503///////////////////////// RecurrenceRangeWidget ///////////////////////////
502 504
503RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, 505RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
504 const char *name ) 506 const char *name )
505 : QWidget( parent, name ) 507 : QWidget( parent, name )
506{ 508{
507 QBoxLayout *topLayout = new QVBoxLayout( this ); 509 QBoxLayout *topLayout = new QVBoxLayout( this );
508 510
509 mRangeGroupBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Range"), 511 mRangeGroupBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Range"),
510 this ); 512 this );
511 topLayout->addWidget( mRangeGroupBox ); 513 topLayout->addWidget( mRangeGroupBox );
512 514
513 QWidget *rangeBox = new QWidget( mRangeGroupBox ); 515 QWidget *rangeBox = new QWidget( mRangeGroupBox );
514 QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox ); 516 QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox );
515 rangeLayout->setSpacing( KDialog::spacingHint() ); 517 rangeLayout->setSpacing( KDialog::spacingHint() );
516 rangeLayout->setMargin( KDialog::marginHintSmall() ); 518 rangeLayout->setMargin( KDialog::marginHintSmall() );
517 519
518 mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox ); 520 mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox );
519 rangeLayout->addWidget( mStartDateLabel ); 521 rangeLayout->addWidget( mStartDateLabel );
520 522
521 mRangeButtonGroup = new QButtonGroup; 523 mRangeButtonGroup = new QButtonGroup;
522 524
523 mNoEndDateButton = new QRadioButton( i18n("No ending date"), rangeBox ); 525 mNoEndDateButton = new QRadioButton( i18n("No ending date"), rangeBox );