summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/resource.cpp4
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/koprefs.h3
-rw-r--r--korganizer/mainwindow.cpp16
-rw-r--r--korganizer/mainwindow.h1
-rw-r--r--libkdepim/ksyncprofile.cpp15
-rw-r--r--libkdepim/ksyncprofile.h5
8 files changed, 32 insertions, 17 deletions
diff --git a/kabc/resource.cpp b/kabc/resource.cpp
index d39fd6a..7b91239 100644
--- a/kabc/resource.cpp
+++ b/kabc/resource.cpp
@@ -37,8 +37,8 @@ Resource::Resource( const KConfig *config, bool syncable )
: KRES::Resource( config ), mAddressBook( 0 ), mSyncProfile( 0 )
{
if(syncable == true) {
- mSyncProfile = new KSyncProfile( identifier() );
- mSyncProfile->setName(resourceName());
+ mSyncProfile = new KSyncProfile( );
+ mSyncProfile->setName("pending" /*resourceName()*/);
mSyncProfile->readConfig( (KConfig *)config );
}
}
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index f859b90..689618d 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1173,6 +1173,10 @@ bool CalendarView::syncCalendar(QString filename, int mode)
updateView();
return syncOK;
}
+void CalendarView::syncPhone()
+{
+ qDebug("CalendarView::syncPhone() ");
+}
void CalendarView::syncSharp()
{
#ifndef DESKTOP_VERSION
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index d564473..b2838db 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -425,6 +425,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
const QString &datebookFile,
const QString &tasklistFile );
void syncSharp( );
+ void syncPhone( );
void slotSelectPickerDate( QDate ) ;
void showDatePicker( ) ;
void moveIncidence(Incidence *) ;
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 424fa98..446fe2e 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -210,6 +210,9 @@ class KOPrefs : public KPimPrefs
QString mRemotePassWd;
QString mRemoteFile;
QString mLocalTempFile;
+ QString mPhoneDevice;
+ QString mPhoneConnection;
+ QString mPhoneModel;
int mLastSyncTime;
int mSyncAlgoPrefs;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index c3c4c26..062c95f 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -897,7 +897,13 @@ int MainWindow::ringSync()
if ( syncWithFile( temp->getRemoteFileName( ), true ) )
KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName();
} else {
- syncRemote( temp, false );
+ if ( temp->getIsPhoneSync() ) {
+ KOPrefs::instance()->mPhoneDevice = temp->getPhoneDevice( ) ;
+ KOPrefs::instance()->mPhoneConnection = temp->getPhoneConnection( );
+ KOPrefs::instance()->mPhoneModel = temp->getPhoneModel( );
+ syncPhone();
+ } else
+ syncRemote( temp, false );
}
}
@@ -2037,6 +2043,14 @@ void MainWindow::syncSharp()
slotModifiedChanged( true );
}
+void MainWindow::syncPhone()
+{
+ if ( mCalendarModifiedFlag )
+ save();
+ mView->syncPhone();
+ slotModifiedChanged( true );
+
+}
void MainWindow::printSel( )
{
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index fba8c52..1d87db0 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -75,6 +75,7 @@ class MainWindow : public QMainWindow
void syncSSH();
void confSync();
void syncSharp();
+ void syncPhone();
void syncLocalFile();
bool syncWithFile( QString, bool );
void quickSyncLocalFile();
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index 15dc152..e7c35fb 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -30,13 +30,8 @@
#include "ksyncprofile.h"
-KSyncProfile::KSyncProfile( const char * identifier): QObject (0, identifier )
+KSyncProfile::KSyncProfile(): QObject ()
{
- setIdentifier( identifier );
-
- if (getIdentifier().isEmpty())
- setIdentifier( "noID" );
-
setDefault();
}
KSyncProfile::~KSyncProfile()
@@ -68,7 +63,7 @@ KSyncProfile* KSyncProfile::clone()
myClone->setIsLocalFileSync( mIsLocalFileSync );
myClone->setIsPhoneSync( mIsPhoneSync );
myClone->setName( "noName" );
- myClone->setIdentifier( "noID" );
+ //myClone->setIdentifier( "noID" );
return myClone;
}
@@ -104,7 +99,7 @@ void KSyncProfile::readConfig(KConfig *config )
if (config)
{
- config->setGroup("SyncProfile_" + mIdentifier);
+ config->setGroup( mName );
mName = config->readEntry( "Name", mName );
mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand );
@@ -140,12 +135,12 @@ void KSyncProfile::readConfig(KConfig *config )
void KSyncProfile::deleteConfig(KConfig *config )
{
- config->deleteGroup( "SyncProfile_" + mIdentifier );
+ config->deleteGroup( mName );
}
void KSyncProfile::writeConfig( KConfig * config )
{
- config->setGroup("SyncProfile_" + mIdentifier);
+ config->setGroup(mName);
config->writeEntry( "Name", mName );
config->writeEntry( "PreSyncCommand",mPreSyncCommand );
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 8995def..a0cfb71 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -46,7 +46,7 @@ class KConfig;
*/
class KSyncProfile : public QObject {
public:
- KSyncProfile( const char * identifier = 0);
+ KSyncProfile();
~KSyncProfile() ;
KSyncProfile* clone();
@@ -55,8 +55,6 @@ class KSyncProfile : public QObject {
void writeConfig(KConfig *);
void deleteConfig(KConfig *);
- void setIdentifier( const QString& i ) {mIdentifier = i;}
- QString getIdentifier( ) { return mIdentifier;}
void setPreSyncCommand( const QString& n ) {mPreSyncCommand = n;}
QString getPreSyncCommand( ) { return mPreSyncCommand; }
void setPostSyncCommand( const QString& n ) {mPostSyncCommand = n;}
@@ -112,7 +110,6 @@ class KSyncProfile : public QObject {
bool getIsPhoneSync( ) { return mIsPhoneSync;}
private:
QString mName;
- QString mIdentifier;
QString mPreSyncCommand;
QString mPostSyncCommand;
QString mLocalTempFile;