-rw-r--r-- | bin/kdepim/WhatsNew.txt | 1 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 7 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 8 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 6 |
4 files changed, 12 insertions, 10 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 944ee1e..0160dbe 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,25 +1,26 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.2.1 ************ | 3 | ********** VERSION 2.2.1 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fixed a problem displaying very long allday events in agenda view in single day mode. | 6 | Fixed a problem displaying very long allday events in agenda view in single day mode. |
7 | Fixed a problem with the default settings for new todos. | 7 | Fixed a problem with the default settings for new todos. |
8 | Added an error message dialog if saving of calendar files is not possible. | 8 | Added an error message dialog if saving of calendar files is not possible. |
9 | Made it impossible to close KO/Pi if saving fails. | 9 | Made it impossible to close KO/Pi if saving fails. |
10 | Fixed a problem adding calendars on windows such that these calendars can be used on the memory stick. | ||
10 | 11 | ||
11 | KA/Pi: | 12 | KA/Pi: |
12 | Added a config option to turn on asking before a contact is deleted. | 13 | Added a config option to turn on asking before a contact is deleted. |
13 | Fixed a problem with the default view and view selection at startup. | 14 | Fixed a problem with the default view and view selection at startup. |
14 | Formatted name is now set on import, if formatted name is empty. | 15 | Formatted name is now set on import, if formatted name is empty. |
15 | 16 | ||
16 | ********** VERSION 2.2.0 ************ | 17 | ********** VERSION 2.2.0 ************ |
17 | 18 | ||
18 | New stable release! | 19 | New stable release! |
19 | Fixed some minor usability problems. | 20 | Fixed some minor usability problems. |
20 | Added writing of next alarm to a file for usage on pdaXrom. | 21 | Added writing of next alarm to a file for usage on pdaXrom. |
21 | 22 | ||
22 | 23 | ||
23 | ************************************* | 24 | ************************************* |
24 | 25 | ||
25 | You can find the complete changelog | 26 | You can find the complete changelog |
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index e86ec95..ef25fd0 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -17,32 +17,33 @@ | |||
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qcheckbox.h> | 24 | #include <qcheckbox.h> |
25 | #include <qcombobox.h> | 25 | #include <qcombobox.h> |
26 | #include <qpushbutton.h> | 26 | #include <qpushbutton.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | #include <qdialog.h> | 29 | #include <qdialog.h> |
30 | #include <qtextstream.h> | 30 | #include <qtextstream.h> |
31 | #include <qtextcodec.h> | 31 | #include <qtextcodec.h> |
32 | #include <qwhatsthis.h> | 32 | #include <qwhatsthis.h> |
33 | #include <qdir.h> | ||
33 | 34 | ||
34 | 35 | ||
35 | #include <libkcal/calfilter.h> | 36 | #include <libkcal/calfilter.h> |
36 | 37 | ||
37 | #include "kofilterview.h" | 38 | #include "kofilterview.h" |
38 | #include "koprefs.h" | 39 | #include "koprefs.h" |
39 | #include <kiconloader.h> | 40 | #include <kiconloader.h> |
40 | #include <kglobal.h> | 41 | #include <kglobal.h> |
41 | #include <kglobalsettings.h> | 42 | #include <kglobalsettings.h> |
42 | #include <kcolorbutton.h> | 43 | #include <kcolorbutton.h> |
43 | #include <kmessagebox.h> | 44 | #include <kmessagebox.h> |
44 | 45 | ||
45 | 46 | ||
46 | 47 | ||
47 | 48 | ||
48 | 49 | ||
@@ -394,42 +395,42 @@ void KOCalEditView::addCal() | |||
394 | tryagain = true; | 395 | tryagain = true; |
395 | file = KGlobalSettings::calendarDir()+"newCal.ics"; | 396 | file = KGlobalSettings::calendarDir()+"newCal.ics"; |
396 | break; | 397 | break; |
397 | } | 398 | } |
398 | kkf = KOPrefs::instance()->mCalendars.next(); | 399 | kkf = KOPrefs::instance()->mCalendars.next(); |
399 | } | 400 | } |
400 | QFileInfo fi ( file ); | 401 | QFileInfo fi ( file ); |
401 | if ( fi.isDir() ) { | 402 | if ( fi.isDir() ) { |
402 | tryagain = true; | 403 | tryagain = true; |
403 | } | 404 | } |
404 | } | 405 | } |
405 | addCalendar ( name, file ); | 406 | addCalendar ( name, file ); |
406 | QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); | 407 | QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); |
407 | } | 408 | } |
408 | int KOCalEditView::addCalendar( QString name, QString file, bool ask ) | 409 | int KOCalEditView::addCalendar( QString name, QString file, bool ask ) |
409 | { | 410 | { |
410 | 411 | file = QDir::convertSeparators( file ); | |
411 | QFileInfo fi ( file ); | 412 | QFileInfo fi ( file ); |
412 | QString absFile = file; | 413 | QString absFile = file; |
413 | bool isRelative = false; | 414 | bool isRelative = false; |
414 | if ( fi.isRelative() ) { | 415 | if ( fi.isRelative() ) { |
415 | isRelative = true; | 416 | isRelative = true; |
416 | absFile = KGlobalSettings::calendarDir()+file; | 417 | absFile = QDir::convertSeparators( KGlobalSettings::calendarDir()+file ); |
417 | fi.setFile( absFile ); | 418 | fi.setFile( absFile ); |
418 | } else { | 419 | } else { |
419 | QString cd = KGlobalSettings::calendarDir(); | 420 | QString cd = QDir::convertSeparators( KGlobalSettings::calendarDir() ); |
420 | if ( file.left( cd.length() ) == cd ) { | 421 | if ( file.left( cd.length() ) == cd ) { |
421 | isRelative = true; | 422 | isRelative = true; |
422 | file = fi.fileName (); | 423 | file = fi.fileName (); |
423 | fi.setFile( absFile ); | 424 | fi.setFile( absFile ); |
424 | } | 425 | } |
425 | } | 426 | } |
426 | if (!fi.exists() ) { | 427 | if (!fi.exists() ) { |
427 | if ( ask ) | 428 | if ( ask ) |
428 | if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( KGlobal::formatMessage (absFile,0) ) )== KMessageBox::No ) | 429 | if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( KGlobal::formatMessage (absFile,0) ) )== KMessageBox::No ) |
429 | return 0; | 430 | return 0; |
430 | QFile fileIn( absFile ); | 431 | QFile fileIn( absFile ); |
431 | if (!fileIn.open( IO_WriteOnly ) ) { | 432 | if (!fileIn.open( IO_WriteOnly ) ) { |
432 | KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) ); | 433 | KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) ); |
433 | return 0; | 434 | return 0; |
434 | } | 435 | } |
435 | QTextStream tsIn( &fileIn ); | 436 | QTextStream tsIn( &fileIn ); |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index eb997f5..77f572c 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -436,56 +436,56 @@ void KOPrefs::usrReadConfig() | |||
436 | fillMailDefaults(); | 436 | fillMailDefaults(); |
437 | 437 | ||
438 | config()->setGroup("Category Colors"); | 438 | config()->setGroup("Category Colors"); |
439 | QStringList::Iterator it; | 439 | QStringList::Iterator it; |
440 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 440 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
441 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); | 441 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); |
442 | 442 | ||
443 | } | 443 | } |
444 | KConfig fc (locateLocal("config","kopicalendarrc")); | 444 | KConfig fc (locateLocal("config","kopicalendarrc")); |
445 | fc.setGroup("CC"); | 445 | fc.setGroup("CC"); |
446 | int numCals = fc.readNumEntry("NumberCalendars",0 ); | 446 | int numCals = fc.readNumEntry("NumberCalendars",0 ); |
447 | mNextAvailableCalendar = 1; | 447 | mNextAvailableCalendar = 1; |
448 | if ( numCals == 0 ) { | 448 | if ( numCals == 0 ) { |
449 | KopiCalendarFile *kkf = getNewCalendar(); | 449 | KopiCalendarFile *kkf = getNewCalendar(); |
450 | kkf->isStandard = true; | 450 | kkf->isStandard = true; |
451 | kkf->mName = i18n("Standard"); | 451 | kkf->mName = i18n("Standard"); |
452 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); | 452 | kkf->mFileName = QDir::convertSeparators( locateLocal( "data", "korganizer/mycalendar.ics" ) ); |
453 | } | 453 | } |
454 | while ( mNextAvailableCalendar <= numCals ) { | 454 | while ( mNextAvailableCalendar <= numCals ) { |
455 | //qDebug("Read cal #%d ", mNextAvailableCalendar ); | 455 | //qDebug("Read cal #%d ", mNextAvailableCalendar ); |
456 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); | 456 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); |
457 | KopiCalendarFile *kkf = getNewCalendar(); | 457 | KopiCalendarFile *kkf = getNewCalendar(); |
458 | kkf->isStandard = fc.readBoolEntry( prefix+"_isStandard", false ); | 458 | kkf->isStandard = fc.readBoolEntry( prefix+"_isStandard", false ); |
459 | kkf->isEnabled = fc.readBoolEntry( prefix+"_isEnabled", true); | 459 | kkf->isEnabled = fc.readBoolEntry( prefix+"_isEnabled", true); |
460 | kkf->isRelative = fc.readBoolEntry( prefix+"_isRelative", false ); | 460 | kkf->isRelative = fc.readBoolEntry( prefix+"_isRelative", false ); |
461 | kkf->isAlarmEnabled = fc.readBoolEntry( prefix+"_isAlarmEnabled", true); | 461 | kkf->isAlarmEnabled = fc.readBoolEntry( prefix+"_isAlarmEnabled", true); |
462 | kkf->isReadOnly = fc.readBoolEntry( prefix+"_isReadOnly", false); | 462 | kkf->isReadOnly = fc.readBoolEntry( prefix+"_isReadOnly", false); |
463 | kkf->mName = fc.readEntry( prefix+"_Name", "Calendar"); | 463 | kkf->mName = fc.readEntry( prefix+"_Name", "Calendar"); |
464 | kkf->mFileName = fc.readEntry( prefix+"_FileName", kkf->mFileName); | 464 | kkf->mFileName = QDir::convertSeparators( fc.readEntry( prefix+"_FileName", kkf->mFileName) ); |
465 | kkf->mSavedFileName = fc.readEntry( prefix+"_SavedFileName", kkf->mFileName); | 465 | kkf->mSavedFileName = QDir::convertSeparators( fc.readEntry( prefix+"_SavedFileName", kkf->mFileName) ); |
466 | kkf->mDefaultColor = fc.readColorEntry( prefix+"_Color",&mEventColor); | 466 | kkf->mDefaultColor = fc.readColorEntry( prefix+"_Color",&mEventColor); |
467 | if ( kkf->mCalNumber == 1 ) { | 467 | if ( kkf->mCalNumber == 1 ) { |
468 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); | 468 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); |
469 | } | 469 | } |
470 | //qDebug("NAME %s %s", kkf->mName.latin1(), i18n("Birthdays").latin1() ); | 470 | //qDebug("NAME %s %s", kkf->mName.latin1(), i18n("Birthdays").latin1() ); |
471 | if ( kkf->mName == i18n("Birthdays") ) { | 471 | if ( kkf->mName == i18n("Birthdays") ) { |
472 | kkf->mFileName = locateLocal( "data", "korganizer/birthdays.ics" ); | 472 | kkf->mFileName = locateLocal( "data", "korganizer/birthdays.ics" ); |
473 | } | 473 | } |
474 | if ( kkf->isRelative ) | 474 | if ( kkf->isRelative ) |
475 | kkf->mFileName = KGlobalSettings::calendarDir() + kkf->mSavedFileName; | 475 | kkf->mFileName = QDir::convertSeparators( KGlobalSettings::calendarDir() + kkf->mSavedFileName ); |
476 | } | 476 | } |
477 | 477 | ||
478 | KPimPrefs::usrReadConfig(); | 478 | KPimPrefs::usrReadConfig(); |
479 | } | 479 | } |
480 | 480 | ||
481 | KopiCalendarFile * KOPrefs::getCalendar( int num ) | 481 | KopiCalendarFile * KOPrefs::getCalendar( int num ) |
482 | { | 482 | { |
483 | return mDefCalColors[num-1]; | 483 | return mDefCalColors[num-1]; |
484 | } | 484 | } |
485 | 485 | ||
486 | KopiCalendarFile * KOPrefs::getNewCalendar() | 486 | KopiCalendarFile * KOPrefs::getNewCalendar() |
487 | { | 487 | { |
488 | KopiCalendarFile * kkf = new KopiCalendarFile(); | 488 | KopiCalendarFile * kkf = new KopiCalendarFile(); |
489 | kkf->mCalNumber = mNextAvailableCalendar; | 489 | kkf->mCalNumber = mNextAvailableCalendar; |
490 | mDefCalColors.resize( mNextAvailableCalendar ); | 490 | mDefCalColors.resize( mNextAvailableCalendar ); |
491 | mDefCalColors[mNextAvailableCalendar-1] = kkf; | 491 | mDefCalColors[mNextAvailableCalendar-1] = kkf; |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 9c55e9f..9ae393d 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1679,38 +1679,38 @@ void MainWindow::aboutKnownBugs() | |||
1679 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ | 1679 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ |
1680 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1680 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1681 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + | 1681 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + |
1682 | i18n("\nor report them in the bugtracker on\n") + | 1682 | i18n("\nor report them in the bugtracker on\n") + |
1683 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), | 1683 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), |
1684 | QMessageBox::NoIcon, | 1684 | QMessageBox::NoIcon, |
1685 | QMessageBox::Ok, | 1685 | QMessageBox::Ok, |
1686 | QMessageBox::NoButton, | 1686 | QMessageBox::NoButton, |
1687 | QMessageBox::NoButton); | 1687 | QMessageBox::NoButton); |
1688 | msg->exec(); | 1688 | msg->exec(); |
1689 | delete msg; | 1689 | delete msg; |
1690 | 1690 | ||
1691 | } | 1691 | } |
1692 | 1692 | ||
1693 | QString MainWindow::defaultFileName() | 1693 | QString MainWindow::defaultFileName() |
1694 | { | 1694 | { |
1695 | return locateLocal( "data", "korganizer/mycalendar.ics" ); | 1695 | return QDir::convertSeparators( locateLocal( "data", "korganizer/mycalendar.ics" ) ); |
1696 | } | 1696 | } |
1697 | QString MainWindow::syncFileName() | 1697 | QString MainWindow::syncFileName() |
1698 | { | 1698 | { |
1699 | #ifdef DESKTOP_VERSION | 1699 | #ifdef DESKTOP_VERSION |
1700 | return locateLocal( "tmp", "synccalendar.ics" ); | 1700 | return QDir::convertSeparators( locateLocal( "tmp", "synccalendar.ics" ) ); |
1701 | #else | 1701 | #else |
1702 | return QString( "/tmp/synccalendar.ics" ); | 1702 | return QString( "/tmp/synccalendar.ics" ); |
1703 | #endif | 1703 | #endif |
1704 | } | 1704 | } |
1705 | #include "koglobals.h" | 1705 | #include "koglobals.h" |
1706 | #include <kcalendarsystem.h> | 1706 | #include <kcalendarsystem.h> |
1707 | void MainWindow::updateWeek(QDate seda) | 1707 | void MainWindow::updateWeek(QDate seda) |
1708 | { | 1708 | { |
1709 | int weekNum = KGlobal::locale()->weekNum ( seda ); | 1709 | int weekNum = KGlobal::locale()->weekNum ( seda ); |
1710 | mWeekPixmap.fill( mWeekBgColor ); | 1710 | mWeekPixmap.fill( mWeekBgColor ); |
1711 | QPainter p ( &mWeekPixmap ); | 1711 | QPainter p ( &mWeekPixmap ); |
1712 | p.setFont( mWeekFont ); | 1712 | p.setFont( mWeekFont ); |
1713 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); | 1713 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); |
1714 | p.end(); | 1714 | p.end(); |
1715 | QIconSet icon3 ( mWeekPixmap ); | 1715 | QIconSet icon3 ( mWeekPixmap ); |
1716 | mWeekAction->setIconSet ( icon3 ); | 1716 | mWeekAction->setIconSet ( icon3 ); |
@@ -2552,33 +2552,33 @@ void MainWindow::exportVCalendar() | |||
2552 | } | 2552 | } |
2553 | if ( createbup ) { | 2553 | if ( createbup ) { |
2554 | if ( mView->exportVCalendar( fn ) ) { | 2554 | if ( mView->exportVCalendar( fn ) ) { |
2555 | KOPrefs::instance()->mLastVcalFile = fn; | 2555 | KOPrefs::instance()->mLastVcalFile = fn; |
2556 | if ( fn.length() > 20 ) | 2556 | if ( fn.length() > 20 ) |
2557 | mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; | 2557 | mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; |
2558 | else | 2558 | else |
2559 | mes = i18n("KO/Pi:Exported to %1").arg(fn ); | 2559 | mes = i18n("KO/Pi:Exported to %1").arg(fn ); |
2560 | setCaption(mes); | 2560 | setCaption(mes); |
2561 | } | 2561 | } |
2562 | } | 2562 | } |
2563 | 2563 | ||
2564 | } | 2564 | } |
2565 | QString MainWindow::sentSyncFile() | 2565 | QString MainWindow::sentSyncFile() |
2566 | { | 2566 | { |
2567 | #ifdef DESKTOP_VERSION | 2567 | #ifdef DESKTOP_VERSION |
2568 | return locateLocal( "tmp", "copysynccal.ics" ); | 2568 | return QDir::convertSeparators( locateLocal( "tmp", "copysynccal.ics" ) ); |
2569 | #else | 2569 | #else |
2570 | return QString( "/tmp/copysynccal.ics" ); | 2570 | return QString( "/tmp/copysynccal.ics" ); |
2571 | #endif | 2571 | #endif |
2572 | } | 2572 | } |
2573 | 2573 | ||
2574 | void MainWindow::syncFileRequest() | 2574 | void MainWindow::syncFileRequest() |
2575 | { | 2575 | { |
2576 | while ( mSyncManager->blockSave() ) { | 2576 | while ( mSyncManager->blockSave() ) { |
2577 | qApp->processEvents(); | 2577 | qApp->processEvents(); |
2578 | } | 2578 | } |
2579 | mSyncManager->setBlockSave(true); | 2579 | mSyncManager->setBlockSave(true); |
2580 | 2580 | ||
2581 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { | 2581 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { |
2582 | mSyncManager->slotSyncMenu( 999 ); | 2582 | mSyncManager->slotSyncMenu( 999 ); |
2583 | } | 2583 | } |
2584 | 2584 | ||