summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
authorzautrix <zautrix>2005-02-09 19:31:50 (UTC)
committer zautrix <zautrix>2005-02-09 19:31:50 (UTC)
commita9eff860d8399a198a9fdc04e09ed369097fc745 (patch) (unidiff)
treec953f38ef75bed96bdedd61b1b4bf369e08cddee /korganizer/mainwindow.cpp
parent22d5db839c9741cb2e988e84bbb367617934ebd9 (diff)
downloadkdepimpi-a9eff860d8399a198a9fdc04e09ed369097fc745.zip
kdepimpi-a9eff860d8399a198a9fdc04e09ed369097fc745.tar.gz
kdepimpi-a9eff860d8399a198a9fdc04e09ed369097fc745.tar.bz2
fixes
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 468fd5b..18a4b12 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -265,7 +265,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
265 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); 265 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
266 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 266 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
267 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 267 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
268 mSyncManager->setDefaultFileName( defaultFileName()); 268 mSyncManager->setDefaultFileName( sentSyncFile());
269 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); 269 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
270 mSyncManager->fillSyncMenu(); 270 mSyncManager->fillSyncMenu();
271 271
@@ -1992,13 +1992,25 @@ void MainWindow::exportVCalendar()
1992 } 1992 }
1993 1993
1994} 1994}
1995QString MainWindow::sentSyncFile()
1996{
1997#ifdef DESKTOP_VERSION
1998 return locateLocal( "tmp", "copysynccal.ics" );
1999#else
2000 return QString( "/tmp/copysynccal.ics" );
2001#endif
2002}
1995 2003
1996void MainWindow::syncFileRequest() 2004void MainWindow::syncFileRequest()
1997{ 2005{
1998 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2006 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
1999 mSyncManager->slotSyncMenu( 999 ); 2007 mSyncManager->slotSyncMenu( 999 );
2000 } 2008 }
2001 save(); 2009
2010 setCaption(i18n("Saving Data to temp file ..." ));
2011 mView->saveCalendar( sentSyncFile() );
2012 setCaption(i18n("Data saved to temp file!" ));
2013
2002} 2014}
2003void MainWindow::getFile( bool success ) 2015void MainWindow::getFile( bool success )
2004{ 2016{
@@ -2006,7 +2018,7 @@ void MainWindow::getFile( bool success )
2006 setCaption( i18n("Error receiving file. Nothing changed!") ); 2018 setCaption( i18n("Error receiving file. Nothing changed!") );
2007 return; 2019 return;
2008 } 2020 }
2009 mView->openCalendar( defaultFileName() ); 2021 mView->openCalendar( sentSyncFile() );
2010 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2022 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2011 mSyncManager->slotSyncMenu( 999 ); 2023 mSyncManager->slotSyncMenu( 999 );
2012 } 2024 }