summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Unidiff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 9c55e9f..9ae393d 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1671,54 +1671,54 @@ void MainWindow::aboutAutoSaving()
1671 1671
1672 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); 1672 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text);
1673 1673
1674} 1674}
1675void MainWindow::aboutKnownBugs() 1675void MainWindow::aboutKnownBugs()
1676{ 1676{
1677 QMessageBox* msg; 1677 QMessageBox* msg;
1678 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), 1678 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"),
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
1693QString MainWindow::defaultFileName() 1693QString MainWindow::defaultFileName()
1694{ 1694{
1695 return locateLocal( "data", "korganizer/mycalendar.ics" ); 1695 return QDir::convertSeparators( locateLocal( "data", "korganizer/mycalendar.ics" ) );
1696} 1696}
1697QString MainWindow::syncFileName() 1697QString 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>
1707void MainWindow::updateWeek(QDate seda) 1707void 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 );
1717 1717
1718} 1718}
1719void MainWindow::updateWeekNum(const DateList &selectedDates) 1719void MainWindow::updateWeekNum(const DateList &selectedDates)
1720{ 1720{
1721 updateWeek( selectedDates.first() ); 1721 updateWeek( selectedDates.first() );
1722} 1722}
1723void MainWindow::processIncidenceSelection( Incidence *incidence ) 1723void MainWindow::processIncidenceSelection( Incidence *incidence )
1724{ 1724{
@@ -2544,49 +2544,49 @@ void MainWindow::exportVCalendar()
2544 if ( info. exists() ) { 2544 if ( info. exists() ) {
2545 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); 2545 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) );
2546 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 2546 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
2547 i18n("Overwrite!"), i18n("Cancel"), 0, 2547 i18n("Overwrite!"), i18n("Cancel"), 0,
2548 0, 1 ); 2548 0, 1 );
2549 if ( result != 0 ) { 2549 if ( result != 0 ) {
2550 createbup = false; 2550 createbup = false;
2551 } 2551 }
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}
2565QString MainWindow::sentSyncFile() 2565QString 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
2574void MainWindow::syncFileRequest() 2574void 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
2585 setCaption(i18n("Saving Data to temp file ..." )); 2585 setCaption(i18n("Saving Data to temp file ..." ));
2586 mView->saveCalendar( sentSyncFile() ); 2586 mView->saveCalendar( sentSyncFile() );
2587 setCaption(i18n("Data saved to temp file!" )); 2587 setCaption(i18n("Data saved to temp file!" ));
2588 mSyncManager->setBlockSave( false ); 2588 mSyncManager->setBlockSave( false );
2589 2589
2590} 2590}
2591void MainWindow::getFile( bool success ) 2591void MainWindow::getFile( bool success )
2592{ 2592{